6 instantiations of RoutingContext
Microsoft.Extensions.AI (2)
ChatRouting\FailoverChatClient.cs (2)
102var context = new RoutingContext(messages, options); 171var context = new RoutingContext(messages, options);
Microsoft.Extensions.AI.Abstractions (2)
ChatRouting\RoutingChatClient.cs (2)
69var context = new RoutingContext(messages, options); 86var context = new RoutingContext(messages, options);
Microsoft.Extensions.AI.Abstractions.Tests (2)
ChatRouting\RoutingContextTests.cs (2)
17var context = new RoutingContext(messages, options); 24Assert.Throws<ArgumentNullException>(() => new RoutingContext(null!, options));
33 references to RoutingContext
Microsoft.Extensions.AI (7)
ChatRouting\FailoverChatClient.cs (3)
91RoutingContext context, 102var context = new RoutingContext(messages, options); 171var context = new RoutingContext(messages, options);
ChatRouting\OrderedFailoverChatClient.cs (3)
36private readonly ConcurrentDictionary<RoutingContext, int> _requestStates = new(); 71RoutingContext context, 84RoutingContext context,
ChatRouting\SemanticRoutingChatClient.cs (1)
172RoutingContext context,
Microsoft.Extensions.AI.Abstractions (10)
ChatRouting\RoutingChatClient.cs (9)
28/// <see cref="RoutingContext.ChatOptions"/> holds the options for the request and is what the selected client 43Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> clientSelector) 56/// <see cref="RoutingContext.ChatOptions"/> changes the options for the request itself, including any later 60RoutingContext context, 69var context = new RoutingContext(messages, options); 86var context = new RoutingContext(messages, options); 123private readonly Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> _clientSelector; 126Func<RoutingContext, CancellationToken, ValueTask<IChatClient>> clientSelector) 132RoutingContext context,
ChatRouting\RoutingContext.cs (1)
26/// <summary>Initializes a new instance of the <see cref="RoutingContext"/> class.</summary>
Microsoft.Extensions.AI.Abstractions.Tests (5)
ChatRouting\RoutingChatClientTests.cs (4)
36RoutingContext? observedContext = null; 145private readonly Func<RoutingContext, IChatClient> _select; 147public DelegatingTestRouter(Func<RoutingContext, IChatClient> select) 153RoutingContext context,
ChatRouting\RoutingContextTests.cs (1)
17var context = new RoutingContext(messages, options);
Microsoft.Extensions.AI.Tests (11)
ChatRouting\FailoverChatClientTests.cs (11)
47RoutingContext? selectedContext = null; 372RoutingContext? initialContext = null; 1195private readonly Func<RoutingContext, IChatClient> _select; 1197public DelegatingTestRouter(Func<RoutingContext, IChatClient> select) 1203RoutingContext context, 1210private readonly Func<RoutingContext, IChatClient> _select; 1211private readonly Action<RoutingContext, FailoverChatClientAttempt, bool>? _onRoutingUpdate; 1214Func<RoutingContext, IChatClient> select, 1215Action<RoutingContext, FailoverChatClientAttempt, bool>? onRoutingUpdate = null) 1222RoutingContext context, 1227RoutingContext context,