update azure.md
This commit is contained in:
parent
51c9cedd61
commit
c2157a410b
2 changed files with 8 additions and 18 deletions
|
|
@ -12,6 +12,7 @@ class OpenAIEmbeddingsProvider extends BaseEmbeddingsProvider {
|
|||
static defaultOptions: Partial<EmbedOptions> | undefined = {
|
||||
apiBase: "https://api.openai.com/v1/",
|
||||
model: "text-embedding-3-small",
|
||||
apiVersion: "2024-02-15-preview",
|
||||
};
|
||||
|
||||
private _getEndpoint() {
|
||||
|
|
|
|||
|
|
@ -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": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"deployment": "<YOUR_DEPLOYMENT_NAME>", // Your deployment, eg "gpt4o-beta"
|
||||
"apiVersion": "<YOUR_API_VERSION>", // Typically a date like "2024-06-01"
|
||||
"apiKey": "<MY_API_KEY>" // If you use subscription key, try using Azure gateway to rename it apiKey
|
||||
"deployment": "<YOUR_DEPLOYMENT_NAME>",
|
||||
"apiKey": "<MY_API_KEY>" // 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": "<YOUR_DEPLOYMENT_BASE>",
|
||||
"engine": "<YOUR_ENGINE>",
|
||||
"apiVersion": "<YOUR_API_VERSION>",
|
||||
"deployment": "<YOUR_DEPLOYMENT_NAME>",
|
||||
"apiType": "azure",
|
||||
"apiKey": "<MY_API_KEY>"
|
||||
}
|
||||
|
|
@ -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",
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue