From 7c0acc7b77cb868e23ad517bc17b37da15b8a6c7 Mon Sep 17 00:00:00 2001 From: lloydzhou Date: Thu, 5 Sep 2024 22:02:06 +0800 Subject: [PATCH] hotfix tools empty array --- app/utils/chat.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/utils/chat.ts b/app/utils/chat.ts index df266e59d..7f3bb23c5 100644 --- a/app/utils/chat.ts +++ b/app/utils/chat.ts @@ -277,7 +277,7 @@ export function stream( method: "POST", body: JSON.stringify({ ...requestPayload, - tools, + tools: tools && tools.length ? tools : undefined, }), signal: controller.signal, headers,