瀏覽代碼

hotfix tools empty array

lloydzhou 1 年之前
父節點
當前提交
7c0acc7b77
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      app/utils/chat.ts

+ 1 - 1
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,