You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add support for using new ada models with different dimensions (#1378)
* update reqs
* Add parameters for ada 3
* Update readme
* Update TOC
* Fix tests and mocks
* Mypy fixes
* Addressing feedback (more testing still needed)
* More readme notes
* Cast openaidimensions to int
* Support batch for ada3
* right model name
* Note about regions
* Add constants for tests model name and dimensions
* Default to int
* Typing error
* Fix env var name
* Undo unneeded parameter move
* Dont specify dimensons for old models
* typing
@@ -58,6 +59,43 @@ Execute the following commands inside your terminal:
58
59
>
59
60
> Note that this does not delete your GPT-4 deployment; it just makes your application create a new or reuse an old GPT 3.5 deployment. If you want to delete it, you can go to your Azure OpenAI studio and do so.
60
61
62
+
## Using text-embedding-3 models
63
+
64
+
By default, the deployed Azure web app uses the `text-embedding-ada-002` embedding model. If you want to use one of the text-embedding-3 models, you can do so by following these steps:
65
+
66
+
1. Run one of the following commands to set the desired model:
67
+
68
+
```shell
69
+
azd env set AZURE_OPENAI_EMB_MODEL_NAME text-embedding-3-small
70
+
```
71
+
72
+
```shell
73
+
azd env set AZURE_OPENAI_EMB_MODEL_NAME text-embedding-3-large
74
+
```
75
+
76
+
2. Specify the desired dimensions of the model: (from 256-3072, model dependent)
77
+
78
+
```shell
79
+
azd env set AZURE_OPENAI_EMB_DIMENSIONS 256
80
+
```
81
+
82
+
3. Set the model version to "1" (the only version as of March 2024):
83
+
84
+
```shell
85
+
azd env set AZURE_OPENAI_EMB_DEPLOYMENT_VERSION 1
86
+
```
87
+
88
+
3. When prompted during `azd up`, make sure to selecta region for the OpenAI resource group location that supports the text-embedding-3 models. There are [limited regions available](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#embeddings-models).
89
+
90
+
If you have already deployed:
91
+
92
+
* You'll need to change the deployment name by running `azd env set AZURE_OPENAI_EMB_DEPLOYMENT <new-deployment-name>`
93
+
* You'll need to create a new index, and re-index all of the data using the new model. You can either delete the current index in the Azure Portal, or create an index with a different name by running `azd env set AZURE_SEARCH_INDEX new-index-name`. When you next run `azd up`, the new index will be created and the data will be re-indexed.
94
+
* If your OpenAI resource is not in one of the supported regions, you should delete `openAiResourceGroupLocation` from `.azure/YOUR-ENV-NAME/config.json`. When running `azd up`, you will be prompted to selecta new region.
95
+
96
+
>![NOTE]
97
+
> The text-embedding-3 models are not currently supported by the integrated vectorization feature.
98
+
61
99
## Enabling GPT-4 Turbo with Vision
62
100
63
101
This section covers the integration of GPT-4 Vision with Azure AI Search. Learn how to enhance your search capabilities with the power of image and text indexing, enabling advanced search functionalities over diverse document types. For a detailed guide on setup and usage, visit our [Enabling GPT-4 Turbo with Vision](docs/gpt4v.md) page.
@@ -73,6 +111,8 @@ To enable integrated vectorization with this sample:
73
111
3. Run `azd up` to update system and user roles
74
112
4. You can view the resources such as the indexer and skillset in Azure Portal and monitor the status of the vectorization process.
75
113
114
+
This feature is not currently compatible with GPT4-vision or the newer text-embedding-3 models.
115
+
76
116
## Enabling authentication
77
117
78
118
By default, the deployed Azure web app will have no authentication or access restrictions enabled, meaning anyone with routable network access to the web app can chat with your indexed data. If you'd like to automatically setup authentication and user login as part of the `azd up` process, see [this guide](./login_and_acl.md).
0 commit comments