fix some bugs

This commit is contained in:
jinhui.li
2025-03-03 15:42:11 +08:00
parent ac9acd73c3
commit 48b908d36c
2 changed files with 1 additions and 1 deletions

View File

@@ -130,7 +130,6 @@ app.post("/v1/messages", async (req, res) => {
let hasStartedTextBlock = false;
for await (const chunk of completion) {
console.log(chunk);
const delta = chunk.choices[0].delta;
if (delta.tool_calls && delta.tool_calls.length > 0) {
const toolCall = delta.tool_calls[0];

View File

@@ -1,4 +1,5 @@
import { OpenAI } from "openai";
import { getOpenAICommonOptions } from "./utils.mjs";
const useToolRouter = {
name: "use-tool",