Skip to content

Commit f9b7cf3

Browse files
authored
Merge pull request #72 from Azure-Samples/howie/env-var
Instruction for env var for local development
2 parents 5c51be4 + babbb37 commit f9b7cf3

File tree

2 files changed

+22
-3
lines changed

2 files changed

+22
-3
lines changed

README.md

+7-3
Original file line numberDiff line numberDiff line change
@@ -203,15 +203,19 @@ You can optionally use a local development server to test app changes locally. M
203203
python -m pip install -r requirements.txt
204204
```
205205

206-
4. Run the local server:
206+
4. Duplicate `src/.env.sample` and name to `.env`.
207+
208+
5. Fill in the environamnet in `.env`.
209+
210+
6. Run the local server:
207211

208212
```shell
209213
python -m uvicorn "api.main:create_app" --factory --reload
210214
```
211215

212-
5. Click 'http://127.0.0.1:8000' in the terminal, which should open a new tab in the browser.
216+
7. Click 'http://127.0.0.1:8000' in the terminal, which should open a new tab in the browser.
213217

214-
6. Enter your message in the box.
218+
8. Enter your message in the box.
215219
</details>
216220

217221
### Deploying Steps

src/.env.sample

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
# After running `azd up`, the following can be found in `.azure/<env name>/.env`
3+
# Azure AI Search endpoint and index name can be found in Azure Portal. See https://learn.microsoft.com/en-us/azure/ai-services/agents/how-to/tools/azure-ai-search?tabs=azurecli%2Cpython&pivots=overview-azure-ai-search
4+
AZURE_AIPROJECT_CONNECTION_STRING="" # required. Example: "eastus2.api.azureml.ms;********-****-****-****-************;my_resource_group;ai-project-**********"
5+
AZURE_AI_AGENT_DEPLOYMENT_NAME="" # required. Example: "gpt-4o-mini"
6+
AZURE_AI_AGENT_NAME="" # required if AZURE_AI_AGENT_ID not specified. Example: "agent-template-assistant"
7+
AZURE_AI_EMBED_DEPLOYMENT_NAME="" # required for index search. Example: "text-embedding-3-small"
8+
AZURE_AI_EMBED_DIMENSIONS=100 # required for index search. Example: 100
9+
AZURE_AI_SEARCH_CONNECTION_NAME="" # required for index search. Example: "my_search_connection"
10+
AZURE_AI_SEARCH_ENDPOINT="" # required for index search. Example: "https://my-search-service.search.windows.net"
11+
AZURE_AI_SEARCH_INDEX_NAME="" # required for index search. Example: "index_sample"
12+
13+
# Highly recommended. Example: "asst_AbCdEfGhIjKlMnOpQrStUvWxYz". If not specified, the agent name will be used to find the agent ID. Agent ID can be found by following https://learn.microsoft.com/en-us/azure/ai-services/agents/quickstart?pivots=ai-foundry-portal
14+
AZURE_AI_AGENT_ID=""
15+

0 commit comments

Comments
 (0)