summarizeChat method

Future<DynamiteResponse<ChatSummarizeChatResponseApplicationJson, void>> summarizeChat({
  1. required String token,
  2. required ChatSummarizeChatRequestApplicationJson $body,
  3. ChatSummarizeChatApiVersion? apiVersion,
  4. 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:

  • apiVersion Defaults to "v1".
  • token
  • oCSAPIRequest Required to be true for the API request to pass. Defaults to true.

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:

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);
}