Skip to content

Commit

Permalink
Merge pull request #3139 from continuedev/nate/quick-edit-5772
Browse files Browse the repository at this point in the history
hotfix: openai displaying as undefinedundefinedundefined
  • Loading branch information
sestinj authored Nov 30, 2024
2 parents 7aebb14 + 0f5be8b commit 6820f88
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion core/llm/llms/Cloudflare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ export default class Cloudflare extends BaseLLM {

for await (const value of streamSse(resp)) {
if (value.choices?.[0]?.delta?.content) {
yield value.choices[0].delta;
yield {
role: "assistant",
content: value.choices[0].delta,
};
}
}
}
Expand Down
7 changes: 5 additions & 2 deletions core/llm/llms/OpenAI.ts
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,10 @@ class OpenAI extends BaseLLM {

for await (const value of streamSse(response)) {
if (value.choices?.[0]?.delta?.content) {
yield value.choices[0].delta;
yield {
role: "assistant",
content: value.choices[0].delta.content,
};
} else if (value.choices?.[0]?.delta?.tool_calls) {
yield {
role: "assistant",
Expand Down Expand Up @@ -375,4 +378,4 @@ class OpenAI extends BaseLLM {
}
}

export default OpenAI;
export default OpenAI;
2 changes: 1 addition & 1 deletion extensions/vscode/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "continue",
"icon": "media/icon.png",
"author": "Continue Dev, Inc",
"version": "0.9.238",
"version": "0.9.239",
"repository": {
"type": "git",
"url": "https://github.com/continuedev/continue"
Expand Down

0 comments on commit 6820f88

Please sign in to comment.