From 1efce8271e46c654152fdcd8ce3100f8eb6d87f8 Mon Sep 17 00:00:00 2001 From: Gregor Martynus <39992+gr2m@users.noreply.github.com> Date: Fri, 6 Sep 2024 16:17:27 -0700 Subject: [PATCH] fixies --- src/index.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/index.ts b/src/index.ts index 3dfc87f..7a31de5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -99,7 +99,7 @@ const server = createServer(async (request, response) => { const [functionToCall] = getFunctionCalls( // @ts-expect-error - type error due to Copilot/OpenAI SDKs interop, I'll look into it ~@gr2m - toolCaller.choices[0].message + toolCaller.choices[0] ) if ( @@ -189,8 +189,7 @@ function getBody(request: IncomingMessage): Promise { bodyParts.push(chunk); }) .on("end", () => { - body = Buffer.concat(bodyParts); - resolve(body); + resolve(Buffer.concat(bodyParts).toString()); }); }); }