|
@@ -382,9 +382,9 @@ def get_native_agent_configuration():
|
|
|
'execution_model': agent.execution_model,
|
|
|
'system_prompt': agent.system_prompt,
|
|
|
'task_prompt': agent.task_prompt,
|
|
|
- 'tools': agent.tools,
|
|
|
- 'sub_agents': agent.sub_agents,
|
|
|
- 'extra_params': agent.extra_params,
|
|
|
+ 'tools': json.loads(agent.tools),
|
|
|
+ 'sub_agents': json.loads(agent.sub_agents),
|
|
|
+ 'extra_params': json.loads(agent.extra_params),
|
|
|
'create_time': agent.create_time.strftime('%Y-%m-%d %H:%M:%S'),
|
|
|
'update_time': agent.update_time.strftime('%Y-%m-%d %H:%M:%S')
|
|
|
}
|
|
@@ -407,6 +407,8 @@ def save_native_agent_configuration():
|
|
|
tools = json.dumps(req_data.get('tools', []))
|
|
|
sub_agents = json.dumps(req_data.get('sub_agents', []))
|
|
|
extra_params = req_data.get('extra_params', {})
|
|
|
+ if isinstance(extra_params, dict):
|
|
|
+ extra_params = json.dumps(extra_params)
|
|
|
|
|
|
if not name:
|
|
|
return wrap_response(400, msg='name is required')
|