Open-source, secure environment with real-world tools for enterprise-grade agents.
Python agentaiai-agentai-agentscode-interpretercopilotdevelopmentdevtoolsgptgpt-4javascriptllmnextjsopenaipythonreactsoftwaretypescript
Make the tool name optional when parsing llm output
Tomas Valentae66d8ac33a6d
diff --git a/api-service/codegen/agent/parsing.py b/api-service/codegen/agent/parsing.pyindex 8cc9da457..46eff0a9e 100644--- a/api-service/codegen/agent/parsing.py+++ b/api-service/codegen/agent/parsing.py@@ -35,7 +35,7 @@ def merge_logs(log: TypedDict, other: TypedDict):log.update(other)-action_tag_open = "<action(?:\\s+tool=\".+?\")\\s*/?>?"+action_tag_open = "<action(?:\\s+tool=\".+?\")?\\s*/?>?"action_tag_close = "</\\s*action\\s*>?"action_tag_split_pattern = re.compile(f"({action_tag_open})|({action_tag_close})|(.+?)")