.NET: [BREAKING] Add support for multiple AIContextProviders on a ChatClientAgent (#3863)

* Add support for multiple AIContextProviders on a ChatClientAgent

* Address PR comments and fix tests

* Address PR comments.
This commit is contained in:
westey
2026-02-12 14:15:54 +00:00
committed by GitHub
Unverified
parent f44fe17479
commit 210d0b8828
16 changed files with 586 additions and 73 deletions
@@ -29,7 +29,7 @@ AIAgent agent = new AzureOpenAIClient(
.AsAIAgent(new ChatClientAgentOptions
{
ChatOptions = new() { Instructions = "You are a helpful support specialist for Contoso Outdoors. Answer questions using the provided context and cite the source document when available." },
AIContextProvider = new TextSearchProvider(MockSearchAsync, textSearchOptions)
AIContextProviders = [new TextSearchProvider(MockSearchAsync, textSearchOptions)]
});
AgentSession session = await agent.CreateSessionAsync();