IChatResponseProvider.GetResponseAsync(IEnumerable<ChatMessage>, Boolean, String, CancellationToken) Method
Sends the conversation to the associated AI service and returns the response as a sequence of updates.
Namespace: DevExpress.AIIntegration.Chat
Assembly: DevExpress.AIIntegration.v26.1.dll
NuGet Package: DevExpress.AIIntegration
Declaration
IAsyncEnumerable<ChatResponseUpdate> GetResponseAsync(
IEnumerable<ChatMessage> messages,
bool useStreaming = true,
string conversationId = null,
CancellationToken cancellationToken = default(CancellationToken)
)
Parameters
| Name | Type | Description |
|---|---|---|
| messages | IEnumerable<Microsoft.Extensions.AI.ChatMessage> | The complete conversation history (including the latest user message). |
Optional Parameters
| Name | Type | Default | Description |
|---|---|---|---|
| useStreaming | Boolean | True |
|
| conversationId | String | null | The conversation identifier returned in the previous response. |
| cancellationToken | CancellationToken | null | The token that cancels the request. |
Returns
| Type | Description |
|---|---|
| IAsyncEnumerable<Microsoft.Extensions.AI.ChatResponseUpdate> | An asynchronous sequence of response updates. |
See Also