NAME

OpenAPI::Client::OpenAI::Path::threads - Documentation for the /threads path.

DESCRIPTION

This document describes the API endpoint at /threads.

See the examples/ directory in the distribution for examples of how to use this.

POST /threads

Create a thread.

Operation ID

createThread

$client->createThread( ... );

Request Body

Content Type: application/json

Example:

{
   "tool_resources" : {
      "code_interpreter" : {
         "file_ids" : [
            null
         ]
      },
      "file_search" : {
         "vector_store_ids" : [
            null
         ],
         "vector_stores" : [
            {
               "file_ids" : [
                  null
               ]
            }
         ]
      }
   },
   "messages" : [
      {
         "attachments" : [
            {
               "tools" : [
                  null
               ]
            }
         ]
      }
   ]
}

Responses

Status Code: 200

OK

Content Types:

  • application/json

    Example:

    {
       "tool_resources" : {
          "file_search" : {
             "vector_store_ids" : [
                null
             ]
          },
          "code_interpreter" : {
             "file_ids" : [
                null
             ]
          }
       }
    }

SEE ALSO

OpenAPI::Client::OpenAI::Path

COPYRIGHT AND LICENSE

Copyright (C) 2023-2025 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.