|
@@ -204,9 +204,14 @@ class PushTaskWorkerPool:
|
|
|
self.agent_service.service_module_manager,
|
|
|
self.agent_service.agent_config_manager)
|
|
|
if agent_config:
|
|
|
+ try:
|
|
|
+ tool_names = json.loads(agent_config.tools)
|
|
|
+ except json.JSONDecodeError:
|
|
|
+ logger.error(f"Invalid JSON in agent tools: {agent_config.tools}")
|
|
|
+ tool_names = []
|
|
|
push_agent = MessagePushAgent(model=agent_config.execution_model,
|
|
|
system_prompt=agent_config.system_prompt,
|
|
|
- tools=get_tools(agent_config.tools))
|
|
|
+ tools=get_tools(tool_names))
|
|
|
query_prompt_template = agent_config.task_prompt
|
|
|
else:
|
|
|
push_agent = MessagePushAgent()
|