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 """