Skip to content

Commit 57db845

Browse files
committed
remove tools from image/audio generations by default
1 parent 6203282 commit 57db845

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

llms/main.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1052,8 +1052,11 @@ def gen_summary(self, gen):
10521052
def chat_summary(self, chat):
10531053
return chat_summary(chat)
10541054

1055-
def process_chat(self, chat, provider_id=None):
1056-
return process_chat(chat, provider_id)
1055+
async def process_chat(self, chat, provider_id=None):
1056+
# remove tools from chat
1057+
clone = json.loads(json.dumps(chat))
1058+
clone.pop("tools", None)
1059+
return await process_chat(clone, provider_id)
10571060

10581061
async def response_json(self, response):
10591062
return await response_json(response)

0 commit comments

Comments
 (0)