summarizeChat method
Future<DynamiteResponse<ChatSummarizeChatResponseApplicationJson, void> >
summarizeChat({
- required String token,
- required ChatSummarizeChatRequestApplicationJson $body,
- ChatSummarizeChatApiVersion? apiVersion,
- bool? oCSAPIRequest,
Summarize the next bunch of chat messages from a given offset.
Required capability: chat-summary-api.
Returns a Future containing a DynamiteResponse with the status code, deserialized body and headers.
Throws a DynamiteApiException if the API call does not return an expected status code.
Parameters:
apiVersionDefaults to"v1".tokenoCSAPIRequestRequired to be true for the API request to pass. Defaults totrue.
Status codes:
- 201: Summary was scheduled, use the returned taskId to get the status information and output from the TaskProcessing API: OCS TaskProcessing API. If the response data contains nextOffset, not all messages could be handled in a single request. After receiving the response a second summary should be requested with the provided nextOffset.
- 400: No AI provider available or summarizing failed
- 204: No messages found to summarize
- 500
See:
- $summarizeChat_Request for the request send by this method.
- $summarizeChat_Serializer for a converter to parse the
Responsefrom an executed request.
Implementation
Future<_i1.DynamiteResponse<ChatSummarizeChatResponseApplicationJson, void>> summarizeChat({
required String token,
required ChatSummarizeChatRequestApplicationJson $body,
ChatSummarizeChatApiVersion? apiVersion,
bool? oCSAPIRequest,
}) async {
final _request = $summarizeChat_Request(
token: token,
apiVersion: apiVersion,
oCSAPIRequest: oCSAPIRequest,
$body: $body,
);
final _streamedResponse = await _rootClient.httpClient.send(_request);
final _response = await _i3.Response.fromStream(_streamedResponse);
final _serializer = $summarizeChat_Serializer();
return _i1.ResponseConverter<ChatSummarizeChatResponseApplicationJson, void>(_serializer).convert(_response);
}