Skip to content

Commit

Permalink
update to latest @copilot-extensions/preview-sdk@latest
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m committed Sep 6, 2024
1 parent bcd67e9 commit 6ae9b50
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
"license": "ISC",
"description": "",
"dependencies": {
"@copilot-extensions/preview-sdk": "^3.0.0",
"@copilot-extensions/preview-sdk": "^4.0.0",
"openai": "^4.55.0"
},
"devDependencies": {
Expand Down
6 changes: 3 additions & 3 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ const server = createServer(async (request, response) => {
response.write(chunkStr);
}

response.end(createDoneEvent().toString());
response.end(createDoneEvent());
return;
}

Expand Down Expand Up @@ -167,7 +167,7 @@ const server = createServer(async (request, response) => {
response.write(chunkStr);
}

response.end(createDoneEvent().toString());
response.end(createDoneEvent());
console.timeEnd("streaming");
} catch (err) {
console.error(err);
Expand All @@ -189,7 +189,7 @@ function getBody(request: IncomingMessage): Promise<string> {
bodyParts.push(chunk);
})
.on("end", () => {
body = Buffer.concat(bodyParts).toString();
body = Buffer.concat(bodyParts);
resolve(body);
});
});
Expand Down

0 comments on commit 6ae9b50

Please sign in to comment.