From a36f7e9572de185ec47342ac817115ee54003c07 Mon Sep 17 00:00:00 2001 From: Charles Twardy <925782+ctwardy@users.noreply.github.com> Date: Tue, 15 Oct 2024 14:56:34 -0400 Subject: [PATCH 01/17] Clarify "deployments" in azure.md & s/azure/openai. 1) Clarified use of deployment name for `engine` in Azure. 2) As of Oct 15 stable release, it seems Continue no longer recognizes "azure" as a `provider` but only as an `apiType`. I'm sure of this for the gpt-4o chat model. I'm assuming it follows for the rest. --- .../model-providers/top-level/azure.md | 44 +++++++++++-------- 1 file changed, 25 insertions(+), 19 deletions(-) diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 295b7cdc8..2011a62cb 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -10,13 +10,13 @@ We recommend configuring **GPT-4o** as your chat model. ```json title="config.json" "models": [{ "title": "GPT-4o", - "provider": "azure", + "provider": "openai", // As of Oct 15, "azure" isn't recognized + "apiType": "azure", // Needed to construct Azure-style URL "model": "gpt-4o", "apiBase": "", - "engine": "", - "apiVersion": "", - "apiType": "azure", - "apiKey": "" + "engine": "", // Your deployment, eg "gpt4o-beta" + "apiVersion": "", // Typically a date like "2024-06-01" + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] ``` @@ -27,13 +27,13 @@ We recommend configuring **Codestral** as your autocomplete model. ```json title="config.json" "tabAutocompleteModel": [{ "title": "Codestral", - "provider": "azure", + "provider": "openai", // As of Oct 15, "azure" isn't recognized + "apiType": "azure", // Needed to construct Azure-style URL "model": "codestral-latest", "apiBase": "", - "engine": "", - "apiVersion": "", - "apiType": "azure", - "apiKey": "" + "engine": "", // Your deployment, eg "codestral-small" + "apiVersion": "", // Typically a date like "2024-06-01" + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] ``` @@ -43,13 +43,13 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ```json title="config.json" "embeddingsProvider": [{ - "provider": "azure", + "provider": "openai", // As of Oct 15, "azure" isn't recognized + "apiType": "azure", // Needed to construct Azure-style URL "model": "text-embedding-3-large", "apiBase": "", - "engine": "", - "apiVersion": "", - "apiType": "azure", - "apiKey": "" + "engine": "", // Your deployment, eg "codestral-small" + "apiVersion": "", // Typically a date like "2024-06-01" + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] ``` @@ -75,16 +75,22 @@ Azure OpenAI requires a handful of additional parameters to be configured, such To find this information in _Azure AI Studio_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_. -For example, a Target URI of `` would map to the following: +For example, a Target URI of: +``` +https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``````````` ****************** +``` + +would map to the following: ```json { "title": "GPT-4o Azure", "model": "gpt-4o", - "provider": "azure", - "apiBase": "https://just-an-example.openai.azure.com", + "provider": "openai", "apiType": "azure", - "engine": "gpt-4o", + "apiBase": "https://just-an-example.openai.azure.com", + "engine": "gpt-4o-july", "apiVersion": "2023-03-15-preview", "apiKey": "" } From a33a0ad6d83436f55e586a410cd517c4fee88ebd Mon Sep 17 00:00:00 2001 From: Test Date: Tue, 22 Oct 2024 16:45:43 -0700 Subject: [PATCH 02/17] Create nvidia.md --- .../customize/model-providers/more/nvidia.md | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 docs/docs/customize/model-providers/more/nvidia.md diff --git a/docs/docs/customize/model-providers/more/nvidia.md b/docs/docs/customize/model-providers/more/nvidia.md new file mode 100644 index 000000000..e59f131b7 --- /dev/null +++ b/docs/docs/customize/model-providers/more/nvidia.md @@ -0,0 +1,54 @@ +--- +title: NVIDIA +--- + +:::info + +[View the docs](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog) to learn how to get an API key. + +::: + +## Chat model + +We recommend configuring **Nemotron-4-340B-Instruct** as your chat model. + +```json title="config.json" +{ + "models": [ + { + "title": "Nemotron-4-340B-Instruct", + "provider": "nvidia", + "model": "nvidia-nemotron-4-340b-instruct", + "apiKey": "[API_KEY]" + } + ] +} +``` + +## Autocomplete model + +NVIDIA currently does not offer any autocomplete models. + +[Click here](../../model-types/autocomplete.md) to see a list of autocomplete model providers. + +## Embeddings model + +We recommend configuring **NVIDIA Retrieval QA Mistral 7B** as your embeddings model. + +```json title="config.json" +{ + "embeddingsProvider": [ + { + "provider": "nvidia", + "model": "nvidia/nv-embedqa-mistral-7b-v2", + "apiKey": "[API_KEY]" + } + ] +} +``` + +## Reranking model + +NVIDIA currently does not offer any reranking models. + +[Click here](../../model-types/reranking.md) to see a list of reranking model providers. From 680edf35724685bec29c0f81ee9ee80a59b99024 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 24 Oct 2024 12:20:34 -0700 Subject: [PATCH 03/17] provider factories, plugin, and package scripts --- .idea/continue.iml | 9 +++ .idea/modules.xml | 2 +- .../ConfigJsonSchemaProviderFactory.kt | 2 +- .../ConfigRcJsonSchemaProviderFactory copy.kt | 49 +++++++++++++++ .../src/main/resources/META-INF/plugin.xml | 4 ++ extensions/vscode/package.json | 4 +- .../scripts/prepackage-cross-platform.js | 23 ++++---- extensions/vscode/scripts/prepackage.js | 59 +++++-------------- extensions/vscode/scripts/utils.js | 36 +++++++---- 9 files changed, 117 insertions(+), 71 deletions(-) create mode 100644 .idea/continue.iml create mode 100644 extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt diff --git a/.idea/continue.iml b/.idea/continue.iml new file mode 100644 index 000000000..d6ebd4805 --- /dev/null +++ b/.idea/continue.iml @@ -0,0 +1,9 @@ + + + + + + + + + \ No newline at end of file diff --git a/.idea/modules.xml b/.idea/modules.xml index ba5b279fb..c8a08c311 100644 --- a/.idea/modules.xml +++ b/.idea/modules.xml @@ -2,7 +2,7 @@ - + \ No newline at end of file diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt index 86fddb3c5..d10499331 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt @@ -22,7 +22,7 @@ class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { override fun isAvailable(file: VirtualFile): Boolean { - return file.name == "config.json" || file.name == ".continuerc.json" + return path.endsWith("/.continue/config.json") || file.name == ".continuerc.json" } override fun getName(): String { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt new file mode 100644 index 000000000..763033d7e --- /dev/null +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt @@ -0,0 +1,49 @@ +package com.github.continuedev.continueintellijextension.`continue` + +import com.github.continuedev.continueintellijextension.activities.ContinuePluginStartupActivity +import com.github.continuedev.continueintellijextension.constants.getContinueGlobalPath +import com.intellij.openapi.project.Project +import com.intellij.openapi.util.io.StreamUtil +import com.intellij.openapi.vfs.LocalFileSystem +import com.intellij.openapi.vfs.VirtualFile +import com.jetbrains.jsonSchema.extension.JsonSchemaFileProvider +import com.jetbrains.jsonSchema.extension.JsonSchemaProviderFactory +import com.jetbrains.jsonSchema.extension.SchemaType +import java.io.File +import java.io.IOException +import java.nio.charset.StandardCharsets +import java.nio.file.Paths + +class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { + override fun getProviders(project: Project): MutableList { + return mutableListOf(ConfigJsonSchemaFileProvider()) + } +} + +class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { + override fun isAvailable(file: VirtualFile): Boolean { + return file.name == ".continuerc.json" + } + + override fun getName(): String { + return "config.json" + } + + override fun getSchemaFile(): VirtualFile? { + ContinuePluginStartupActivity::class.java.getClassLoader().getResourceAsStream("continue_rc_schema.json") + .use { `is` -> + if (`is` == null) { + throw IOException("Resource not found: continue_rc_schema.json") + } + val content = StreamUtil.readText(`is`, StandardCharsets.UTF_8) + val filepath = Paths.get(getContinueGlobalPath(), "continue_rc_schema.json").toString() + File(filepath).writeText(content) + return LocalFileSystem.getInstance().findFileByPath(filepath) + } + } + + override fun getSchemaType(): SchemaType { + return SchemaType.embeddedSchema + } + +} diff --git a/extensions/intellij/src/main/resources/META-INF/plugin.xml b/extensions/intellij/src/main/resources/META-INF/plugin.xml index 640fa05c1..f42b5f7c4 100644 --- a/extensions/intellij/src/main/resources/META-INF/plugin.xml +++ b/extensions/intellij/src/main/resources/META-INF/plugin.xml @@ -15,6 +15,10 @@ + + + { console.log("[info] Packaging extension for target ", target); - // Copy config_schema.json to config.json in docs and intellij - fs.copyFileSync( - "config_schema.json", - path.join("..", "..", "docs", "static", "schemas", "config.json"), - ); - fs.copyFileSync( - "config_schema.json", - path.join( - "..", - "intellij", - "src", - "main", - "resources", - "config_schema.json", - ), - ); - // Modify and copy for .continuerc.json - const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); - schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { - type: "string", - enum: ["merge", "overwrite"], - default: "merge", - title: "Merge behavior", - markdownDescription: - "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json.", - }; - fs.writeFileSync("continue_rc_schema.json", JSON.stringify(schema, null, 2)); + // Copy config schemas to docs and intellij + copyConfigSchema(); if (!process.cwd().endsWith("vscode")) { // This is sometimes run from root dir instead (e.g. in VS Code tasks) @@ -505,12 +481,11 @@ const exe = os === "win32" ? ".exe" : ""; // onnx runtime bindngs `bin/napi-v3/${os}/${arch}/onnxruntime_binding.node`, - `bin/napi-v3/${os}/${arch}/${ - os === "darwin" - ? "libonnxruntime.1.14.0.dylib" - : os === "linux" - ? "libonnxruntime.so.1.14.0" - : "onnxruntime.dll" + `bin/napi-v3/${os}/${arch}/${os === "darwin" + ? "libonnxruntime.1.14.0.dylib" + : os === "linux" + ? "libonnxruntime.so.1.14.0" + : "onnxruntime.dll" }`, "builtin-themes/dark_modern.json", @@ -545,17 +520,15 @@ const exe = os === "win32" ? ".exe" : ""; // out/node_modules (to be accessed by extension.js) `out/node_modules/@vscode/ripgrep/bin/rg${exe}`, - `out/node_modules/@esbuild/${ - target === "win32-arm64" - ? "esbuild.exe" - : target === "win32-x64" - ? "win32-x64/esbuild.exe" - : `${target}/bin/esbuild` + `out/node_modules/@esbuild/${target === "win32-arm64" + ? "esbuild.exe" + : target === "win32-x64" + ? "win32-x64/esbuild.exe" + : `${target}/bin/esbuild` }`, - `out/node_modules/@lancedb/vectordb-${ - os === "win32" - ? "win32-x64-msvc" - : `${target}${os === "linux" ? "-gnu" : ""}` + `out/node_modules/@lancedb/vectordb-${os === "win32" + ? "win32-x64-msvc" + : `${target}${os === "linux" ? "-gnu" : ""}` }/index.node`, `out/node_modules/esbuild/lib/main.js`, `out/node_modules/esbuild/bin/esbuild`, diff --git a/extensions/vscode/scripts/utils.js b/extensions/vscode/scripts/utils.js index 93c1928ce..367c17708 100644 --- a/extensions/vscode/scripts/utils.js +++ b/extensions/vscode/scripts/utils.js @@ -11,6 +11,19 @@ const { const continueDir = path.join(__dirname, "..", "..", ".."); function copyConfigSchema() { + // Modify and copy for .continuerc.json + const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); + schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { + type: "string", + enum: ["merge", "overwrite"], + default: "merge", + title: "Merge behavior", + markdownDescription: + "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json.", + }; + fs.writeFileSync("continue_rc_schema.json", JSON.stringify(schema, null, 2)); + + // Copy config schemas to docs and intellij fs.copyFileSync( "config_schema.json", path.join("..", "..", "docs", "static", "schemas", "config.json"), @@ -26,17 +39,18 @@ function copyConfigSchema() { "config_schema.json", ), ); - // Modify and copy for .continuerc.json - const schema = JSON.parse(fs.readFileSync("config_schema.json", "utf8")); - schema.definitions.SerializedContinueConfig.properties.mergeBehavior = { - type: "string", - enum: ["merge", "overwrite"], - default: "merge", - title: "Merge behavior", - markdownDescription: - "If set to 'merge', .continuerc.json will be applied on top of config.json (arrays and objects are merged). If set to 'overwrite', then every top-level property of .continuerc.json will overwrite that property from config.json.", - }; - fs.writeFileSync("continue_rc_schema.json", JSON.stringify(schema, null, 2)); + fs.copyFileSync( + "continue_rc_schema.json", + path.join( + "..", + "intellij", + "src", + "main", + "resources", + "continue_rc_schema.json", + ), + ); + } function copyTokenizers() { From 85e25d813adec952e19eba6373aac794575b9218 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 25 Oct 2024 15:50:39 -0700 Subject: [PATCH 04/17] bump version --- extensions/vscode/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 2d7a5af4f..2b403d5e5 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.221", + "version": "0.8.55", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" From 037e293890c3f9a67c1d7106db90569c6e0a4669 Mon Sep 17 00:00:00 2001 From: Nate Date: Fri, 25 Oct 2024 16:50:21 -0700 Subject: [PATCH 05/17] changelog for 0.8.55 --- .changes/extensions/vscode/0.8.55.md | 9 +++++++++ .changes/unreleased/Added-20241014-231551.yaml | 4 ---- .changes/unreleased/Added-20241014-231622.yaml | 4 ---- .changes/unreleased/Added-20241014-231639.yaml | 4 ---- .changes/unreleased/Added-20241014-231657.yaml | 4 ---- .changes/unreleased/Added-20241014-231714.yaml | 4 ---- .changes/unreleased/Changed-20241014-231738.yaml | 4 ---- extensions/vscode/CHANGELOG.md | 6 +++++- 8 files changed, 14 insertions(+), 25 deletions(-) create mode 100644 .changes/extensions/vscode/0.8.55.md delete mode 100644 .changes/unreleased/Added-20241014-231551.yaml delete mode 100644 .changes/unreleased/Added-20241014-231622.yaml delete mode 100644 .changes/unreleased/Added-20241014-231639.yaml delete mode 100644 .changes/unreleased/Added-20241014-231657.yaml delete mode 100644 .changes/unreleased/Added-20241014-231714.yaml delete mode 100644 .changes/unreleased/Changed-20241014-231738.yaml diff --git a/.changes/extensions/vscode/0.8.55.md b/.changes/extensions/vscode/0.8.55.md new file mode 100644 index 000000000..4800ad907 --- /dev/null +++ b/.changes/extensions/vscode/0.8.55.md @@ -0,0 +1,9 @@ +## 0.8.55 - 2024-10-25 +### Added +* Web context provider +* Cerebras inference provider +* Automatic descriptions for previous chats +* Discord context provider +* Improved full screen UI +### Changed +* Easier way to accept/reject/re-prompt after cmd/ctrl+I diff --git a/.changes/unreleased/Added-20241014-231551.yaml b/.changes/unreleased/Added-20241014-231551.yaml deleted file mode 100644 index 1e323fab1..000000000 --- a/.changes/unreleased/Added-20241014-231551.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Web context provider -time: 2024-10-14T23:15:51.670444-07:00 diff --git a/.changes/unreleased/Added-20241014-231622.yaml b/.changes/unreleased/Added-20241014-231622.yaml deleted file mode 100644 index 82e129b6b..000000000 --- a/.changes/unreleased/Added-20241014-231622.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Cerebras inference provider -time: 2024-10-14T23:16:22.754491-07:00 diff --git a/.changes/unreleased/Added-20241014-231639.yaml b/.changes/unreleased/Added-20241014-231639.yaml deleted file mode 100644 index 89ff18abc..000000000 --- a/.changes/unreleased/Added-20241014-231639.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Automatic descriptions for previous chats -time: 2024-10-14T23:16:39.451261-07:00 diff --git a/.changes/unreleased/Added-20241014-231657.yaml b/.changes/unreleased/Added-20241014-231657.yaml deleted file mode 100644 index e6a93349e..000000000 --- a/.changes/unreleased/Added-20241014-231657.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Discord context provider -time: 2024-10-14T23:16:57.089953-07:00 diff --git a/.changes/unreleased/Added-20241014-231714.yaml b/.changes/unreleased/Added-20241014-231714.yaml deleted file mode 100644 index f53eeca37..000000000 --- a/.changes/unreleased/Added-20241014-231714.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Added -body: Improved full screen UI -time: 2024-10-14T23:17:14.574917-07:00 diff --git a/.changes/unreleased/Changed-20241014-231738.yaml b/.changes/unreleased/Changed-20241014-231738.yaml deleted file mode 100644 index f0628aad7..000000000 --- a/.changes/unreleased/Changed-20241014-231738.yaml +++ /dev/null @@ -1,4 +0,0 @@ -project: extensions/vscode -kind: Changed -body: Easier way to accept/reject/re-prompt after cmd/ctrl+I -time: 2024-10-14T23:17:38.086964-07:00 diff --git a/extensions/vscode/CHANGELOG.md b/extensions/vscode/CHANGELOG.md index cabf54bf2..18e606865 100644 --- a/extensions/vscode/CHANGELOG.md +++ b/extensions/vscode/CHANGELOG.md @@ -5,7 +5,7 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html), and is generated by [Changie](https://github.com/miniscruff/changie). -Pre-release Changes +## 0.8.55 - 2024-10-25 ### Added * Web context provider * Cerebras inference provider @@ -15,6 +15,10 @@ Pre-release Changes ### Changed * Easier way to accept/reject/re-prompt after cmd/ctrl+I +## 0.8.54 - 2024-10-15 +### Fixed +* Hotfix: throttle transformers.js embeddings provider + ## 0.8.53 - 2024-10-11 ### Added * Improved loading/accept/reject UI for apply From 0e0efe9982c34ad4a14221a44e51ffc8fa6b10f8 Mon Sep 17 00:00:00 2001 From: Nate Date: Sun, 27 Oct 2024 00:43:45 -0700 Subject: [PATCH 06/17] rename engine to deployment, don't override to model --- core/config/types.ts | 6 +++--- core/control-plane/schema.ts | 2 +- core/index.d.ts | 9 +++++---- .../embeddings/OpenAIEmbeddingsProvider.ts | 2 +- core/llm/index.test.ts | 6 +++--- core/llm/index.ts | 4 ++-- core/llm/llms/Azure.ts | 2 +- core/llm/llms/OpenAI.ts | 2 +- .../model-providers/top-level/azure.md | 17 +++++++++-------- extensions/vscode/config_schema.json | 10 +++++----- gui/src/pages/AddNewModel/configs/providers.ts | 12 ++++++------ packages/config-types/src/index.ts | 2 +- 12 files changed, 38 insertions(+), 36 deletions(-) diff --git a/core/config/types.ts b/core/config/types.ts index dafbe588a..60e0f7f99 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -49,7 +49,7 @@ declare global { apiBase?: string; cacheBehavior?: CacheBehavior; - engine?: string; + deployment?: string; apiVersion?: string; apiType?: string; region?: string; @@ -322,7 +322,7 @@ declare global { accountId?: string; // Azure options - engine?: string; + deployment?: string; apiVersion?: string; apiType?: string; @@ -774,7 +774,7 @@ declare global { apiBase?: string; apiKey?: string; model?: string; - engine?: string; + deployment?: string; apiType?: string; apiVersion?: string; requestOptions?: RequestOptions; diff --git a/core/control-plane/schema.ts b/core/control-plane/schema.ts index 756798937..b4b3fe276 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -85,7 +85,7 @@ const embeddingsProviderSchema = z.object({ apiBase: z.string().optional(), apiKey: z.string().optional(), model: z.string().optional(), - engine: z.string().optional(), + deployment: z.string().optional(), apiType: z.string().optional(), apiVersion: z.string().optional(), requestOptions: z diff --git a/core/index.d.ts b/core/index.d.ts index c1c8ddc04..c1884b890 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -72,7 +72,7 @@ export interface ILLM extends LLMOptions { apiBase?: string; cacheBehavior?: CacheBehavior; - engine?: string; + deployment?: string; apiVersion?: string; apiType?: string; region?: string; @@ -351,7 +351,7 @@ export interface LLMOptions { accountId?: string; // Azure options - engine?: string; + deployment?: string; apiVersion?: string; apiType?: string; @@ -644,7 +644,8 @@ type ModelProvider = | "sambanova" | "nvidia" | "vllm" - | "mock"; + | "mock" + | "cerebras"; export type ModelName = | "AUTODETECT" @@ -819,7 +820,7 @@ export interface EmbedOptions { apiBase?: string; apiKey?: string; model?: string; - engine?: string; + deployment?: string; apiType?: string; apiVersion?: string; requestOptions?: RequestOptions; diff --git a/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts b/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts index 0f755ae3a..dc18129b4 100644 --- a/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts +++ b/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts @@ -27,7 +27,7 @@ class OpenAIEmbeddingsProvider extends BaseEmbeddingsProvider { if (this.options.apiType === "azure") { return new URL( - `openai/deployments/${this.options.engine}/embeddings?api-version=${this.options.apiVersion}`, + `openai/deployments/${this.options.deployment}/embeddings?api-version=${this.options.apiVersion}`, this.options.apiBase, ); } diff --git a/core/llm/index.test.ts b/core/llm/index.test.ts index 35a287fd5..8d5d1cc35 100644 --- a/core/llm/index.test.ts +++ b/core/llm/index.test.ts @@ -1,5 +1,5 @@ -import { ChatMessage, LLMOptions, ModelProvider } from ".."; import { BaseLLM } from "."; +import { ChatMessage, LLMOptions, ModelProvider } from ".."; class DummyLLM extends BaseLLM { static providerName: ModelProvider = "openai"; @@ -48,7 +48,7 @@ describe("BaseLLM", () => { aiGatewaySlug: "testSlug", apiBase: "https://api.example.com", accountId: "testAccountId", - engine: "davinci", + deployment: "davinci", apiVersion: "v1", apiType: "public", region: "us", @@ -71,7 +71,7 @@ describe("BaseLLM", () => { expect(instance.aiGatewaySlug).toBe("testSlug"); expect(instance.apiBase).toBe("https://api.example.com/"); expect(instance.accountId).toBe("testAccountId"); - expect(instance.engine).toBe("davinci"); + expect(instance.deployment).toBe("davinci"); expect(instance.apiVersion).toBe("v1"); expect(instance.apiType).toBe("public"); expect(instance.region).toBe("us"); diff --git a/core/llm/index.ts b/core/llm/index.ts index 53c984b43..2247148a7 100644 --- a/core/llm/index.ts +++ b/core/llm/index.ts @@ -106,7 +106,7 @@ export abstract class BaseLLM implements ILLM { cacheBehavior?: CacheBehavior; capabilities?: ModelCapability; - engine?: string; + deployment?: string; apiVersion?: string; apiType?: string; region?: string; @@ -200,7 +200,7 @@ export abstract class BaseLLM implements ILLM { this.accountId = options.accountId; this.capabilities = options.capabilities; - this.engine = options.engine; + this.deployment = options.deployment; this.apiVersion = options.apiVersion; this.apiType = options.apiType; this.region = options.region; diff --git a/core/llm/llms/Azure.ts b/core/llm/llms/Azure.ts index be7d1c18c..a8f119445 100644 --- a/core/llm/llms/Azure.ts +++ b/core/llm/llms/Azure.ts @@ -11,7 +11,7 @@ class Azure extends OpenAI { constructor(options: LLMOptions) { super(options); - this.engine = options.model; + this.deployment = options.deployment ?? options.model; } } diff --git a/core/llm/llms/OpenAI.ts b/core/llm/llms/OpenAI.ts index 9366a7954..5ebeb24ec 100644 --- a/core/llm/llms/OpenAI.ts +++ b/core/llm/llms/OpenAI.ts @@ -166,7 +166,7 @@ class OpenAI extends BaseLLM { ) { if (this.apiType === "azure") { return new URL( - `openai/deployments/${this.engine}/${endpoint}?api-version=${this.apiVersion}`, + `openai/deployments/${this.deployment}/${endpoint}?api-version=${this.apiVersion}`, this.apiBase, ); } diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 2011a62cb..9a75a8217 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -14,7 +14,7 @@ We recommend configuring **GPT-4o** as your chat model. "apiType": "azure", // Needed to construct Azure-style URL "model": "gpt-4o", "apiBase": "", - "engine": "", // Your deployment, eg "gpt4o-beta" + "deployment": "", // Your deployment, eg "gpt4o-beta" "apiVersion": "", // Typically a date like "2024-06-01" "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] @@ -31,7 +31,7 @@ We recommend configuring **Codestral** as your autocomplete model. "apiType": "azure", // Needed to construct Azure-style URL "model": "codestral-latest", "apiBase": "", - "engine": "", // Your deployment, eg "codestral-small" + "deployment": "", // Your deployment, eg "codestral-small" "apiVersion": "", // Typically a date like "2024-06-01" "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] @@ -47,7 +47,7 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. "apiType": "azure", // Needed to construct Azure-style URL "model": "text-embedding-3-large", "apiBase": "", - "engine": "", // Your deployment, eg "codestral-small" + "deployment": "", // Your deployment, eg "codestral-small" "apiVersion": "", // Typically a date like "2024-06-01" "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] @@ -71,15 +71,16 @@ You need to apply for access to the Azure OpenAI service. Response times are typ ## General model configuration -Azure OpenAI requires a handful of additional parameters to be configured, such as a model engine and API version. +Azure OpenAI requires a handful of additional parameters to be configured, such as a deployment name and API version. To find this information in _Azure AI Studio_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_. For example, a Target URI of: -``` + +```````````` https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``````````` ****************** -``` + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``````````` ****************** +```````````` would map to the following: @@ -90,7 +91,7 @@ would map to the following: "provider": "openai", "apiType": "azure", "apiBase": "https://just-an-example.openai.azure.com", - "engine": "gpt-4o-july", + "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", "apiKey": "" } diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 3f340f6ce..ca8052c4e 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -350,9 +350,9 @@ "description": "Azure OpenAI API version (e.g. 2023-07-01-preview)", "type": "string" }, - "engine": { - "title": "Engine", - "description": "Azure OpenAI engine", + "deployment": { + "title": "Deployment", + "description": "Azure OpenAI deployment", "type": "string" }, "capabilities": { @@ -447,7 +447,7 @@ }, "then": { "properties": { - "engine": { + "deployment": { "type": "string" }, "apiType": { @@ -1105,7 +1105,7 @@ "required": ["apiType"] }, "then": { - "required": ["engine", "apiVersion", "apiBase"] + "required": ["deployment", "apiBase"] } }, { diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 155905fbc..532d1b912 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -1,10 +1,10 @@ import { ModelProvider } from "core"; import { HTMLInputTypeAttribute } from "react"; +import { ModelProviderTags } from "../../../components/modelSelection/utils"; import { FREE_TRIAL_LIMIT_REQUESTS } from "../../../util/freeTrial"; import { completionParamsInputs } from "./completionParamsInputs"; import type { ModelPackage } from "./models"; import { models } from "./models"; -import { ModelProviderTags } from "../../../components/modelSelection/utils"; export interface InputDescriptor { inputType: HTMLInputTypeAttribute; @@ -132,7 +132,7 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n packages: [models.gpt4o], params: { apiKey: "", - engine: "", + deployment: "", apiBase: "", apiVersion: "", apiType: "azure", @@ -147,9 +147,9 @@ Select the \`GPT-4o\` model below to complete your provider configuration, but n }, { inputType: "text", - key: "engine", - label: "Engine", - placeholder: "Enter the engine name", + key: "deployment", + label: "Deployment", + placeholder: "Enter the deployment name", required: true, }, { ...apiBaseInput, required: true }, @@ -512,7 +512,7 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo label: "watsonx API version", placeholder: "Enter the API Version", defaultValue: "2023-05-29", - required: true + required: true, }, { inputType: "text", diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index 14ff2b4bd..9314b2996 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -110,7 +110,7 @@ export const embeddingsProviderSchema = z.object({ apiBase: z.string().optional(), apiKey: z.string().optional(), model: z.string().optional(), - engine: z.string().optional(), + deployment: z.string().optional(), apiType: z.string().optional(), apiVersion: z.string().optional(), requestOptions: requestOptionsSchema.optional(), From 9fc556c3ed79a167932a06d5ea7a2eafc21cedfd Mon Sep 17 00:00:00 2001 From: Vadim Zhamkov Date: Fri, 25 Oct 2024 18:06:01 +0200 Subject: [PATCH 07/17] Add Nebius provider --- core/config/types.ts | 6 +- core/control-plane/schema.ts | 2 + core/index.d.ts | 18 +++--- .../embeddings/NebiusEmbeddingsProvider.ts | 13 ++++ core/indexing/embeddings/index.ts | 2 + core/llm/autodetect.ts | 1 + core/llm/llms/Nebius.ts | 12 ++++ core/llm/llms/index.ts | 2 + .../src/main/resources/config_schema.json | 9 ++- extensions/vscode/config_schema.json | 9 ++- extensions/vscode/continue_rc_schema.json | 9 ++- gui/public/logos/nebius.png | Bin 0 -> 4706 bytes gui/src/pages/AddNewModel/configs/models.ts | 60 +++++++++++++++++- .../pages/AddNewModel/configs/providers.ts | 24 +++++++ packages/config-types/src/index.ts | 2 + 15 files changed, 148 insertions(+), 21 deletions(-) create mode 100644 core/indexing/embeddings/NebiusEmbeddingsProvider.ts create mode 100644 core/llm/llms/Nebius.ts create mode 100644 gui/public/logos/nebius.png diff --git a/core/config/types.ts b/core/config/types.ts index 0caf0e12e..48b859a43 100644 --- a/core/config/types.ts +++ b/core/config/types.ts @@ -598,7 +598,8 @@ declare global { | "watsonx" | "openrouter" | "sambanova" - | "nvidia"; + | "nvidia" + | "nebius"; export type ModelName = | "AUTODETECT" @@ -765,7 +766,8 @@ declare global { | "continue-proxy" | "deepinfra" | "voyage" - | "watsonx"; + | "watsonx" + | "nebius"; export interface EmbedOptions { apiBase?: string; diff --git a/core/control-plane/schema.ts b/core/control-plane/schema.ts index 756798937..2cefe9592 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -16,6 +16,7 @@ const modelDescriptionSchema = z.object({ "sagemaker", "cloudflare", "azure", + "nebius", ]), model: z.string(), apiKey: z.string().optional(), @@ -81,6 +82,7 @@ const embeddingsProviderSchema = z.object({ "cohere", "free-trial", "gemini", + "nebius", ]), apiBase: z.string().optional(), apiKey: z.string().optional(), diff --git a/core/index.d.ts b/core/index.d.ts index 2cc9dc56a..e72482a7b 100644 --- a/core/index.d.ts +++ b/core/index.d.ts @@ -48,9 +48,9 @@ export interface IndexingProgressUpdate { export type PromptTemplate = | string | (( - history: ChatMessage[], - otherData: Record, - ) => string | ChatMessage[]); + history: ChatMessage[], + otherData: Record, + ) => string | ChatMessage[]); export interface ILLM extends LLMOptions { get providerName(): ModelProvider; @@ -647,7 +647,8 @@ type ModelProvider = | "vllm" | "mock" | "cerebras" - | "askSage"; + | "askSage" + | "nebius"; export type ModelName = | "AUTODETECT" @@ -830,7 +831,8 @@ export type EmbeddingsProviderName = | "voyage" | "mistral" | "vertex" - | "watsonx"; + | "watsonx" + | "nebius"; export interface EmbedOptions { apiBase?: string; @@ -1053,9 +1055,9 @@ export interface Config { embeddingsProvider?: EmbeddingsProviderDescription | EmbeddingsProvider; /** The model that Continue will use for tab autocompletions. */ tabAutocompleteModel?: - | CustomLLM - | ModelDescription - | (CustomLLM | ModelDescription)[]; + | CustomLLM + | ModelDescription + | (CustomLLM | ModelDescription)[]; /** Options for tab autocomplete */ tabAutocompleteOptions?: Partial; /** UI styles customization */ diff --git a/core/indexing/embeddings/NebiusEmbeddingsProvider.ts b/core/indexing/embeddings/NebiusEmbeddingsProvider.ts new file mode 100644 index 000000000..4bf20e868 --- /dev/null +++ b/core/indexing/embeddings/NebiusEmbeddingsProvider.ts @@ -0,0 +1,13 @@ +import { EmbeddingsProviderName, EmbedOptions } from "../.."; +import OpenAIEmbeddingsProvider from "./OpenAIEmbeddingsProvider"; + +class NebiusEmbeddingsProvider extends OpenAIEmbeddingsProvider { + static providerName: EmbeddingsProviderName = "nebius"; + + static defaultOptions: Partial | undefined = { + apiBase: "https://api.studio.nebius.ai/v1/", + model: "BAAI/bge-en-icl", + }; +} + +export default NebiusEmbeddingsProvider; diff --git a/core/indexing/embeddings/index.ts b/core/indexing/embeddings/index.ts index 64fa6bf48..a7931287e 100644 --- a/core/indexing/embeddings/index.ts +++ b/core/indexing/embeddings/index.ts @@ -16,6 +16,7 @@ import NvidiaEmbeddingsProvider from "./NvidiaEmbeddingsProvider.js"; import VoyageEmbeddingsProvider from "./VoyageEmbeddingsProvider.js"; import VertexEmbeddingsProvider from "./VertexEmbeddingsProvider.js"; import WatsonxEmbeddingsProvider from "./WatsonxEmbeddingsProvider.js"; +import NebiusEmbeddingsProvider from "./NebiusEmbeddingsProvider.js"; type EmbeddingsProviderConstructor = new ( ...args: any[] @@ -41,4 +42,5 @@ export const allEmbeddingsProviders: Record< mistral: MistralEmbeddingsProvider, vertex: VertexEmbeddingsProvider, watsonx: WatsonxEmbeddingsProvider, + nebius: NebiusEmbeddingsProvider, }; diff --git a/core/llm/autodetect.ts b/core/llm/autodetect.ts index 18464f155..1e3207c21 100644 --- a/core/llm/autodetect.ts +++ b/core/llm/autodetect.ts @@ -124,6 +124,7 @@ const PARALLEL_PROVIDERS: ModelProvider[] = [ "replicate", "together", "sambanova", + "nebius", ]; function llmCanGenerateInParallel( diff --git a/core/llm/llms/Nebius.ts b/core/llm/llms/Nebius.ts new file mode 100644 index 000000000..4e2b56721 --- /dev/null +++ b/core/llm/llms/Nebius.ts @@ -0,0 +1,12 @@ +import { LLMOptions, ModelProvider } from "../.."; +import OpenAI from "./OpenAI"; + +class Nebius extends OpenAI { + static providerName: ModelProvider = "nvidia"; + static defaultOptions: Partial = { + apiBase: "https://api.studio.nebius.ai/v1/", + useLegacyCompletionsEndpoint: false, + }; +} + +export default Nebius; diff --git a/core/llm/llms/index.ts b/core/llm/llms/index.ts index 27e1a31b9..0c1a465b0 100644 --- a/core/llm/llms/index.ts +++ b/core/llm/llms/index.ts @@ -33,6 +33,7 @@ import Mistral from "./Mistral"; import MistralVertexAI from "./MistralVertexAI"; import Mock from "./Mock"; import Msty from "./Msty"; +import Nebius from "./Nebius"; import Nvidia from "./Nvidia"; import Ollama from "./Ollama"; import OpenAI from "./OpenAI"; @@ -87,6 +88,7 @@ const LLMs = [ Mock, Cerebras, Asksage, + Nebius, ]; export async function llmFromDescription( diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index 173292611..31c341961 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -199,7 +199,8 @@ "nvidia", "vllm", "cerebras", - "askSage" + "askSage", + "nebius" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -459,7 +460,8 @@ "replicate", "together", "cloudflare", - "sambanova" + "sambanova", + "nebius" ] } }, @@ -2479,7 +2481,8 @@ "nvidia", "bedrock", "sagemaker", - "vertex" + "vertex", + "nebius" ] }, "model": { diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 173292611..31c341961 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -199,7 +199,8 @@ "nvidia", "vllm", "cerebras", - "askSage" + "askSage", + "nebius" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -459,7 +460,8 @@ "replicate", "together", "cloudflare", - "sambanova" + "sambanova", + "nebius" ] } }, @@ -2479,7 +2481,8 @@ "nvidia", "bedrock", "sagemaker", - "vertex" + "vertex", + "nebius" ] }, "model": { diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index 1c1610446..6f7a41730 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -202,7 +202,8 @@ "nvidia", "vllm", "cerebras", - "askSage" + "askSage", + "nebius" ], "markdownEnumDescriptions": [ "### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)", @@ -471,7 +472,8 @@ "replicate", "together", "cloudflare", - "sambanova" + "sambanova", + "nebius" ] } }, @@ -2784,7 +2786,8 @@ "nvidia", "bedrock", "sagemaker", - "vertex" + "vertex", + "nebius" ] }, "model": { diff --git a/gui/public/logos/nebius.png b/gui/public/logos/nebius.png new file mode 100644 index 0000000000000000000000000000000000000000..05510a7efc8aa825aa7884d7b8cc9c0b3eaa17fe GIT binary patch literal 4706 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 Date: Thu, 31 Oct 2024 16:49:03 +0000 Subject: [PATCH 08/17] Remove merge artefact --- extensions/intellij/src/main/resources/webview/index.html | 1 - 1 file changed, 1 deletion(-) diff --git a/extensions/intellij/src/main/resources/webview/index.html b/extensions/intellij/src/main/resources/webview/index.html index dc4a91a3e..be67d62c9 100644 --- a/extensions/intellij/src/main/resources/webview/index.html +++ b/extensions/intellij/src/main/resources/webview/index.html @@ -1,4 +1,3 @@ -@@ -1,18 +0,0 @@ From 662261faeb472498942e53f6cf524041c5ab786d Mon Sep 17 00:00:00 2001 From: Adam Shedivy Date: Thu, 31 Oct 2024 11:53:46 -0500 Subject: [PATCH 09/17] add granite 3 models --- docs/package-lock.json | 144 ------------------ .../src/main/resources/config_schema.json | 5 + extensions/vscode/config_schema.json | 11 +- extensions/vscode/continue_rc_schema.json | 5 + extensions/vscode/package-lock.json | 4 +- extensions/vscode/package.json | 4 +- gui/src/pages/AddNewModel/configs/models.ts | 24 +++ .../pages/AddNewModel/configs/providers.ts | 2 + 8 files changed, 45 insertions(+), 154 deletions(-) diff --git a/docs/package-lock.json b/docs/package-lock.json index 7b89d26f0..5062e2353 100644 --- a/docs/package-lock.json +++ b/docs/package-lock.json @@ -13,7 +13,6 @@ "@docusaurus/preset-classic": "^3.5.2", "@mdx-js/react": "^3.0.0", "clsx": "^2.1.0", - "docusaurus-json-schema-plugin": "^1.11.0", "prism-react-renderer": "^2.3.1", "react": "^18.2.0", "react-dom": "^18.2.0" @@ -3145,70 +3144,6 @@ "micromark-util-symbol": "^1.0.1" } }, - "node_modules/@stoplight/json": { - "version": "3.21.0", - "resolved": "https://registry.npmjs.org/@stoplight/json/-/json-3.21.0.tgz", - "integrity": "sha512-5O0apqJ/t4sIevXCO3SBN9AHCEKKR/Zb4gaj7wYe5863jme9g02Q0n/GhM7ZCALkL+vGPTe4ZzTETP8TFtsw3g==", - "dependencies": { - "@stoplight/ordered-object-literal": "^1.0.3", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^13.6.0", - "jsonc-parser": "~2.2.1", - "lodash": "^4.17.21", - "safe-stable-stringify": "^1.1" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "node_modules/@stoplight/json-ref-resolver": { - "version": "3.1.6", - "resolved": "https://registry.npmjs.org/@stoplight/json-ref-resolver/-/json-ref-resolver-3.1.6.tgz", - "integrity": "sha512-YNcWv3R3n3U6iQYBsFOiWSuRGE5su1tJSiX6pAPRVk7dP0L7lqCteXGzuVRQ0gMZqUl8v1P0+fAKxF6PLo9B5A==", - "dependencies": { - "@stoplight/json": "^3.21.0", - "@stoplight/path": "^1.3.2", - "@stoplight/types": "^12.3.0 || ^13.0.0", - "@types/urijs": "^1.19.19", - "dependency-graph": "~0.11.0", - "fast-memoize": "^2.5.2", - "immer": "^9.0.6", - "lodash": "^4.17.21", - "tslib": "^2.6.0", - "urijs": "^1.19.11" - }, - "engines": { - "node": ">=8.3.0" - } - }, - "node_modules/@stoplight/ordered-object-literal": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/@stoplight/ordered-object-literal/-/ordered-object-literal-1.0.5.tgz", - "integrity": "sha512-COTiuCU5bgMUtbIFBuyyh2/yVVzlr5Om0v5utQDgBCuQUOPgU1DwoffkTfg4UBQOvByi5foF4w4T+H9CoRe5wg==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@stoplight/path": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/@stoplight/path/-/path-1.3.2.tgz", - "integrity": "sha512-lyIc6JUlUA8Ve5ELywPC8I2Sdnh1zc1zmbYgVarhXIp9YeAB0ReeqmGEOWNtlHkbP2DAA1AL65Wfn2ncjK/jtQ==", - "engines": { - "node": ">=8" - } - }, - "node_modules/@stoplight/types": { - "version": "13.20.0", - "resolved": "https://registry.npmjs.org/@stoplight/types/-/types-13.20.0.tgz", - "integrity": "sha512-2FNTv05If7ib79VPDA/r9eUet76jewXFH2y2K5vuge6SXbRHtWBhcaRmu+6QpF4/WRNoJj5XYRSwLGXDxysBGA==", - "dependencies": { - "@types/json-schema": "^7.0.4", - "utility-types": "^3.10.0" - }, - "engines": { - "node": "^12.20 || >=14.13" - } - }, "node_modules/@svgr/babel-plugin-add-jsx-attribute": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/@svgr/babel-plugin-add-jsx-attribute/-/babel-plugin-add-jsx-attribute-8.0.0.tgz", @@ -3802,11 +3737,6 @@ "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.2.tgz", "integrity": "sha512-dqId9J8K/vGi5Zr7oo212BGii5m3q5Hxlkwy3WpYuKPklmBEvsbMYYyLxAQpSffdLl/gdW0XUpKWFvYmyoWCoQ==" }, - "node_modules/@types/urijs": { - "version": "1.19.25", - "resolved": "https://registry.npmjs.org/@types/urijs/-/urijs-1.19.25.tgz", - "integrity": "sha512-XOfUup9r3Y06nFAZh3WvO0rBU4OtlfPB/vgxpjg+NRdGU6CN6djdc6OEiH+PcqHCY6eFLo9Ista73uarf4gnBg==" - }, "node_modules/@types/ws": { "version": "8.5.10", "resolved": "https://registry.npmjs.org/@types/ws/-/ws-8.5.10.tgz", @@ -5725,14 +5655,6 @@ "node": ">= 0.8" } }, - "node_modules/dependency-graph": { - "version": "0.11.0", - "resolved": "https://registry.npmjs.org/dependency-graph/-/dependency-graph-0.11.0.tgz", - "integrity": "sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==", - "engines": { - "node": ">= 0.6.0" - } - }, "node_modules/dequal": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", @@ -5831,22 +5753,6 @@ "node": ">=6" } }, - "node_modules/docusaurus-json-schema-plugin": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/docusaurus-json-schema-plugin/-/docusaurus-json-schema-plugin-1.11.0.tgz", - "integrity": "sha512-Nd2WCoO4+Ke0fDOltdlaLwGmseCRMBuDxZd+QsaPCwJbogvNggBIEqFwFpRxlW+rIOTqB7ayeZ0jS0SFHn27fA==", - "dependencies": { - "@stoplight/json-ref-resolver": "^3.1.5", - "monaco-editor": "^0.44.0", - "monaco-editor-webpack-plugin": "^7.0.1", - "react-monaco-editor": "^0.55.0" - }, - "peerDependencies": { - "@docusaurus/core": "^3.0.0", - "@docusaurus/theme-classic": "^3.0.0", - "react": ">=17 <= 18" - } - }, "node_modules/dom-converter": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/dom-converter/-/dom-converter-0.2.0.tgz", @@ -6393,11 +6299,6 @@ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==" }, - "node_modules/fast-memoize": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/fast-memoize/-/fast-memoize-2.5.2.tgz", - "integrity": "sha512-Ue0LwpDYErFbmNnZSF0UH6eImUwDmogUO1jyE+JbN2gsQz/jICm1Ve7t9QT0rNSsfJt+Hs4/S3GnsDVjL4HVrw==" - }, "node_modules/fast-url-parser": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/fast-url-parser/-/fast-url-parser-1.1.3.tgz", @@ -8188,11 +8089,6 @@ "node": ">=6" } }, - "node_modules/jsonc-parser": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-2.2.1.tgz", - "integrity": "sha512-o6/yDBYccGvTz1+QFevz6l6OBZ2+fMVu2JZ9CIhzsYRX4mjaK5IyX9eldUdCmga16zlgQxyrj5pt9kzuj2C02w==" - }, "node_modules/jsonfile": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.1.0.tgz", @@ -10599,23 +10495,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/monaco-editor": { - "version": "0.44.0", - "resolved": "https://registry.npmjs.org/monaco-editor/-/monaco-editor-0.44.0.tgz", - "integrity": "sha512-5SmjNStN6bSuSE5WPT2ZV+iYn1/yI9sd4Igtk23ChvqB7kDk9lZbB9F5frsuvpB+2njdIeGGFf2G4gbE6rCC9Q==" - }, - "node_modules/monaco-editor-webpack-plugin": { - "version": "7.1.0", - "resolved": "https://registry.npmjs.org/monaco-editor-webpack-plugin/-/monaco-editor-webpack-plugin-7.1.0.tgz", - "integrity": "sha512-ZjnGINHN963JQkFqjjcBtn1XBtUATDZBMgNQhDQwd78w2ukRhFXAPNgWuacaQiDZsUr4h1rWv5Mv6eriKuOSzA==", - "dependencies": { - "loader-utils": "^2.0.2" - }, - "peerDependencies": { - "monaco-editor": ">= 0.31.0", - "webpack": "^4.5.0 || 5.x" - } - }, "node_modules/mrmime": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-2.0.0.tgz", @@ -12273,19 +12152,6 @@ "webpack": ">=4.41.1 || 5.x" } }, - "node_modules/react-monaco-editor": { - "version": "0.55.0", - "resolved": "https://registry.npmjs.org/react-monaco-editor/-/react-monaco-editor-0.55.0.tgz", - "integrity": "sha512-GdEP0Q3Rn1dczfKEEyY08Nes5plWwIYU4sWRBQO0+jsQWQsKMHKCC6+hPRwR7G/4aA3V/iU9jSmWPzVJYMVFSQ==", - "dependencies": { - "prop-types": "^15.8.1" - }, - "peerDependencies": { - "@types/react": ">=16 <= 18", - "monaco-editor": "^0.44.0", - "react": ">=16 <= 18" - } - }, "node_modules/react-router": { "version": "5.3.4", "resolved": "https://registry.npmjs.org/react-router/-/react-router-5.3.4.tgz", @@ -12872,11 +12738,6 @@ } ] }, - "node_modules/safe-stable-stringify": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-1.1.1.tgz", - "integrity": "sha512-ERq4hUjKDbJfE4+XtZLFPCDi8Vb1JqaxAPTxWFLBx8XcAlf9Bda/ZJdVezs/NAfsMQScyIlUMx+Yeu7P7rx5jw==" - }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -14234,11 +14095,6 @@ "node": ">=6" } }, - "node_modules/urijs": { - "version": "1.19.11", - "resolved": "https://registry.npmjs.org/urijs/-/urijs-1.19.11.tgz", - "integrity": "sha512-HXgFDgDommxn5/bIv0cnQZsPhHDA90NPHD6+c/v21U5+Sx5hoP8+dP9IZXBU1gIfvdRfhG8cel9QNPeionfcCQ==" - }, "node_modules/url-loader": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/url-loader/-/url-loader-4.1.1.tgz", diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index f911def9e..654cef0bb 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1561,6 +1561,11 @@ "enum": [ "ibm/granite-13b-chat-v2", "ibm/granite-20b-code-instruct", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", + "ibm/granite-34b-code-instruct", + "ibm/granite-3-8b-instruct", + "ibm/granite-3-2b-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 40f7322f2..fc059d6d8 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1561,6 +1561,11 @@ "enum": [ "ibm/granite-13b-chat-v2", "ibm/granite-20b-code-instruct", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", + "ibm/granite-34b-code-instruct", + "ibm/granite-3-8b-instruct", + "ibm/granite-3-2b-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" @@ -3120,16 +3125,10 @@ "properties": { "provider": { "type": "string", -<<<<<<< HEAD - "enum": [ - "posthog" - ], -======= "enum": [ "posthog", "logstash" ], ->>>>>>> 6e622157f1a727ba54d3bc22b337079e832c7556 "description": "The 3rd party analytics provider to use.", "default": "posthog", "markdownEnumDescriptions": [ diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index dc9e111ba..a1084f704 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1561,6 +1561,11 @@ "enum": [ "ibm/granite-13b-chat-v2", "ibm/granite-20b-code-instruct", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", + "ibm/granite-34b-code-instruct", + "ibm/granite-3-8b-instruct", + "ibm/granite-3-2b-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" diff --git a/extensions/vscode/package-lock.json b/extensions/vscode/package-lock.json index 7ebbfdcff..ab1d53f6e 100644 --- a/extensions/vscode/package-lock.json +++ b/extensions/vscode/package-lock.json @@ -1,12 +1,12 @@ { "name": "continue", - "version": "0.9.222", + "version": "0.9.223", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "continue", - "version": "0.9.222", + "version": "0.9.223", "license": "Apache-2.0", "dependencies": { "@electron/rebuild": "^3.2.10", diff --git a/extensions/vscode/package.json b/extensions/vscode/package.json index 8856dd61e..5a1385014 100644 --- a/extensions/vscode/package.json +++ b/extensions/vscode/package.json @@ -2,7 +2,7 @@ "name": "continue", "icon": "media/icon.png", "author": "Continue Dev, Inc", - "version": "0.9.222", + "version": "0.9.223", "repository": { "type": "git", "url": "https://github.com/continuedev/continue" @@ -606,4 +606,4 @@ "ws": "^8.13.0", "yarn": "^1.22.21" } -} \ No newline at end of file +} diff --git a/gui/src/pages/AddNewModel/configs/models.ts b/gui/src/pages/AddNewModel/configs/models.ts index 9e232cd16..92adcee72 100644 --- a/gui/src/pages/AddNewModel/configs/models.ts +++ b/gui/src/pages/AddNewModel/configs/models.ts @@ -866,6 +866,30 @@ export const models: { [key: string]: ModelPackage } = { icon: "WatsonX.png", isOpenSource: false, }, + granite3Instruct8b: { + title: "Granite 3.0 8b Instruct", + description: "The Granite model series is a family of IBM-trained, dense decoder-only models, which are particularly well-suited for generative tasks.", + params: { + model: "ibm/granite-3-8b-instruct", + contextLength: 8_000, + title: "Granite 3.0 8b Instruct" + }, + providerOptions: ["watsonx"], + icon: "WatsonX.png", + isOpenSource: false + }, + granite3Instruct2b: { + title: "Granite 3.0 2b Instruct", + description: "The Granite model series is a family of IBM-trained, dense decoder-only models, which are particularly well-suited for generative tasks.", + params: { + model: "ibm/granite-3-2b-instruct", + contextLength: 2_000, + title: "Granite 3.0 2b Instruct" + }, + providerOptions: ["watsonx"], + icon: "WatsonX.png", + isOpenSource: false + }, MistralLarge: { title: "Mistral Large", description: diff --git a/gui/src/pages/AddNewModel/configs/providers.ts b/gui/src/pages/AddNewModel/configs/providers.ts index 8ea259556..88fe3158e 100644 --- a/gui/src/pages/AddNewModel/configs/providers.ts +++ b/gui/src/pages/AddNewModel/configs/providers.ts @@ -530,6 +530,8 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo icon: "WatsonX.png", tags: [ModelProviderTags.RequiresApiKey], packages: [ + models.granite3Instruct8b, + models.granite3Instruct2b, models.graniteCode3b, models.graniteCode8b, models.graniteCode20b, From 7a78e1610c2fb4091f3bc0945848d9c944a46da0 Mon Sep 17 00:00:00 2001 From: mq200 Date: Thu, 31 Oct 2024 10:56:58 -0700 Subject: [PATCH 10/17] reapply watsonx config updates after overwrite by later commit --- .../src/main/resources/config_schema.json | 21 ++++++++------- extensions/vscode/config_schema.json | 27 ++++++++----------- extensions/vscode/continue_rc_schema.json | 21 ++++++++------- 3 files changed, 33 insertions(+), 36 deletions(-) diff --git a/extensions/intellij/src/main/resources/config_schema.json b/extensions/intellij/src/main/resources/config_schema.json index f911def9e..b18eddf2a 100644 --- a/extensions/intellij/src/main/resources/config_schema.json +++ b/extensions/intellij/src/main/resources/config_schema.json @@ -1539,28 +1539,28 @@ }, "then": { "properties": { - "watsonxUrl": { + "apiBase": { "type": "string" }, - "watsonxApiKey": { + "apiKey": { "type": "string" }, - "watsonxApiVersion": { + "apiVersion": { "type": "string" }, - "watsonxProjectId": { + "projectId": { "type": "string" }, - "watsonxStopToken": { - "type": "string" - }, - "watsonxFullUrl": { + "deploymentId": { "type": "string" }, "model": { "enum": [ "ibm/granite-13b-chat-v2", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", "ibm/granite-20b-code-instruct", + "ibm/granite-34b-code-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" @@ -1568,8 +1568,9 @@ } }, "required": [ - "watsonxUrl", - "watsonxProjectId" + "apiBase", + "apiKey", + "apiVersion" ] } }, diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 40f7322f2..754448310 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -1539,28 +1539,28 @@ }, "then": { "properties": { - "watsonxUrl": { + "apiBase": { "type": "string" }, - "watsonxApiKey": { + "apiKey": { "type": "string" }, - "watsonxApiVersion": { + "apiVersion": { "type": "string" }, - "watsonxProjectId": { + "projectId": { "type": "string" }, - "watsonxStopToken": { - "type": "string" - }, - "watsonxFullUrl": { + "deploymentId": { "type": "string" }, "model": { "enum": [ "ibm/granite-13b-chat-v2", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", "ibm/granite-20b-code-instruct", + "ibm/granite-34b-code-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" @@ -1568,8 +1568,9 @@ } }, "required": [ - "watsonxUrl", - "watsonxProjectId" + "apiBase", + "apiKey", + "apiVersion" ] } }, @@ -3120,16 +3121,10 @@ "properties": { "provider": { "type": "string", -<<<<<<< HEAD - "enum": [ - "posthog" - ], -======= "enum": [ "posthog", "logstash" ], ->>>>>>> 6e622157f1a727ba54d3bc22b337079e832c7556 "description": "The 3rd party analytics provider to use.", "default": "posthog", "markdownEnumDescriptions": [ diff --git a/extensions/vscode/continue_rc_schema.json b/extensions/vscode/continue_rc_schema.json index dc9e111ba..e3ac1b0ea 100644 --- a/extensions/vscode/continue_rc_schema.json +++ b/extensions/vscode/continue_rc_schema.json @@ -1539,28 +1539,28 @@ }, "then": { "properties": { - "watsonxUrl": { + "apiBase": { "type": "string" }, - "watsonxApiKey": { + "apiKey": { "type": "string" }, - "watsonxApiVersion": { + "apiVersion": { "type": "string" }, - "watsonxProjectId": { + "projectId": { "type": "string" }, - "watsonxStopToken": { - "type": "string" - }, - "watsonxFullUrl": { + "deploymentId": { "type": "string" }, "model": { "enum": [ "ibm/granite-13b-chat-v2", + "ibm/granite-3b-code-instruct", + "ibm/granite-8b-code-instruct", "ibm/granite-20b-code-instruct", + "ibm/granite-34b-code-instruct", "mistralai/mistral-large", "meta-llama/llama-3-8b-instruct", "meta-llama/llama-3-70b-instruct" @@ -1568,8 +1568,9 @@ } }, "required": [ - "watsonxUrl", - "watsonxProjectId" + "apiBase", + "apiKey", + "apiVersion" ] } }, From 146db25a6b5d051ea8eb7c9b157a45aeaaf6075f Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 31 Oct 2024 12:27:08 -0700 Subject: [PATCH 11/17] fix rc config json factory jetbrains --- .../continue/ConfigJsonSchemaProviderFactory.kt | 2 +- ...ctory copy.kt => ConfigRcJsonSchemaProviderFactory.kt} | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) rename extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/{ConfigRcJsonSchemaProviderFactory copy.kt => ConfigRcJsonSchemaProviderFactory.kt} (88%) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt index d10499331..c303b26fb 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigJsonSchemaProviderFactory.kt @@ -22,7 +22,7 @@ class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { override fun isAvailable(file: VirtualFile): Boolean { - return path.endsWith("/.continue/config.json") || file.name == ".continuerc.json" + return path.endsWith("/.continue/config.json") } override fun getName(): String { diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory.kt similarity index 88% rename from extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt rename to extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory.kt index 763033d7e..76e166202 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory copy.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/continue/ConfigRcJsonSchemaProviderFactory.kt @@ -14,19 +14,19 @@ import java.io.IOException import java.nio.charset.StandardCharsets import java.nio.file.Paths -class ConfigJsonSchemaProviderFactory : JsonSchemaProviderFactory { +class ConfigRcJsonSchemaProviderFactory : JsonSchemaProviderFactory { override fun getProviders(project: Project): MutableList { - return mutableListOf(ConfigJsonSchemaFileProvider()) + return mutableListOf(ConfigRcJsonSchemaFileProvider()) } } -class ConfigJsonSchemaFileProvider : JsonSchemaFileProvider { +class ConfigRcJsonSchemaFileProvider : JsonSchemaFileProvider { override fun isAvailable(file: VirtualFile): Boolean { return file.name == ".continuerc.json" } override fun getName(): String { - return "config.json" + return ".continuerc.json" } override fun getSchemaFile(): VirtualFile? { From c2157a410bbd858056331ea077115c483b88f735 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 31 Oct 2024 12:30:51 -0700 Subject: [PATCH 12/17] update azure.md --- .../embeddings/OpenAIEmbeddingsProvider.ts | 1 + .../model-providers/top-level/azure.md | 25 ++++++------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts b/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts index dc18129b4..95308bbd9 100644 --- a/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts +++ b/core/indexing/embeddings/OpenAIEmbeddingsProvider.ts @@ -12,6 +12,7 @@ class OpenAIEmbeddingsProvider extends BaseEmbeddingsProvider { static defaultOptions: Partial | undefined = { apiBase: "https://api.openai.com/v1/", model: "text-embedding-3-small", + apiVersion: "2024-02-15-preview", }; private _getEndpoint() { diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index 266cbbb0b..edd890d37 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -18,13 +18,11 @@ We recommend configuring **GPT-4o** as your chat model. ```json title="config.json" "models": [{ "title": "GPT-4o", - "provider": "openai", // As of Oct 15, "azure" isn't recognized - "apiType": "azure", // Needed to construct Azure-style URL + "provider": "azure", "model": "gpt-4o", "apiBase": "", - "deployment": "", // Your deployment, eg "gpt4o-beta" - "apiVersion": "", // Typically a date like "2024-06-01" - "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey + "deployment": "", + "apiKey": "" // If you use subscription key, try using Azure gateway to rename it apiKey }] ``` @@ -44,11 +42,10 @@ We recommend configuring **text-embedding-3-large** as your embeddings model. ```json title="config.json" "embeddingsProvider": { - "provider": "azure", + "provider": "openai", "model": "text-embedding-3-large", "apiBase": "", - "engine": "", - "apiVersion": "", + "deployment": "", "apiType": "azure", "apiKey": "" } @@ -72,25 +69,17 @@ You need to apply for access to the Azure OpenAI service. Response times are typ ## General model configuration -Azure OpenAI requires a handful of additional parameters to be configured, such as a deployment name and API version. +Azure OpenAI requires a handful of additional parameters to be configured, such as a deployment name and API base URL. To find this information in _Azure AI Studio_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_. -For example, a Target URI of: - -```````````` -https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ ``````````` ****************** -```````````` - -would map to the following: +For example, a Target URI of `https://just-an-example.openai.azure.com/openai/deployments/gpt-4o-july/chat/completions?api-version=2023-03-15-preview` would map to the following: ```json { "title": "GPT-4o Azure", "model": "gpt-4o", "provider": "openai", - "apiType": "azure", "apiBase": "https://just-an-example.openai.azure.com", "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", From c89bb3cb0c5c2c6c2e8ed7c13105186de47bcdd9 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 31 Oct 2024 13:43:19 -0700 Subject: [PATCH 13/17] remove format param --- core/llm/llms/Ollama.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/llm/llms/Ollama.ts b/core/llm/llms/Ollama.ts index 604c382b6..91d7976b7 100644 --- a/core/llm/llms/Ollama.ts +++ b/core/llm/llms/Ollama.ts @@ -228,7 +228,7 @@ class Ollama extends BaseLLM { options: this._getModelFileParams(options), keep_alive: options.keepAlive ?? 60 * 30, // 30 minutes stream: options.stream, - format: "json", + // format: options.format, // Not currently in base completion options }; } @@ -245,8 +245,7 @@ class Ollama extends BaseLLM { options: this._getModelFileParams(options), keep_alive: options.keepAlive ?? 60 * 30, // 30 minutes stream: options.stream, - format: "json" - // Not supported yet: context, images, system, template + // Not supported yet: context, images, system, template, format }; } From b791d43a3b85785259e9257efec8652f4b40acd5 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 31 Oct 2024 16:42:44 -0700 Subject: [PATCH 14/17] use most recent template examples --- core/autocomplete/README.md | 2 +- docs/docs/customize/deep-dives/autocomplete.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/core/autocomplete/README.md b/core/autocomplete/README.md index e19509bd8..c02be2b01 100644 --- a/core/autocomplete/README.md +++ b/core/autocomplete/README.md @@ -120,7 +120,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### I want better completions, should I use GPT-4? -Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/d2bc6359e8ebf647892ec953e418042dc7f8a685/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. +Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. ### I'm not seeing any completions diff --git a/docs/docs/customize/deep-dives/autocomplete.md b/docs/docs/customize/deep-dives/autocomplete.md index f945d79d4..9e406416d 100644 --- a/docs/docs/customize/deep-dives/autocomplete.md +++ b/docs/docs/customize/deep-dives/autocomplete.md @@ -93,7 +93,7 @@ This object allows you to customize the behavior of tab-autocomplete. The availa ### I want better completions, should I use GPT-4? -Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/d2bc6359e8ebf647892ec953e418042dc7f8a685/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. +Perhaps surprisingly, the answer is no. The models that we suggest for autocomplete are trained with a highly specific prompt format, which allows them to respond to requests for completing code (see examples of these prompts [here](https://github.com/continuedev/continue/blob/main/core/autocomplete/templates.ts)). Some of the best commercial models like GPT-4 or Claude are not trained with this prompt format, which means that they won't generate useful completions. Luckily, a huge model is not required for great autocomplete. Most of the state-of-the-art autocomplete models are no more than 10b parameters, and increasing beyond this does not significantly improve performance. ### I'm not seeing any completions From 9663e9d56bd316763796d6a905dcd3367e72aa84 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 31 Oct 2024 18:56:31 -0700 Subject: [PATCH 15/17] fix how to use it links --- docs/docs/edit/how-to-use-it.md | 2 +- docs/docs/reference.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/docs/edit/how-to-use-it.md b/docs/docs/edit/how-to-use-it.md index ac6f2ed4b..4dbed98d8 100644 --- a/docs/docs/edit/how-to-use-it.md +++ b/docs/docs/edit/how-to-use-it.md @@ -24,7 +24,7 @@ Highlight the block of code you would like to modify, and press `cmd/ctrl + i` t ## Describe code changes -Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend using [Chat](chat/how-to-use-it.md). +Describe the changes you would like the model to make to your highlighted code. For edits, a good prompt should be relatively short and concise. For longer, more complex tasks, we recommend using [Chat](../chat/how-to-use-it.md). ## Accept or reject changes diff --git a/docs/docs/reference.md b/docs/docs/reference.md index 71d0cc8b8..19e8f386e 100644 --- a/docs/docs/reference.md +++ b/docs/docs/reference.md @@ -10,7 +10,7 @@ Below are details for each property that can be set in `config.json`. The config ### `models` -Your **chat** models are defined here, which are used for [Chat](../chat/how-to-use-it.md), [Edit](../edit/how-to-use-it.md), and [Actions](../actions/how-to-use-it.md). +Your **chat** models are defined here, which are used for [Chat](./chat/how-to-use-it.md), [Edit](./edit/how-to-use-it.md), and [Actions](./actions/how-to-use-it.md). Each model has specific configuration options tailored to its provider and functionality, which can be seen as suggestions while editing the json. **Properties:** From e0adbbaa3b7ea269ddd6c653dc13158bd8f82423 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 31 Oct 2024 23:41:26 -0700 Subject: [PATCH 16/17] updated Y/N buttons jetbrains --- .../editor/VerticalDiffBlock.kt | 13 ++++++++++--- .../continueintellijextension/utils/Utils.kt | 7 +++++++ 2 files changed, 17 insertions(+), 3 deletions(-) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt index bdfaba447..2990b72e8 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/editor/VerticalDiffBlock.kt @@ -1,6 +1,7 @@ package com.github.continuedev.continueintellijextension.editor import com.github.continuedev.continueintellijextension.utils.getAltKeyLabel +import com.github.continuedev.continueintellijextension.utils.getShiftKeyLabel import com.intellij.openapi.Disposable import com.intellij.openapi.command.WriteCommandAction import com.intellij.openapi.editor.Editor @@ -131,10 +132,12 @@ class VerticalDiffBlock( refreshEditor() } - private fun createButtons(): Pair { val rejectBtn = - createButton("${getAltKeyLabel()}↑N", JBColor(0x99FF0000.toInt(), 0x99FF0000.toInt())).apply { + createButton( + "${getAltKeyLabel()}${getShiftKeyLabel()}N", + JBColor(0x99FF0000.toInt(), 0x99FF0000.toInt()) + ).apply { addActionListener { handleReject(); onAcceptReject(this@VerticalDiffBlock, false) @@ -143,7 +146,11 @@ class VerticalDiffBlock( } val acceptBtn = - createButton("${getAltKeyLabel()}↑Y", JBColor(0x9900FF00.toInt(), 0x9900FF00.toInt())).apply { + createButton( + "${getAltKeyLabel()}${ + getShiftKeyLabel() + }Y", JBColor(0x7700BB00.toInt(), 0x7700BB00.toInt()) + ).apply { addActionListener { handleAccept(); onAcceptReject(this@VerticalDiffBlock, true) diff --git a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/utils/Utils.kt b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/utils/Utils.kt index 21cc17089..fc00995eb 100644 --- a/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/utils/Utils.kt +++ b/extensions/intellij/src/main/kotlin/com/github/continuedev/continueintellijextension/utils/Utils.kt @@ -29,4 +29,11 @@ fun getAltKeyLabel(): String { Os.WINDOWS -> "Alt" Os.LINUX -> "Alt" } +} + +fun getShiftKeyLabel(): String { + return when (getOs()) { + Os.MAC -> "⇧" + Os.WINDOWS, Os.LINUX -> "↑" + } } \ No newline at end of file From b1cf2cd1a3d4388cff540fd637522c1e921c2c83 Mon Sep 17 00:00:00 2001 From: Nate Date: Thu, 31 Oct 2024 23:43:20 -0700 Subject: [PATCH 17/17] bump gradle version --- extensions/intellij/gradle.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions/intellij/gradle.properties b/extensions/intellij/gradle.properties index 3dbc8695d..7cb01a4ba 100644 --- a/extensions/intellij/gradle.properties +++ b/extensions/intellij/gradle.properties @@ -3,7 +3,7 @@ pluginGroup=com.github.continuedev.continueintellijextension pluginName=continue-intellij-extension pluginRepositoryUrl=https://github.com/continuedev/continue # SemVer format -> https://semver.org -pluginVersion=0.0.79 +pluginVersion=0.0.80 # Supported build number ranges and IntelliJ Platform versions -> https://plugins.jetbrains.com/docs/intellij/build-number-ranges.html pluginSinceBuild=223 # IntelliJ Platform Properties -> https://plugins.jetbrains.com/docs/intellij/tools-gradle-intellij-plugin.html#configuration-intellij-extension