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
In this code we define function input and output class: `Arguments` and `Response` respectively. These two data classes will be serialized in JSON. It is important that these both contain field `CorrelationId`, which is the same between input and output.
778
778
779
-
In our example the function will be stored in the storage account, created with the AI hub. For that we need to allow key access to that storage. In Azure portal go to Storage account > Settings > Configuration and set "Allow storage account key access" to Enabled. If it is not done, the error will be displayed "The remote server returned an error: (403) Forbidden." To create the function resource that will host our function, install azure-cli python package and run the next command:
779
+
In our example the function will be stored in the storage account, created with the AI hub. For that we need to allow key access to that storage. In Azure portal go to Storage account > Settings > Configuration and set "Allow storage account key access" to Enabled. If it is not done, the error will be displayed "The remote server returned an error: (403) Forbidden." To create the function resource that will host our function, install [azure-cli](https://pypi.org/project/azure-cli/) python package and run the next command:
780
780
781
781
```shell
782
782
pip install -U azure-cli
@@ -811,16 +811,16 @@ In the `storage_account_already_present_in_resource_group` select the `Queue ser
811
811
}
812
812
```
813
813
814
-
Next, we will monitor the output queue or the message. You should receive the next message.
814
+
After the processing, the output queue should contain the message with the following contents:
815
815
```json
816
816
{
817
817
"Value": "Bar",
818
818
"CorrelationId": "42"
819
819
}
820
820
```
821
-
Please note that the input `CorrelationId` is the same as output.
822
-
*Hint:* Place multiple messages to input queue and keep second internet browser window with the output queue open and hit the refresh button on the portal user interface, so that you will not miss the message. If the message instead went to `azure-function-foo-input-poison` queue, the function completed with error, please check your setup.
823
-
After we have tested the function and made sure it works, please make sure that the Azure AI Project have the next roles for the storage account: `Storage Account Contributor`, `Storage Blob Data Contributor`, `Storage File Data Privileged Contributor`, `Storage Queue Data Contributor` and `Storage Table Data Contributor`. Now the function is ready to be used by the agent.
821
+
Please note that the in input `CorrelationId`value is the same as in the output.
822
+
*Hint:* Place multiple messages to input queue and keep second internet browser window with the output queue open, hit the refresh button on the portal user interface, so that you will not miss the message. If the function completed with error the message instead gets into the `azure-function-foo-input-poison` queue. If that happened, please check your setup.
823
+
After we have tested the function and confirmed that it works, please make sure that the Azure AI Project have the next roles for the storage account: `Storage Account Contributor`, `Storage Blob Data Contributor`, `Storage File Data Privileged Contributor`, `Storage Queue Data Contributor` and `Storage Table Data Contributor`. Now the function is ready to be used by the agent.
In this example we are using the `weather_openapi.json` file and agent will request the wttr.in website for the weather in a location fron the prompt.
849
+
In this example we are using the `weather_openapi.json` file and agent will request the [wttr.in](https://wttr.in) website for the weather in a location from the prompt.
@@ -893,7 +893,7 @@ To further diagnose and troubleshoot issues, you can enable logging following th
893
893
894
894
## Next steps
895
895
896
-
Beyond the introductory scenarios discussed, the AI Projects client library offers support for additional scenarios to help take advantage of the full feature set of the AI services. In order to help explore some of these scenarios, the AI Projects client library offers a set of samples to serve as an illustration for common scenarios. Please see the [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Projects/samples) for details.
896
+
Beyond the introductory scenarios discussed, the AI Agents client library offers support for additional scenarios to help take advantage of the full feature set of the AI services. In order to help explore some of these scenarios, the AI Agents client library offers a set of samples to serve as an illustration for common scenarios. Please see the [Samples](https://github.com/Azure/azure-sdk-for-net/tree/main/sdk/ai/Azure.AI.Agents.Persistent/samples) for details.
897
897
898
898
## Contributing
899
899
@@ -907,10 +907,10 @@ This project has adopted the [Microsoft Open Source Code of Conduct][code_of_con
# Including relevant stubs from https://review.learn.microsoft.com/help/contribute/metadata-taxonomies#product
7
+
- azure
8
+
name: Azure.AI.Agents.Persistent samples for .NET
9
+
description: Samples for the Azure.AI.Agents.Persistent client library.
10
+
---
11
+
12
+
# Azure.AI.Projects Samples for Agents
13
+
14
+
| Sample | Description |
15
+
| ------ | ----------- |
16
+
|[Sample1_PersistentAgents_Additional_messages](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample1_PersistentAgents_Additional_messages.md)| Sample for using additional messages while creating agent run. |
17
+
|[Sample2_PersistentAgents_Azure_Functions](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample2_PersistentAgents_Azure_Functions.md)| Sample for using Azure Functions with agents. |
18
+
|[Sample3_PersistentAgents_Basics](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample3_PersistentAgents_Basics.md)| Sample for basic use of an agent. |
19
+
|[Sample4_PersistentAgents_Bing_Grounding](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample4_PersistentAgents_Bing_Grounding.md)| Sample for use of an agent with Bing grounding. |
20
+
|[Sample5_PersistentAgents_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample5_PersistentAgents_Enterprise_File_Search.md)| Sample enterprise file search with agent. |
21
+
|[Sample6_PersistentAgents_FileSearch](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample6_PersistentAgents_FileSearch.md)| Sample file search with agent. |
22
+
|[Sample7_PersistentAgents_Functions](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample7_PersistentAgents_Functions.md)| Sample using agents with functions. |
23
+
|[Sample8_PersistentAgents_FunctionsWithStreaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample8_PersistentAgents_FunctionsWithStreaming.md)| Sample using agents with functions and streaming. |
24
+
|[Sample9_PersistentAgents_Streaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample9_PersistentAgents_Streaming.md)| Sample using agents with streaming. |
25
+
|[Sample10_PersistentAgents_Vector_Store_Batch_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample10_PersistentAgents_Vector_Store_Batch_File_Search.md)| Sample for batch file search. |
26
+
|[Sample11_PersistentAgents_Code_Interpreter_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample11_PersistentAgents_Code_Interpreter_Enterprise_File_Search.md)| Sample enterprise file search on agent with message attachment and code interpreter. |
27
+
|[Sample12_PersistentAgents_Code_Interpreter_File_Attachment](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample12_PersistentAgents_Code_Interpreter_File_Attachment.md)| Sample file search on agent with message attachment and code interpreter. |
28
+
|[Sample13_PersistentAgents_OpenAPI](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample13_PersistentAgents_OpenAPI.md)| Sample using agents with OpenAPI tool. |
29
+
|[Sample14_PersistentAgents_Azure_AI_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample14_PersistentAgents_Azure_AI_Search.md)| Sample using agents with Azure AI Search tool. |
30
+
|[Sample15_PersistentAgents_Vector_Store_Batch_Enterprise_File_Search](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample15_PersistentAgents_Vector_Store_Batch_Enterprise_File_Search.md)| Sample for enterprise batch file search. |
31
+
|[Sample16_PersistentAgents_Azure_AI_Search_Streaming](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample16_PersistentAgents_Azure_AI_Search_Streaming.md)| Sample using agents with Azure AI Search tool with streaming. |
32
+
|[Sample17_PersistentAgents_ImageUrlInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample17_PersistentAgents_ImageUrlInputs.md)| Sample using agents with Image URL as an input. |
33
+
|[Sample18_PersistentAgents_ImageFileInputs](https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/ai/Azure.AI.Agents.Persistent/samples/Sample18_PersistentAgents_ImageFileInputs.md)| Sample using agents with Image Fileas an input. |
Copy file name to clipboardExpand all lines: sdk/ai/Azure.AI.Agents.Persistent/samples/Sample10_PersistentAgents_Vector_Store_Batch_File_Search.md
+4-4Lines changed: 4 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Sample for Azure.AI.Agents and batch file search.
1
+
# Sample for Azure.AI.Agents.Persistent and batch file search.
2
2
3
3
1. To perform batch file search by an agent, we first need to upload a file, create a vector store, and associate the file to the vector store. Here is an example:
Copy file name to clipboardExpand all lines: sdk/ai/Azure.AI.Agents.Persistent/samples/Sample11_PersistentAgents_Code_Interpreter_Enterprise_File_Search.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,4 @@
1
-
# Sample enterprise file search on agent with message attachment and code interpreter in Azure.AI.Agents.
1
+
# Sample enterprise file search on agent with message attachment and code interpreter in Azure.AI.Agents.Persistent.
2
2
3
3
In this example we demonstrate, how the Azure Blob can be utilized for enterprize file search with `MessageAttachment`.
4
4
@@ -46,7 +46,7 @@ var attachment = new MessageAttachment(
46
46
);
47
47
```
48
48
49
-
4. Create a `ThreadMessage`, which contains the `VectorStoreDataSource` as an attachment.
49
+
4. Create a message, which contains the `VectorStoreDataSource` as an attachment.
0 commit comments