Skip to content

Commit c03139f

Browse files
committed
docs(azure): pasted endpoint forms, default api-version 2024-10-21, deployment-name model
Matches CodeGPT 3.24.65: the Azure provider accepts either the resource host or the full request URL from Azure AI Foundry's View code, reads the deployment and api-version from the full form, and defaults to 2024-10-21.
1 parent 3aa38bc commit c03139f

1 file changed

Lines changed: 19 additions & 17 deletions

File tree

docs/tutorial-ai-providers/microsoft-azure.md

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,30 @@ sidebar_position: 7
77
Official website https://azure.microsoft.com/en-us/products/ai-services/openai-service
88

99
## Microsoft Azure
10+
1011
- Create an account in [Microsoft Azure](https://azure.microsoft.com/en-us/free).
1112
- Get access to [Azure OpenAI Services](https://azure.microsoft.com/en-us/products/ai-services/openai-service).
12-
- Go to [Azure OpenAI Studio](https://oai.azure.com/)
13-
- Get your `Secret Key` and the `Custom Link`.
14-
- To obtain the endpoint and the secret, you must deploy the model and then open it in Azure OpenAI Studio. Then select "View Code"
15-
- This section provides the API key and the custom link. To display the full custom link, select CURL in the code selection and copy the endpoint.
16-
- On the VSCode CodeGPT Extension, change the model on the chat.
17-
18-
<p align="center"><img width="550" height="400" src="https://github.com/user-attachments/assets/654fde38-2dac-453c-9769-830a70086504"/></p>
19-
20-
21-
- Pick the `LLMs Cloud model` and select `Azure` as `Provider`.
22-
- Select a model.
23-
- Paste `API Key` here, and click on `Connect`.
24-
- Click outside the options and ask to chat.
25-
26-
<p align="center"><img width="550" height="400" src="https://github.com/user-attachments/assets/e5658252-9b32-4d65-85c1-8f5fcdd8ad44"/></p>
13+
- Go to [Azure AI Foundry](https://ai.azure.com/) (formerly Azure OpenAI Studio) and deploy a model. Note the **deployment name** you give it.
14+
- Open the deployment and select **View code**. It shows two things you need:
15+
- the **API key**
16+
- the **endpoint**. Either form works in CodeGPT:
17+
- the resource host only, for example `https://my-resource.openai.azure.com`
18+
- the full request URL from the code sample, for example `https://my-resource.openai.azure.com/openai/deployments/my-deployment/chat/completions?api-version=2024-10-21`. When you paste this form, CodeGPT uses the deployment and api-version from it.
19+
- In the CodeGPT extension, open **Select your model****Manage Models****API Keys** and pick **Azure** as the provider.
20+
- Paste the endpoint into **Custom Link** and the key into **API Key**, then click **Connect**.
21+
- Select a model. The model name must be your **deployment name** as shown in Azure, not the underlying model's name. If your deployment is not in the list, type it in.
22+
- Click outside the options and ask something in the chat.
23+
24+
:::note api-version
25+
If you paste only the resource host, CodeGPT calls the `2024-10-21` API version. To use a different version, paste the full request URL from **View code** and CodeGPT will use the api-version it contains.
26+
:::
2727

2828
:::caution Remove or edit Key
2929
To remove your API Key from CodeGPT, click on `Change connection settings` button
30-
<p align="center"><img width="550" height="400" src="https://github.com/user-attachments/assets/9a0ae15f-b719-4b8a-ac3e-7e856dc319de"/></p>
3130
:::
3231

3332
## API Errors
34-
If you are getting API errors check the following link: [Microsoft Azure Documentation](https://azure.microsoft.com/en-us/products/ai-services/openai-service/)
33+
34+
- `404 Resource not found`: the model name in CodeGPT does not match a deployment name in your resource, or the endpoint points at a different resource.
35+
- `401 Access denied`: wrong key, or the key belongs to another resource.
36+
- Other errors: check the [Microsoft Azure Documentation](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference).

0 commit comments

Comments
 (0)