Skip to content

Commit 8475bd0

Browse files
committed
factor out env vars now that they are all the same
1 parent 4c21e5a commit 8475bd0

File tree

1 file changed

+7
-24
lines changed

1 file changed

+7
-24
lines changed

articles/ai-foundry/includes/get-started-fdp.md

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,13 @@ No installation is necessary to use the Azure AI Foundry portal.
7070
7171
1. [Install Java and Azure CLI](../how-to/develop/install-cli-sdk.md?pivots=programming-language-java).
7272
1. [!INCLUDE [find-endpoint](find-endpoint.md)]
73+
1. Set these environment variables to use in your scripts:
74+
75+
```txt
76+
MODEL_DEPLOYMENT_NAME=gpt-4o
77+
PROJECT_ENDPOINT=https://<your-foundry-resource-name>.services.ai.azure.com/api/projects/<your-foundry-project-name>
78+
```
79+
7380
1. Make sure to sign in using the CLI `az login` (or `az login --use-device-code`) command to authenticate before running your Java scripts.
7481
1. Download [POM.XML](https://github.com/azure-ai-foundry/foundry-samples/blob/main/samples/microsoft/java/mslearn-resources/quickstart/pom.xml) to your Java IDE.
7582
@@ -145,14 +152,6 @@ Substitute your endpoint for the `endpoint` in this code:
145152
146153
# [Java (preview)](#tab/java)
147154
148-
Set these environment variables:
149-
150-
- **PROJECT_ENDPOINT**: Required. Your Azure AI project endpoint.
151-
- AZURE_AI_API_KEY: Optional. Your API key (falls back to DefaultAzureCredential).
152-
- AZURE_MODEL_DEPLOYMENT_NAME: Optional. Model deployment name (default: "phi-4").
153-
- AZURE_MODEL_API_PATH: Optional. API path segment (default: "deployments").
154-
- CHAT_PROMPT: Optional. The prompt to send (uses a default if not provided).
155-
156155
:::code language="java" source="~/foundry-samples-main/samples/microsoft/java/mslearn-resources/quickstart/src/main/java/com/azure/ai/foundry/samples/ChatCompletionSample.java" :::
157156
158157
# [JavaScript (preview)](#tab/javascript)
@@ -193,14 +192,6 @@ Substitute your endpoint for the `endpoint` in this code:
193192
194193
# [Java (preview)](#tab/java)
195194
196-
Set these environment variables:
197-
198-
- AZURE_ENDPOINT: Optional fallback. The base endpoint for your Azure AI service if PROJECT_ENDPOINT is not provided.
199-
- **PROJECT_ENDPOINT**: Required. The endpoint for your Azure AI Project.
200-
- MODEL_DEPLOYMENT_NAME: Optional. The model deployment name (defaults to "gpt-4o").
201-
- AGENT_NAME: Optional. The name to give to the created agent (defaults to "java-quickstart-agent").
202-
- AGENT_INSTRUCTIONS: Optional. The instructions for the agent (defaults to a helpful assistant).
203-
204195
:::code language="java" source="~/foundry-samples-main/samples/microsoft/java/mslearn-resources/quickstart/src/main/java/com/azure/ai/foundry/samples/AgentSample.java" :::
205196
206197
# [JavaScript (preview)](#tab/javascript)
@@ -246,14 +237,6 @@ Substitute your endpoint for the `endpoint` in this code:
246237
247238
# [Java (preview)](#tab/java)
248239
249-
Set these environment variables:
250-
251-
- AZURE_ENDPOINT: Optional fallback. The base endpoint for your Azure AI service if PROJECT_ENDPOINT is not provided.
252-
- **PROJECT_ENDPOINT**: Required. The endpoint for your Azure AI Project.
253-
- MODEL_DEPLOYMENT_NAME: Optional. The model deployment name (defaults to "gpt-4o").
254-
- AGENT_NAME: Optional. The name to give to the created agent (defaults to "java-file-search-agent").
255-
- AGENT_INSTRUCTIONS: Optional. The instructions for the agent (defaults to document-focused instructions).
256-
257240
:::code language="java" source="~/foundry-samples-main/samples/microsoft/java/mslearn-resources/quickstart/src/main/java/com/azure/ai/foundry/samples/FileSearchAgentSample.java" :::
258241
259242

0 commit comments

Comments
 (0)