Packages

trait Threads extends AnyRef

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Threads
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def cancelRun(thread_id: String, run_id: String): ZIO[Any, OpenAIFailure, RunObject]

    Cancels a run that is in_progress.

    Cancels a run that is in_progress.

    thread_id

    The ID of the thread to which this run belongs.

    run_id

    The ID of the run to cancel.

  2. abstract def createMessage(thread_id: String, body: CreateMessageRequest): ZIO[Any, OpenAIFailure, MessageObject]

    Create a message.

    Create a message.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) to create a message for.

  3. abstract def createRun(thread_id: String, body: CreateRunRequest): ZIO[Any, OpenAIFailure, RunObject]

    Create a run.

    Create a run.

    thread_id

    The ID of the thread to run.

  4. abstract def createThread(body: CreateThreadRequest): ZIO[Any, OpenAIFailure, ThreadObject]

    Create a thread.

  5. abstract def createThreadAndRun(body: CreateThreadAndRunRequest): ZIO[Any, OpenAIFailure, RunObject]

    Create a thread and run it in one request.

  6. abstract def deleteThread(thread_id: String): ZIO[Any, OpenAIFailure, DeleteThreadResponse]

    Delete a thread.

    Delete a thread.

    thread_id

    The ID of the thread to delete.

  7. abstract def getMessage(thread_id: String, message_id: String): ZIO[Any, OpenAIFailure, MessageObject]

    Retrieve a message.

    Retrieve a message.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) to which this message belongs.

    message_id

    The ID of the message to retrieve.

  8. abstract def getMessageFile(thread_id: String, message_id: String, file_id: String): ZIO[Any, OpenAIFailure, MessageFileObject]

    Retrieves a message file.

    Retrieves a message file.

    thread_id

    The ID of the thread to which the message and File belong.

    message_id

    The ID of the message the file belongs to.

    file_id

    The ID of the file being retrieved.

  9. abstract def getRun(thread_id: String, run_id: String): ZIO[Any, OpenAIFailure, RunObject]

    Retrieves a run.

    Retrieves a run.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) that was run.

    run_id

    The ID of the run to retrieve.

  10. abstract def getRunStep(thread_id: String, run_id: String, step_id: String): ZIO[Any, OpenAIFailure, RunStepObject]

    Retrieves a run step.

    Retrieves a run step.

    thread_id

    The ID of the thread to which the run and run step belongs.

    run_id

    The ID of the run to which the run step belongs.

    step_id

    The ID of the run step to retrieve.

  11. abstract def getThread(thread_id: String): ZIO[Any, OpenAIFailure, ThreadObject]

    Retrieves a thread.

    Retrieves a thread.

    thread_id

    The ID of the thread to retrieve.

  12. abstract def listMessageFiles(thread_id: String, message_id: String, limit: Optional[Int] = Optional.Absent, order: Optional[ThreadsListMessageFilesOrder] = Optional.Absent, after: Optional[String] = Optional.Absent, before: Optional[String] = Optional.Absent): ZIO[Any, OpenAIFailure, ListMessageFilesResponse]

    Returns a list of message files.

    Returns a list of message files.

    thread_id

    The ID of the thread that the message and files belong to.

    message_id

    The ID of the message that the files belongs to.

    limit

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    order

    Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

    after

    A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

    before

    A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

  13. abstract def listMessages(thread_id: String, limit: Optional[Int] = Optional.Absent, order: Optional[ThreadsListMessagesOrder] = Optional.Absent, after: Optional[String] = Optional.Absent, before: Optional[String] = Optional.Absent): ZIO[Any, OpenAIFailure, ListMessagesResponse]

    Returns a list of messages for a given thread.

    Returns a list of messages for a given thread.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) the messages belong to.

    limit

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    order

    Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

    after

    A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

    before

    A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

  14. abstract def listRunSteps(thread_id: String, run_id: String, limit: Optional[Int] = Optional.Absent, order: Optional[ThreadsListRunStepsOrder] = Optional.Absent, after: Optional[String] = Optional.Absent, before: Optional[String] = Optional.Absent): ZIO[Any, OpenAIFailure, ListRunStepsResponse]

    Returns a list of run steps belonging to a run.

    Returns a list of run steps belonging to a run.

    thread_id

    The ID of the thread the run and run steps belong to.

    run_id

    The ID of the run the run steps belong to.

    limit

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    order

    Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

    after

    A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

    before

    A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

  15. abstract def listRuns(thread_id: String, limit: Optional[Int] = Optional.Absent, order: Optional[ThreadsListRunsOrder] = Optional.Absent, after: Optional[String] = Optional.Absent, before: Optional[String] = Optional.Absent): ZIO[Any, OpenAIFailure, ListRunsResponse]

    Returns a list of runs belonging to a thread.

    Returns a list of runs belonging to a thread.

    thread_id

    The ID of the thread the run belongs to.

    limit

    A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 20.

    order

    Sort order by the created_at timestamp of the objects. asc for ascending order and desc for descending order.

    after

    A cursor for use in pagination. after is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include after=obj_foo in order to fetch the next page of the list.

    before

    A cursor for use in pagination. before is an object ID that defines your place in the list. For instance, if you make a list request and receive 100 objects, ending with obj_foo, your subsequent call can include before=obj_foo in order to fetch the previous page of the list.

  16. abstract def modifyMessage(thread_id: String, message_id: String, body: ModifyMessageRequest): ZIO[Any, OpenAIFailure, MessageObject]

    Modifies a message.

    Modifies a message.

    thread_id

    The ID of the thread to which this message belongs.

    message_id

    The ID of the message to modify.

  17. abstract def modifyRun(thread_id: String, run_id: String, body: ModifyRunRequest): ZIO[Any, OpenAIFailure, RunObject]

    Modifies a run.

    Modifies a run.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) that was run.

    run_id

    The ID of the run to modify.

  18. abstract def modifyThread(thread_id: String, body: ModifyThreadRequest): ZIO[Any, OpenAIFailure, ThreadObject]

    Modifies a thread.

    Modifies a thread.

    thread_id

    The ID of the thread to modify. Only the metadata can be modified.

  19. abstract def submitToolOuputsToRun(thread_id: String, run_id: String, body: SubmitToolOutputsRunRequest): ZIO[Any, OpenAIFailure, RunObject]

    When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed.

    When a run has the status: "requires_action" and required_action.type is submit_tool_outputs, this endpoint can be used to submit the outputs from the tool calls once they're all completed. All outputs must be submitted in a single request.

    thread_id

    The ID of the [thread](/docs/api-reference/threads) to which this run belongs.

    run_id

    The ID of the run that requires the tool output submission.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native()
  6. def createThread(messages: Optional[Chunk[CreateMessageRequest]] = Optional.Absent, metadata: Optional[Metadata] = Optional.Absent): ZIO[Any, OpenAIFailure, ThreadObject]

    Create a thread.

    Create a thread.

    messages

    A list of [messages](/docs/api-reference/messages) to start the thread with.

    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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

  7. def createThreadAndRun(assistantId: String, thread: Optional[CreateThreadRequest] = Optional.Absent, model: Optional[String] = Optional.Absent, instructions: Optional[String] = Optional.Absent, tools: Optional[Chunk[ToolsItem]] = Optional.Absent, metadata: Optional[Metadata] = Optional.Absent): ZIO[Any, OpenAIFailure, RunObject]

    Create a thread and run it in one request.

    Create a thread and run it in one request.

    assistantId

    The ID of the [assistant](/docs/api-reference/assistants) to use to execute this run.

    model

    The ID of the [Model](/docs/api-reference/models) to be used to execute this run. If a value is provided here, it will override the model associated with the assistant. If not, the model associated with the assistant will be used.

    instructions

    Override the default system message of the assistant. This is useful for modifying the behavior on a per-run basis.

    tools

    Override the tools the assistant can use for this run. This is useful for modifying the behavior on a per-run basis.

    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. Keys can be a maximum of 64 characters long and values can be a maxium of 512 characters long.

  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable])
  11. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  18. def toString(): String
    Definition Classes
    AnyRef → Any
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()

Inherited from AnyRef

Inherited from Any

Ungrouped