2.7 Configure Env Variables¶
We are now ready to start coding the chat AI application in our local development environment. But to do this, we need to configure a few environment variables.
1. Create .env
file¶
- Start by copying the
.env.sample
file to.env
1 |
|
- Let's review what this contains
1 |
|
You will see something like this:
1 2 3 4 5 6 |
|
2. Update Connection String¶
Note that defaults are provided for everything except the AIPROJECT_CONNECTION_STRING
- let's fix that now!
-
Open the Azure AI Project overview page. It should look like this:
-
Look for the Project connection string under the Project details tab.
- Copy that into
.env
as the AIPROJECT_CONNECTION_STRING value. - Save the changes to
.env
3. Review Environment Variables¶
Let's review our environment variables:
AIPROJECT_CONNECTION_STRING
- is a single connection URI that allows access to all the Connected Resources in the Azure AI project (including Azure AI Search).AISEARCH_INDEX_NAME
- is set tocontoso-products
and represents the index name that we will create and populate with product catalog data.EMBEDDINGS_MODEL
- the deployed model we'll use for vectorizing queries (see: Ideate 3.2)INTENT_MAPPING_MODEL
- the deployed model we'll use for intent mapping (see: Ideate 3.4)CHAT_MODEL
- the deployed model we'll use for final chat response (see: Ideate 3.6)EVALUATION_MODEL
- the deployed model we'll use for quality evaluation (see: Evaluate 4.3)
CONGRATULATIONS! Your local environment is configured for code!