File tree Expand file tree Collapse file tree 2 files changed +8
-6
lines changed
routes/page/agent/[agentId]/agent-components Expand file tree Collapse file tree 2 files changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -39,6 +39,8 @@ export const FILE_EDITORS = [
3939
4040export const LEARNER_AGENT_ID = "01acc3e5-0af7-49e6-ad7a-a760bd12dc40" ;
4141export const EVALUATOR_AGENT_ID = "2cd4b805-7078-4405-87e9-2ec9aadf8a11" ;
42+ export const AI_PROGRAMMER_AGENT_ID = "c2a2faf6-b8b5-47fe-807b-f4714cf25dd4" ;
43+ export const RULE_TRIGGER_CODE_GENERATE_TEMPLATE = "rule-trigger-code-generate_instruction" ;
4244
4345export const TRAINING_MODE = "training" ;
4446export const DEFAULT_KNOWLEDGE_COLLECTION = "BotSharp" ;
Original file line number Diff line number Diff line change 66 import Markdown from ' $lib/common/markdown/Markdown.svelte' ;
77 import BotsharpTooltip from ' $lib/common/tooltip/BotsharpTooltip.svelte' ;
88 import LoadingToComplete from ' $lib/common/LoadingToComplete.svelte' ;
9- import { ADMIN_ROLES } from ' $lib/helpers/constants' ;
9+ import { ADMIN_ROLES , AI_PROGRAMMER_AGENT_ID , RULE_TRIGGER_CODE_GENERATE_TEMPLATE } from ' $lib/helpers/constants' ;
1010 import { AgentCodeScriptType } from ' $lib/helpers/enums' ;
1111
1212 const limit = 100 ;
191191 return new Promise ((resolve , reject ) => {
192192 isLoading = true ;
193193 generateAgentCodeScript (agent .id , {
194- text: rule . criteria ,
194+ text: ' ' ,
195195 options: {
196+ agent_id: AI_PROGRAMMER_AGENT_ID ,
197+ template_name: RULE_TRIGGER_CODE_GENERATE_TEMPLATE ,
196198 save_to_db: true ,
197199 script_name: ` ${ rule .trigger_name } _rule.py` ,
198200 script_type: AgentCodeScriptType .Src ,
199201 data: {
200- ' rule_args' : { ... rule .output_args }
202+ ' args_example' : { ... rule .output_args },
203+ ' user_request' : rule .criteria
201204 }
202- // to do:
203- // agent_id: agent.id,
204- // template_name: "rule"
205205 }
206206 }).then (res => {
207207 if (res? .success ) {
You can’t perform that action at this time.
0 commit comments