Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Cleanup
Tomas Valentac459a5261f60
diff --git a/api-service/agent/base.py b/api-service/agent/base.pyindex 2dba01685..6016c9a18 100644--- a/api-service/agent/base.py+++ b/api-service/agent/base.py@@ -62,18 +62,18 @@ class AgentRun:@staticmethoddef _get_prompt_part(- prompts: List[PromptPart], role: Literal["user", "system"], type: str+ prompts: List[PromptPart],+ role: Literal["user", "system"],+ type: str,):return (next(- (- prompt- for prompt in prompts- if prompt.role == role and prompt.type == type- ),+ prompt+ for prompt in prompts+ if prompt.role == role and prompt.type == type)- .content.replace("{", "{{")- .replace("}", "}}")+ # Double the parenthesses to escape them because the string will be prompt templated.+ .content.replace("{", "{{").replace("}", "}}"))@staticmethoddiff --git a/components/Editor/Sidebar/Agent/Tool/index.tsx b/components/Editor/Sidebar/Agent/Tool/index.tsxindex abba0266f..6edfcd509 100644--- a/components/Editor/Sidebar/Agent/Tool/index.tsx+++ b/components/Editor/Sidebar/Agent/Tool/index.tsx@@ -32,7 +32,7 @@ function Tool({case ToolName.LetHumanChoose:return <LetHumanChoose log={log} onAnswer={onAnswer} isRunning={isRunning} />default:- return <div>Cannot render frontend component - unknown tol {log.tool_name}</div>+ return <div>Cannot render frontend component - unknown tool {log.tool_name}</div>}}