Elffuss BraidHub

kikocis/continue public

19cfb6ec829a · 5.5 KiBRawPermalink
1---
2title: "How to Configure Azure AI Foundry with Continue"
3slug: ../azure
4description: "Configure Azure AI Foundry with Continue to access models from OpenAI and Mistral with Microsoft's enterprise security features, including setup for GPT-4o, Codestral, and embedding models"
5sidebarTitle: "Azure AI Foundry"
6---
7
8Azure AI Foundry is a cloud-based service that provides access to models from OpenAI, Mistral AI, and others, integrated with the security and enterprise features of the Microsoft Azure platform. To get started, create an Azure AI Foundry resource in the [Azure portal](https://portal.azure.com).
9
10<Info>
11
12For details on OpenAI model setup, see [Azure OpenAI Service configuration](#how-to-configure-azure-openai-service).
13
14</Info>
15
16## How to Set Up Azure AI Foundry Chat Models
17
18We recommend configuring **GPT-4o** as your chat model.
19
20<Tabs>
21 <Tab title="YAML">
22 ```yaml title="config.yaml"
23 models:
24 - name: GPT-4o
25 provider: azure
26 model: gpt-4o
27 apiBase: <YOUR_DEPLOYMENT_BASE>
28 apiKey: <YOUR_AZURE_API_KEY> # If you use subscription key, try using Azure gateway to rename it apiKey
29 env:
30 deployment: <YOUR_DEPLOYMENT_NAME>
31 apiType: azure-foundry # Or "azure-openai" if using OpenAI models
32 apiVersion: 2023-07-01-preview # Azure API version
33 ```
34 </Tab>
35 <Tab title="JSON">
36 ```json title="config.json"
37 {
38 "models": [{
39 "title": "GPT-4o",
40 "provider": "azure",
41 "model": "gpt-4o",
42 "apiBase": "<YOUR_DEPLOYMENT_BASE>",
43 "deployment": "<YOUR_DEPLOYMENT_NAME>",
44 "apiKey": "<YOUR_AZURE_API_KEY>", // If you use subscription key, try using Azure gateway to rename it apiKey
45 "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
46 }]
47 }
48 ```
49 </Tab>
50</Tabs>
51
52## How to Set Up Azure AI Foundry Autocomplete Models
53
54We recommend configuring **Codestral** as your autocomplete model.
55
56<Info>
57 **Note:** Azure AI Foundry does not provide the FIM (Fill-in-Middle) endpoint
58 required for autocomplete functionality. To use Codestral for autocomplete,
59 deploy it through **Azure Machine Learning Studio** instead, which provides
60 the necessary `/v1/fim/completions` endpoint.
61</Info>
62
63If you use Azure Machine Learning Studio to deploy Codestral:
64
65<Tabs>
66 <Tab title="YAML">
67 ```yaml title="config.yaml"
68 models:
69 - name: Codestral
70 provider: mistral
71 model: codestral-latest
72 apiBase: https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1
73 apiKey: <YOUR_AZURE_API_KEY>
74 roles:
75 - autocomplete
76 ```
77 </Tab>
78 <Tab title="JSON">
79 ```json title="config.json"
80 {
81 "tabAutocompleteModel": {
82 "title": "Codestral",
83 "provider": "mistral",
84 "model": "codestral-latest",
85 "apiBase": "https://<YOUR_MODEL_NAME>.<YOUR_REGION>.models.ai.azure.com/v1",
86 "apiKey": "<YOUR_AZURE_API_KEY>"
87 }
88 }
89 ```
90 </Tab>
91</Tabs>
92
93## How to Configure Azure AI Foundry Embeddings Models
94
95We recommend configuring **text-embedding-3-large** as your embeddings model.
96
97<Tabs>
98 <Tab title="YAML">
99 ```yaml title="config.yaml"
100 models:
101 - name: Text Embedding-3 Large
102 provider: azure
103 model: text-embedding-3-large
104 apiBase: <YOUR_DEPLOYMENT_BASE>
105 apiKey: <YOUR_AZURE_API_KEY>
106 env:
107 deployment: <YOUR_DEPLOYMENT_NAME>
108 apiType: azure
109 apiVersion: 2023-07-01-preview
110 ```
111 </Tab>
112 <Tab title="JSON">
113 ```json title="config.json"
114 {
115 "embeddingsProvider": {
116 "provider": "azure",
117 "model": "text-embedding-3-large",
118 "apiBase": "<YOUR_DEPLOYMENT_BASE>",
119 "deployment": "<YOUR_DEPLOYMENT_NAME>",
120 "apiKey": "<YOUR_AZURE_API_KEY>",
121 "apiType": "azure-foundry" // Or "azure-openai" if using OpenAI models
122 }
123 }
124 ```
125 </Tab>
126</Tabs>
127
128## Reranking model
129
130Azure OpenAI currently does not offer any reranking models.
131
132[Click here](../../model-roles/reranking.mdx) to see a list of reranking models.
133
134## Privacy
135
136If you'd like to use OpenAI models but are concerned about privacy, you can use the Azure OpenAI service, which is GDPR and HIPAA compliant.
137
138<Info>
139 **Getting access:** [Click
140 here](https://azure.microsoft.com/en-us/products/ai-services/openai-service)
141 to apply for access to the Azure OpenAI service. Response times are typically
142 within a few days.
143</Info>
144
145## Azure OpenAI Service configuration
146
147Azure OpenAI Service requires a handful of additional parameters to be configured, such as a deployment name and API base URL.
148
149To find this information in _Azure AI Foundry_, first select the model that you would like to connect. Then visit _Endpoint_ > _Target URI_.
150
151For 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:
152
153<Tabs>
154 <Tab title="YAML">
155 ```yaml title="config.yaml"
156 models:
157 - name: GPT-4o Azure
158 model: gpt-4o
159 provider: azure
160 apiBase: https://just-an-example.openai.azure.com
161 apiKey: <YOUR_AZURE_API_KEY>
162 env:
163 apiVersion: 2023-03-15-preview
164 deployment: gpt-4o-july
165 apiType: azure-openai
166 ```
167 </Tab>
168 <Tab title="JSON">
169 ```json title="config.json"
170 {
171 "title": "GPT-4o Azure",
172 "model": "gpt-4o",
173 "provider": "azure",
174 "apiBase": "https://just-an-example.openai.azure.com",
175 "deployment": "gpt-4o-july",
176 "apiVersion": "2023-03-15-preview",
177 "apiKey": "<YOUR_AZURE_API_KEY>",
178 "apiType": "azure-openai"
179 }
180 ```
181 </Tab>
182</Tabs>