From 9fc556c3ed79a167932a06d5ea7a2eafc21cedfd Mon Sep 17 00:00:00 2001 From: Vadim Zhamkov Date: Fri, 25 Oct 2024 18:06:01 +0200 Subject: [PATCH 1/4] 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 zcmeHK_dDAQ7yriSRTSmcs8yqC)QBQtw_Mse=lpVBJ}@)7#Cnw#0Dw#P?ixG<0EY9D z0bsdso{l1BC;-4MbI;)RqX^J0ZWsQiQ9iIbT1un$WuSLi(jS z`f@p5qFgv(m&MD-SuJs~??<6~;}s=`!`W$?*5-`By}Mp2mJYE*qBYa`@c+mEtO7T` zJX@vPHqSSlttIz;-#{5}-#=+r3>4Lhm>en~O~4M9!sc}M6b$Q6v|-?5(hsKwDXF&v zZQah4`E7lAc+87zpXE%MK1XsLQlY_dSYLYY^8kM-EbbH@*sY zOY_;6-S4JjPvmt=?|AyxpJ{f_+AJWmnv72GPUp|lCSnEkuLb4RUNu}eYAifB*%;G3 zB6Sl*F@2|Dk;;EL{4M19|QllH6l6M|V4LieAb9yGBJ z_rLLR_3FM=OZ%wUT%%sn-|_V0eEz1p!HrRPF_}P@Y2Y^uU)hB1j#^y$qPnbH7ui#4&vwpRAn`C}|LJX`}0 z5X)L_Tj~x6Up#r(IGK2b0YCXi&|D$bXnrL{Q}!y5E>o&?6b(AFG8m%*W@1QX3(ePI z_@&M;^qB8Jbfbh$=(XI^fnpmq4(C8jm zk`^(QZxnk{Pd~lK-jD9Hj=J}40Y-`z7%BeE&Dhtt5=d~I;LB#IMevk;=8&_dUb|+* zxSaO_A{Wa;DjjaC^vL^*=9pyvdvS2>`(0l<5r}sTWKqVAxUYkiNi6#P+Du(kbZ9MH zQU$!j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pgBG6`=LkZ#8b$;y$2P)|!18{#aL|8+M+iJFC)?&WBxbEZV~mVWWBSlwyX$=4{6l8L@t$gBh!Na?f8p;4amRMjNvs*^$>!b3g=e{)4xfYmaTFXF zuRYE!$>xsH%AgUC4FzvW0P2r~O{_FH2G z0RdXc4?mLN|J)yspAZ(G89bT0Sp5CH!o><@mIxuL?JI7)>R6b}p-CuygOl1}g*QY& zK}w_Z_|}&Lg}6ID=N9@Kf_!k}wxn05cn-D`48JnMYHUs9G0)EWBxD`7CG~KVLq4#> z(tdJoX!|?IODmzKjDYd<$Nq@cwEF5MtvDYhcWRXPdZ?o#1Jf=hwNTVs$GM9;5Y2?s9{eC2fr(t`szd!id=#bm#!0Chi=GV zn1dLir7lo}lBq!f=AtI*bUFz6V%uxtJ!|h#e14wEO(Sd3vB;-ZK#<08cLYIwZv-C! z?((+?fA#*7zsZ1YbmeuHFPlo6@qrRuLCpl6cd~$b_SAzp0&}-H9|w6&OD%cqTgVn& zq~LBt>R}Z4d69+fi&KYhWTg_*X8OrDqt1YH)i8ysrhiijAaSo5zF( zi{y-KT1?&W1N-~4`?mE#KZ)Jv`>ck(B^~X1=-QJJd@m8hALZhJ zUW4z0jqQp=6u8pd{f z0vC@>zM9a4oSGM%Tem&3cC% Date: Thu, 31 Oct 2024 16:49:03 +0000 Subject: [PATCH 2/4] 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 3/4] 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 4/4] 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" ] } },