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",