Skip to content

Commit 15a024c

Browse files
committed
Add tools parameter to agent creation in synchronous and asynchronous samples
1 parent b2d854f commit 15a024c

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

samples/microsoft/csharp/getting-started-agents/AdditionalMessage.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ Synchronous sample:
2323
PersistentAgent agent = client.Administration.CreateAgent(
2424
model: modelDeploymentName,
2525
name: "Math Tutor",
26-
instructions: "You are a personal electronics tutor. Write and run code to answer questions."
27-
);
26+
instructions: "You are a personal electronics tutor. Write and run code to answer questions.",
27+
tools: [new CodeInterpreterToolDefinition()]);
2828
```
2929

3030
Asynchronous sample:

samples/microsoft/csharp/getting-started-agents/AdditionalMessageSync.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414
PersistentAgent agent = await client.Administration.CreateAgentAsync(
1515
model: modelDeploymentName,
1616
name: "Math Tutor",
17-
instructions: "You are a personal electronics tutor. Write and run code to answer questions."
18-
);
17+
instructions: "You are a personal electronics tutor. Write and run code to answer questions.",
18+
tools: [new CodeInterpreterToolDefinition()]);
1919

2020
PersistentAgentThread thread = await client.Threads.CreateThreadAsync();
2121

0 commit comments

Comments
 (0)