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
+11-1Lines changed: 11 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -31,6 +31,7 @@ Azure AI Agents supports function calling, which allows you to describe the stru
31
31
32
32
## Define a function for your agent to call
33
33
Start by defining a function for your agent to call. When you create a function for an agent to call, you describe its structure with any required parameters in a docstring.
In the sample below we create a client and define a `toolset` which will be used to process the functions defined in `user_functions`.
58
60
59
61
`toolset`: When using the toolset parameter, you provide not only the function definitions and descriptions but also their implementations. The SDK will execute these functions within `create_and_run_process` or streaming. These functions will be invoked based on their definitions.
62
+
-->
63
+
64
+
> [!NOTE]
65
+
> You can find a streaming example on [GitHub](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/agents_streaming/sample_agents_stream_eventhandler_with_functions.py).
# Create and process a run for the agent to handle the message
107
-
run = project_client.agents.runs.create_and_process(thread_id=thread.id, agent_id=agent.id)
114
+
run = project_client.agents.runs.create(thread_id=thread.id, agent_id=agent.id)
108
115
print(f"Created run, ID: {run.id}")
109
116
110
117
# Poll the run status until it is completed or requires action
@@ -137,6 +144,9 @@ print("Deleted agent")
137
144
138
145
::: zone pivot="csharp"
139
146
147
+
> [!NOTE]
148
+
> You can find a streaming example on [GitHub](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample8_PersistentAgents_FunctionsWithStreaming.md).
149
+
140
150
## Configure client and define functions
141
151
142
152
First, set up the configuration using `appsettings.json` and create a `PersistentAgentsClient`.
Register the Logic App by providing its name and trigger details.
50
+
Register the Logic App by providing its name and trigger details. You can find code for `AzureLogicAppTool` on[GitHub](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-agents/samples/utils/user_functions.py).
0 commit comments