fix some bugs
This commit is contained in:
@@ -130,7 +130,6 @@ app.post("/v1/messages", async (req, res) => {
|
|||||||
let hasStartedTextBlock = false;
|
let hasStartedTextBlock = false;
|
||||||
|
|
||||||
for await (const chunk of completion) {
|
for await (const chunk of completion) {
|
||||||
console.log(chunk);
|
|
||||||
const delta = chunk.choices[0].delta;
|
const delta = chunk.choices[0].delta;
|
||||||
if (delta.tool_calls && delta.tool_calls.length > 0) {
|
if (delta.tool_calls && delta.tool_calls.length > 0) {
|
||||||
const toolCall = delta.tool_calls[0];
|
const toolCall = delta.tool_calls[0];
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { OpenAI } from "openai";
|
import { OpenAI } from "openai";
|
||||||
|
import { getOpenAICommonOptions } from "./utils.mjs";
|
||||||
|
|
||||||
const useToolRouter = {
|
const useToolRouter = {
|
||||||
name: "use-tool",
|
name: "use-tool",
|
||||||
|
|||||||
Reference in New Issue
Block a user