Skip to content

Commit 29d4d35

Browse files
committed
fixes
1 parent 61dce6d commit 29d4d35

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

articles/ai-foundry/agents/how-to/tools/function-calling.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,8 +154,8 @@ IConfigurationRoot configuration = new ConfigurationBuilder()
154154
.Build();
155155

156156
// Read necessary configuration values (Project Endpoint and Model Deployment Name)
157-
var projectEndpoint = configuration["ProjectEndpoint"];
158-
var modelDeploymentName = configuration["ModelDeploymentName"];
157+
var projectEndpoint = configuration["PROJECT_ENDPOINT"];
158+
var modelDeploymentName = configuration["MODEL_DEPLOYMENT_NAME"];
159159
// Initialize the client to interact with the Azure AI Agents Persistent Client using default credentials
160160
PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential());
161161

@@ -495,11 +495,12 @@ class FunctionToolExecutor {
495495
// Create a client and agent
496496
497497
const projectEndpoint = process.env["PROJECT_ENDPOINT"];
498+
const modelName = process.env["MODEL_DEPLOYMENT_NAME"];
498499

499500
const client = new AgentsClient(projectEndpoint, new DefaultAzureCredential());
500501
const functionToolExecutor = new FunctionToolExecutor();
501502
const functionTools = functionToolExecutor.getFunctionDefinitions();
502-
const agent = await client.createAgent("gpt-4o", {
503+
const agent = await client.createAgent(modelName, {
503504
name: "my-agent",
504505
instructions:
505506
"You are a weather bot. Use the provided functions to help answer questions. Customize your responses to the user's preferences as much as possible and use friendly nicknames for cities whenever possible.",

0 commit comments

Comments
 (0)