=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::chat-completions-completion_id-messages - Documentation for the /chat/completions/{completion_id}/messages path.

=head1 OPERATIONS

=head2 GET /chat/completions/{completion_id}/messages

=head3 getChatCompletionMessages

  $client->get_chat_completion_messages({
      body => { ... },
  });

Get the messages in a stored chat completion. Only Chat Completions that have
been created with the C<store> parameter set to C<true> will be returned.

=head4 Path/query parameters

=over

=item * C<completion_id> (in path, required, string) - The ID of the chat completion to retrieve messages from.

=item * C<after> (in query, optional, string) - Identifier for the last message from the previous pagination request.

=item * C<limit> (in query, optional, integer) - Number of messages to retrieve.

Default: 20

=item * C<order> (in query, optional, string) - Sort order for messages by timestamp. Use C<asc> for ascending order or
C<desc> for descending order. Defaults to C<asc> .

Allowed values: asc, desc

Default: asc

=back

=head4 Responses

B<200 - A list of messages>

Content-Type: application/json

Example:

    {
       "data" : [
          {
             "content" : "write a haiku about ai",
             "content_parts" : null,
             "id" : "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0",
             "name" : null,
             "role" : "user"
          }
       ],
       "first_id" : "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0",
       "has_more" : false,
       "last_id" : "chatcmpl-AyPNinnUqUDYo9SAdA52NobMflmj2-0",
       "object" : "list"
    }

=head1 SCHEMAS

=head2 ChatCompletionMessageList

Properties:

=over

=item * C<data> (array of object, required) - An array of chat completion message objects.

=item * C<first_id> (string, required) - The identifier of the first chat message in the data array.

=item * C<has_more> (boolean, required) - Indicates whether there are more chat messages available.

=item * C<last_id> (string, required) - The identifier of the last chat message in the data array.

=item * C<object> (string, required) - The type of this object. It is always set to "list".

Allowed values: list

Default: list

=back

=head1 SEE ALSO

L<OpenAPI::Client::OpenAI::Path>

=head1 COPYRIGHT AND LICENSE

Copyright (C) 2023-2026 by Nelson Ferraz

This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself, either Perl version 5.14.0 or,
at your option, any later version of Perl 5 you may have available.

=cut
