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
@@ -32,9 +32,11 @@ To use all features of function calling including parallel functions, you need t
32
32
33
33
::: zone pivot="code-example"
34
34
35
-
# [Python](#tab/python)
35
+
## Define a function for your agent to call
36
+
37
+
Start by defining a function for your agent to call. When you create a function for an agent to call, you describe its structure of it with any required parameters.
36
38
37
-
When you create a function for an agent to call, you describe its structure of it with any required parameters. For example, `fetch_weather` simulates the response of a possible weather function.
See the [python file on GitHub](https://github.com/Azure/azure-sdk-for-python/blob/main/sdk/ai/azure-ai-projects/samples/agents/user_functions.py) for an example of a full series of function definitions. This file is referred to as `user_functions.py` in the following example below.
58
60
59
61
60
-
In the sample below we create a client and define a `toolset` which will be used to process the functions defined in `user_functions`.
61
-
62
-
```python
63
-
import os
64
-
from azure.ai.projects import AIProjectClient
65
-
from azure.identity import DefaultAzureCredential
66
-
from azure.ai.projects.models import FunctionTool, ToolSet
67
-
from user_functions import user_functions # found in the user_functions.py file.
68
-
69
-
# Create an Azure AI Client from a connection string, copied from your AI Studio project.
70
-
# It should be in the format "<HostName>;<AzureSubscriptionId>;<ResourceGroup>;<HubName>"
71
-
# Customers need to login to Azure subscription via Azure CLI and set the environment variables
When you create a function for an agent to call, you describe its structure of it with any required parameters. For example, the following functions are two examples - one that requires no parameters, and one that requires one parameter.
87
-
88
65
```csharp
89
66
// Example of a function that defines no parameters
0 commit comments