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
You can add the function calling tool to an agent programatically using the code examples listed at the top of this article, or the Azure AI Foundry portal. If you want to use the portal:
41
+
You can add the code interpreter tool to an agent programatically using the code examples listed at the top of this article, or the Azure AI Foundry portal. If you want to use the portal:
42
42
43
43
1. In the **Create and debug** screen for your agent, scroll down the **Setup** pane on the right to **action**. Then select **Add**.
44
44
@@ -57,7 +57,7 @@ You can add the function calling tool to an agent programatically using the code
57
57
::: zone pivot="code-example"
58
58
59
59
60
-
## Define imports and create a project client
60
+
## Create a project client
61
61
62
62
# [Python](#tab/python)
63
63
@@ -89,6 +89,23 @@ var connectionString = Environment.GetEnvironmentVariable("PROJECT_CONNECTION_ST
To use code interpreter, first you need to create a project client, which will contain a connection string to your AI project, and will be used to authenticate API calls.
if (isOutputOfType<MessageTextContentOutput>(m.content[0], "text")) {
359
+
consttextContent=m.content[0];
360
+
console.log(`${textContent.text.value}`);
361
+
console.log(`---------------------------------`);
362
+
}
363
+
}
364
+
```
365
+
265
366
---
266
367
267
368
## Download files generated by code interpreter
@@ -297,6 +398,29 @@ foreach (MessageContent contentItem in message.Content)
297
398
}
298
399
}
299
400
```
401
+
# [JavaScript](#tab/javascript)
402
+
403
+
Files uploaded by Agents cannot be retrieved back. If your use case needs to access the file content uploaded by the Agents, you are advised to keep an additional copy accessible by your application. However, files generated by Agents are retrievable by `getFileContent`.
0 commit comments