Update Azure OpenAI deployment instructions in README_AZURE_OPENAI.md for improved clarity and variable usage
Browse files- api/README_AZURE_OPENAI.md +13 -8
api/README_AZURE_OPENAI.md
CHANGED
@@ -173,18 +173,23 @@ When the server is running, visit:
|
|
173 |
- ReDoc: http://localhost:9621/redoc
|
174 |
|
175 |
## Deployment
|
176 |
-
Azure OpenAI API can be created using the following commands:
|
177 |
```bash
|
|
|
|
|
|
|
|
|
|
|
178 |
az login
|
179 |
-
az group create --name
|
180 |
-
az cognitiveservices account create --name
|
181 |
-
az cognitiveservices account deployment create --resource-group
|
182 |
-
az cognitiveservices account deployment create --resource-group
|
183 |
-
az cognitiveservices account show --name
|
184 |
-
az cognitiveservices account keys list --name
|
185 |
|
186 |
```
|
187 |
-
|
188 |
|
189 |
## License
|
190 |
|
|
|
173 |
- ReDoc: http://localhost:9621/redoc
|
174 |
|
175 |
## Deployment
|
176 |
+
Azure OpenAI API can be created using the following commands in Azure CLI (you need to install Azure CLI first from [https://docs.microsoft.com/en-us/cli/azure/install-azure-cli](https://docs.microsoft.com/en-us/cli/azure/install-azure-cli)):
|
177 |
```bash
|
178 |
+
# Change the resource group name, location and OpenAI resource name as needed
|
179 |
+
RESOURCE_GROUP_NAME=LightRAG
|
180 |
+
LOCATION=swedencentral
|
181 |
+
RESOURCE_NAME=LightRAG-OpenAI
|
182 |
+
|
183 |
az login
|
184 |
+
az group create --name $RESOURCE_GROUP_NAME --location $LOCATION
|
185 |
+
az cognitiveservices account create --name $RESOURCE_NAME --resource-group $RESOURCE_GROUP_NAME --kind OpenAI --sku S0 --location swedencentral
|
186 |
+
az cognitiveservices account deployment create --resource-group $RESOURCE_GROUP_NAME --model-format OpenAI --name $RESOURCE_NAME --deployment-name gpt-4o --model-name gpt-4o --model-version "2024-08-06" --sku-capacity 100 --sku-name "Standard"
|
187 |
+
az cognitiveservices account deployment create --resource-group $RESOURCE_GROUP_NAME --model-format OpenAI --name $RESOURCE_NAME --deployment-name text-embedding-3-large --model-name text-embedding-3-large --model-version "1" --sku-capacity 80 --sku-name "Standard"
|
188 |
+
az cognitiveservices account show --name $RESOURCE_NAME --resource-group $RESOURCE_GROUP_NAME --query "properties.endpoint"
|
189 |
+
az cognitiveservices account keys list --name $RESOURCE_NAME -g $RESOURCE_GROUP_NAME
|
190 |
|
191 |
```
|
192 |
+
The output of the last command will give you the endpoint and the key for the OpenAI API. You can use these values to set the environment variables in the `.env` file.
|
193 |
|
194 |
## License
|
195 |
|