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()); }); }); }