RoutingContext Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Provides request-specific inputs to a RoutingChatClient.
public ref class RoutingContext
[System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")]
public class RoutingContext
[<System.Diagnostics.CodeAnalysis.Experimental("MEAI001", UrlFormat="https://aka.ms/dotnet-extensions-warnings/{0}")>]
type RoutingContext = class
Public Class RoutingContext
- Inheritance
-
RoutingContext
- Attributes
Remarks
One context is created for each call to GetResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken) and for each enumeration started from the sequence returned by GetStreamingResponseAsync(IEnumerable<ChatMessage>, ChatOptions, CancellationToken).
ChatOptions is cloned (via Clone()) from the caller-supplied instance when the context is created, so that instance is never handed to a selected client and subsequent changes to it are not observed. The clone is shallow, so referenced objects may still be shared.
Constructors
| Name | Description |
|---|---|
| RoutingContext(IEnumerable<ChatMessage>, ChatOptions) |
Initializes a new instance of the RoutingContext class. |
Properties
| Name | Description |
|---|---|
| ChatOptions |
Gets the options for the request. |
| Messages |
Gets the messages supplied to client selection and the selected client. |