diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 013525f47..4be960b99 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -22,11 +22,11 @@ import { codellamaEditPrompt, deepseekEditPrompt, gemmaEditPrompt, + gptEditPrompt, mistralEditPrompt, neuralChatEditPrompt, openchatEditPrompt, phindEditPrompt, - simplestEditPrompt, simplifiedEditPrompt, xWinCoderEditPrompt, zephyrEditPrompt, @@ -256,7 +256,7 @@ function autodetectPromptTemplates( } else if (templateType === "gemma") { editTemplate = gemmaEditPrompt; } else if (templateType) { - editTemplate = simplestEditPrompt; + editTemplate = gptEditPrompt; } if (editTemplate !== null) { diff --git a/core/llm/llms/Anthropic.ts b/core/llm/llms/Anthropic.ts index 8bb642648..674de84b8 100644 --- a/core/llm/llms/Anthropic.ts +++ b/core/llm/llms/Anthropic.ts @@ -5,6 +5,7 @@ import { LLMOptions, ModelProvider, } from "../.."; +import { stripImages } from "../countTokens"; import { streamSse } from "../stream"; class Anthropic extends BaseLLM { @@ -65,6 +66,16 @@ class Anthropic extends BaseLLM { return messages; } + protected async *_streamComplete( + prompt: string, + options: CompletionOptions, + ): AsyncGenerator { + const messages = [{ role: "user" as const, content: prompt }]; + for await (const update of this._streamChat(messages, options)) { + yield stripImages(update.content); + } + } + protected async *_streamChat( messages: ChatMessage[], options: CompletionOptions, diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index c7becae55..d2afbe815 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -86,7 +86,7 @@ }, "../../core": { "name": "@continuedev/core", - "version": "1.0.0", + "version": "1.0.1", "license": "Apache-2.0", "dependencies": { "@mozilla/readability": "^0.5.0", diff --git a/extensions/vscode/yarn.lock b/extensions/vscode/yarn.lock index ec25a3bd3..b47e18677 100644 --- a/extensions/vscode/yarn.lock +++ b/extensions/vscode/yarn.lock @@ -691,6 +691,11 @@ resolved "https://registry.npmjs.org/@jsdevtools/ono/-/ono-7.1.3.tgz" integrity sha512-4JQNk+3mVzK3xh2rqd6RB4J46qUR19azEHBneZyTZM+c456qOrbbM/5xcR8huNCCcbVt7+UmizG6GuUvPvKUYg== +"@lancedb/vectordb-darwin-arm64@*": + version "0.4.13" + resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.13.tgz" + integrity sha512-JfroNCG8yKIU931Y+x8d0Fp8C9DHUSC5j+CjI+e5err7rTWtie4j3JbsXlWAnPFaFEOg0Xk3BWkSikCvhPGJGg== + "@lancedb/vectordb-darwin-arm64@0.4.12": version "0.4.12" resolved "https://registry.npmjs.org/@lancedb/vectordb-darwin-arm64/-/vectordb-darwin-arm64-0.4.12.tgz" @@ -2348,7 +2353,7 @@ core-util-is@1.0.2: integrity sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ== "core@file:../../core": - version "1.0.0" + version "1.0.1" resolved "file:../../core" dependencies: "@mozilla/readability" "^0.5.0" diff --git a/gui/package-lock.json b/gui/package-lock.json index 1a4bab758..92bc8e738 100644 --- a/gui/package-lock.json +++ b/gui/package-lock.json @@ -73,7 +73,8 @@ } }, "../core": { - "version": "1.0.0", + "name": "@continuedev/core", + "version": "1.0.1", "license": "Apache-2.0", "dependencies": { "@mozilla/readability": "^0.5.0",