You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/ai-services/agents/how-to/tools/function-calling.md
+13-13Lines changed: 13 additions & 13 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,7 +34,7 @@ In this example we are demonstrating how to use the local functions with the age
34
34
35
35
1. First, set up the configuration and create a `PersistentAgentsClient`. This client will be used for all interactions with the Azure AI Agents Service. This step also includes all necessary `using` directives.
36
36
37
-
```C# Snippet:AgentsFunctions_Step1_SetupClient
37
+
```csharp
38
38
usingAzure;
39
39
usingAzure.AI.Agents.Persistent;
40
40
usingAzure.Identity;
@@ -53,7 +53,7 @@ PersistentAgentsClient client = new(projectEndpoint, new DefaultAzureCredential(
53
53
54
54
2. Next, define the local functions that the agent can call. For each function, create a `FunctionToolDefinition` that describes its name, purpose, and parameters to the agent. These functions and definitions are used by both synchronous and asynchronous agent operations.
3. Createahelperfunction, `GetResolvedToolOutput`. Thisfunctiontakesa `RequiredToolCall` (when the agent determines a local function should be executed) and invokes the appropriate C# function defined in the previous step. It then wraps the result in a `ToolOutput` object for the agent.
0 commit comments