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/core/config/types.ts b/core/config/types.ts index 48b859a43..22f1e9128 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; @@ -773,7 +773,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 2cefe9592..3a984ae33 100644 --- a/core/control-plane/schema.ts +++ b/core/control-plane/schema.ts @@ -87,7 +87,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 ef637f784..c896c361b 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; @@ -836,7 +836,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 e7f9de970..c3680aae7 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; @@ -190,7 +190,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 82af7793f..b626a9698 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/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. diff --git a/docs/docs/customize/model-providers/top-level/azure.md b/docs/docs/customize/model-providers/top-level/azure.md index adb390538..266cbbb0b 100644 --- a/docs/docs/customize/model-providers/top-level/azure.md +++ b/docs/docs/customize/model-providers/top-level/azure.md @@ -18,13 +18,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": "" + "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 }] ``` @@ -72,20 +72,27 @@ 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 `` 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", + "deployment": "gpt-4o-july", "apiVersion": "2023-03-15-preview", "apiKey": "" } 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 diff --git a/extensions/vscode/config_schema.json b/extensions/vscode/config_schema.json index 3e3288353..f69ce7e5c 100644 --- a/extensions/vscode/config_schema.json +++ b/extensions/vscode/config_schema.json @@ -414,9 +414,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": { @@ -539,7 +539,7 @@ }, "then": { "properties": { - "engine": { + "deployment": { "type": "string" }, "apiType": { @@ -1301,11 +1301,7 @@ ] }, "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 793ffca61..62f6905d1 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 }, diff --git a/packages/config-types/src/index.ts b/packages/config-types/src/index.ts index 4a4b6e6e3..febff0221 100644 --- a/packages/config-types/src/index.ts +++ b/packages/config-types/src/index.ts @@ -112,7 +112,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(),