Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use latest @copilot-extensions/preview-sdk and all its goodies #6

Open
wants to merge 10 commits into
base: main
Choose a base branch
from

Conversation

gr2m
Copy link
Collaborator

@gr2m gr2m commented Sep 5, 2024

With this PR, the app has no other dependencies except @copilot-extensions/preview-sdk

Let me know what you think about the changes.

src/index.ts Outdated Show resolved Hide resolved
src/models-api.ts Outdated Show resolved Hide resolved
Base automatically changed from upgrade-copilot-extension-sdk to main September 6, 2024 22:45
@gr2m gr2m force-pushed the moar-sdk branch 5 times, most recently from 7b28812 to bcd67e9 Compare September 6, 2024 23:12
@@ -162,9 +166,9 @@ const server = createServer(async (request, response) => {
const chunkStr = "data: " + JSON.stringify(chunk) + "\n\n";
response.write(chunkStr);
}
response.write("data: [DONE]\n\n");

response.end(createDoneEvent());
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Love this 🔥

src/index.ts Outdated
@@ -89,56 +89,60 @@ const server = createServer(async (request, response) => {

console.time("tool-call");
const toolCaller = await capiClient.chat.completions.create({
// @ts-expect-error - type error due to Copilot/OpenAI SDKs interop, I'll look into it ~@gr2m
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd opt to wait until we've resolved this to ship

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it has been removed via #8

Comment on lines +102 to +103
// @ts-expect-error - type error due to Copilot/OpenAI SDKs interop, I'll look into it ~@gr2m
toolCaller.choices[0]
Copy link
Collaborator Author

@gr2m gr2m Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not a straight forward fix, not like #6 (comment). I will look into it, your call if you want to merge it or not

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants