Skip to content

Commit 8e101ec

Browse files
nick863Copilot
andauthored
Return PersistentAgentsClient insead of AgentsAdministration client (Azure#49913)
* Fix readme files * Set extension method to return the Persistent agent client. * Update sdk/ai/Azure.AI.Agents.Persistent/samples/Sample7_PersistentAgents_Functions.md Co-authored-by: Copilot <[email protected]> * Update sdk/ai/Azure.AI.Agents.Persistent/README.md Co-authored-by: Copilot <[email protected]> * Generate APIView --------- Co-authored-by: Copilot <[email protected]>
1 parent eb27e47 commit 8e101ec

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

sdk/ai/Azure.AI.Agents.Persistent/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ After the processing, the output queue should contain the message with the follo
818818
"CorrelationId": "42"
819819
}
820820
```
821-
Please note that the in input `CorrelationId` value is the same as in the output.
821+
Please note that the input `CorrelationId` value is the same as in the output.
822822
*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.
823823
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.
824824

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ public PersistentAgentsClient(string endpoint, Azure.Core.TokenCredential creden
11621162
}
11631163
public static partial class PersistentAgentsExtensions
11641164
{
1165-
public static Azure.AI.Agents.Persistent.PersistentAgentsAdministration GetPersistentAgentAdministrationClient(this System.ClientModel.Primitives.ClientConnectionProvider provider) { throw null; }
1165+
public static Azure.AI.Agents.Persistent.PersistentAgentsClient GetPersistentAgentsClient(this System.ClientModel.Primitives.ClientConnectionProvider provider) { throw null; }
11661166
}
11671167
public partial class PersistentAgentsFiles
11681168
{

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1162,7 +1162,7 @@ public PersistentAgentsClient(string endpoint, Azure.Core.TokenCredential creden
11621162
}
11631163
public static partial class PersistentAgentsExtensions
11641164
{
1165-
public static Azure.AI.Agents.Persistent.PersistentAgentsAdministration GetPersistentAgentAdministrationClient(this System.ClientModel.Primitives.ClientConnectionProvider provider) { throw null; }
1165+
public static Azure.AI.Agents.Persistent.PersistentAgentsClient GetPersistentAgentsClient(this System.ClientModel.Primitives.ClientConnectionProvider provider) { throw null; }
11661166
}
11671167
public partial class PersistentAgentsFiles
11681168
{

sdk/ai/Azure.AI.Agents.Persistent/samples/Sample7_PersistentAgents_Functions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Sample using agents with functions in Azure.AI.Agents.Persistent.
22

3-
In this example we are demonstrating how to use the local functions with the agents. The functions can be used to provide agent with specific information in response to user question.
3+
In this example we are demonstrating how to use the local functions with the agents. The functions can be used to provide the agent with specific information in response to a user question.
44

55
1. First we need to create agent client and read the environment variables that will be used in the next steps.
66
```C# Snippet:AgentsFunctions_CreateClient

sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public static class PersistentAgentsExtensions
2020
/// </summary>
2121
/// <param name="provider"></param>
2222
/// <returns></returns>
23-
public static PersistentAgentsAdministration GetPersistentAgentAdministrationClient(this ClientConnectionProvider provider)
23+
public static PersistentAgentsClient GetPersistentAgentsClient(this ClientConnectionProvider provider)
2424
{
2525
PersistentAgentsAdministrationKey key = new();
2626
PersistentAgentsAdministration agentsClient = provider.Subclients.GetClient(key , () => CreateAdministrationAgentsClient(provider));
27-
return agentsClient;
27+
return new PersistentAgentsClient(agentsClient);
2828
}
2929

3030
private static PersistentAgentsAdministration CreateAdministrationAgentsClient(this ClientConnectionProvider provider)

0 commit comments

Comments
 (0)