=encoding utf8

=head1 NAME

OpenAPI::Client::OpenAI::Path::threads-thread_id-messages-message_id - Documentation for the /threads/{thread_id}/messages/{message_id} path.

=head1 OPERATIONS

=head2 DELETE /threads/{thread_id}/messages/{message_id}

=head3 deleteMessage

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

Deletes a message.

=head4 Path/query parameters

=over

=item * C<thread_id> (in path, required, string) - The ID of the thread to which this message belongs.

=item * C<message_id> (in path, required, string) - The ID of the message to delete.

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "deleted" : false,
       "id" : "string",
       "object" : "thread.message.deleted"
    }

=head2 GET /threads/{thread_id}/messages/{message_id}

=head3 getMessage

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

Retrieve a message.

=head4 Path/query parameters

=over

=item * C<thread_id> (in path, required, string) - The ID of the L<thread|https://platform.openai.com/docs/api-reference/threads>
to which this message belongs.

=item * C<message_id> (in path, required, string) - The ID of the message to retrieve.

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "assistant_id" : "asst_abc123",
       "attachments" : [],
       "content" : [
          {
             "text" : {
                "annotations" : [],
                "value" : "Hi! How can I help you today?"
             },
             "type" : "text"
          }
       ],
       "created_at" : 1698983503,
       "id" : "msg_abc123",
       "metadata" : {},
       "object" : "thread.message",
       "role" : "assistant",
       "run_id" : "run_abc123",
       "thread_id" : "thread_abc123"
    }

=head2 POST /threads/{thread_id}/messages/{message_id}

=head3 modifyMessage

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

Modifies a message.

=head4 Path/query parameters

=over

=item * C<thread_id> (in path, required, string) - The ID of the thread to which this message belongs.

=item * C<message_id> (in path, required, string) - The ID of the message to modify.

=back

=head4 Responses

B<200 - OK>

Content-Type: application/json

Example:

    {
       "assistant_id" : "asst_abc123",
       "attachments" : [],
       "content" : [
          {
             "text" : {
                "annotations" : [],
                "value" : "Hi! How can I help you today?"
             },
             "type" : "text"
          }
       ],
       "created_at" : 1698983503,
       "id" : "msg_abc123",
       "metadata" : {},
       "object" : "thread.message",
       "role" : "assistant",
       "run_id" : "run_abc123",
       "thread_id" : "thread_abc123"
    }

=head1 SCHEMAS

=head2 DeleteMessageResponse

Properties:

=over

=item * C<deleted> (boolean, required)

=item * C<id> (string, required)

=item * C<object> (string, required)

Allowed values: thread.message.deleted

=back

=head2 MessageObject

Properties:

=over

=item * C<assistant_id> (anyOf, required)

=item * C<attachments> (anyOf, required)

=item * C<completed_at> (anyOf, required)

=item * C<content> (array of object, required) - The content of the message in array of text and/or images.

=item * C<created_at> (integer, required) - The Unix timestamp (in seconds) for when the message was created.

=item * C<id> (string, required) - The identifier, which can be referenced in API endpoints.

=item * C<incomplete_at> (anyOf, required)

=item * C<incomplete_details> (anyOf, required)

=item * C<metadata> (Metadata, required)

See L</Metadata> below for shape.

=item * C<object> (string, required) - The object type, which is always C<thread.message> .

Allowed values: thread.message

=item * C<role> (string, required) - The entity that produced the message. One of C<user> or C<assistant> .

Allowed values: user, assistant

=item * C<run_id> (anyOf, required)

=item * C<status> (string, required) - The status of the message, which can be either C<in_progress> , C<incomplete>
, or C<completed> .

Allowed values: in_progress, incomplete, completed

=item * C<thread_id> (string, required) - The L<thread|https://platform.openai.com/docs/api-reference/threads> ID that
this message belongs to.

=back

=head2 Metadata

Set of 16 key-value pairs that can be attached to an object. This can be
useful for storing additional information about the object in a structured
format, and querying for objects via API or the dashboard.

Keys are strings with a maximum length of 64 characters. Values are strings
with a maximum length of 512 characters.

=head2 ModifyMessageRequest

Properties:

=over

=item * C<metadata> (Metadata)

See L</Metadata> below for shape.

=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
