From e952e01dfe928f93a343be6f8e004470c66afe92 Mon Sep 17 00:00:00 2001 From: Yeuoly Date: Wed, 27 Mar 2024 12:28:07 +0800 Subject: [PATCH] fix: sql --- api/commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/api/commands.py b/api/commands.py index 7795b70a3d..94f0372773 100644 --- a/api/commands.py +++ b/api/commands.py @@ -386,10 +386,12 @@ def convert_to_agent_apps(): WHERE a.mode = 'chat' AND am.agent_mode is not null AND ( - am.agent_mode like '%"strategy": "function_call"%' or am.agent_mode like '%"strategy": "react"%' - ) + am.agent_mode like '%"strategy": "function_call"%' + OR am.agent_mode like '%"strategy": "react"%' + ) AND ( - am.agent_mode like '{"enabled": true%' or am.agent_mode like '{"max_iteration": %' + am.agent_mode like '{"enabled": true%' + OR am.agent_mode like '{"max_iteration": %' ) ORDER BY a.created_at DESC LIMIT 1000 """