script generation improvement (#3216)

This commit is contained in:
Shuchang Zheng
2025-08-16 17:48:10 -07:00
committed by GitHub
parent 82f0b98fca
commit b9b7591079
14 changed files with 841 additions and 279 deletions

View File

@@ -69,6 +69,11 @@ SINGLE_CLICK_AGENT_LLM_API_HANDLER = (
if SETTINGS_MANAGER.SINGLE_CLICK_AGENT_LLM_KEY
else SECONDARY_LLM_API_HANDLER
)
SINGLE_INPUT_AGENT_LLM_API_HANDLER = (
LLMAPIHandlerFactory.get_llm_api_handler(SETTINGS_MANAGER.SINGLE_INPUT_AGENT_LLM_KEY)
if SETTINGS_MANAGER.SINGLE_INPUT_AGENT_LLM_KEY
else SECONDARY_LLM_API_HANDLER
)
WORKFLOW_CONTEXT_MANAGER = WorkflowContextManager()
WORKFLOW_SERVICE = WorkflowService()
AGENT_FUNCTION = AgentFunction()

View File

@@ -0,0 +1,17 @@
# Goal
You are an expert in filling out text input forms on a webpage. Help the user fill out a specific text input field.
# Provided information:{% if goal %}
- User's overall goal: {{ goal }}{% endif %}
- Context and details: {{ data }}
- The question or the intention for this field: {{ intention }}
# Output
- Your answer should be direct and to the point. No need to explain the answer.
- YOUR RESPONSE HAS TO BE IN JSON FORMAT. DO NOT RETURN ANYTHING ELSE.
- DO NOT INCLUDE ANY UNRELATED INFORMATION OR UNNECESSARY DETAILS IN YOUR ANSWER.
EXAMPLE RESPONSE FORMAT:
{
"answer": "string",
}

View File

@@ -2310,7 +2310,7 @@ class WorkflowService:
file_name=codegen_input.file_name,
workflow_run_request=codegen_input.workflow_run,
workflow=codegen_input.workflow,
tasks=codegen_input.workflow_blocks,
blocks=codegen_input.workflow_blocks,
actions_by_task=codegen_input.actions_by_task,
organization_id=workflow.organization_id,
script_id=created_script.script_id,