Packages

class Live extends Threads

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

Instance Constructors

  1. new Live(client: Client, baseURL: URL, apiKey: Secret, boundary: Boundary)

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 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.

    Definition Classes
    LiveThreads
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. 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.

    Definition Classes
    LiveThreads
  8. 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.

    Definition Classes
    LiveThreads
  9. def createThread(body: CreateThreadRequest): ZIO[Any, OpenAIFailure, ThreadObject]

    Create a thread.

    Create a thread.

    Definition Classes
    LiveThreads
  10. 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.

    Definition Classes
    Threads
  11. def createThreadAndRun(body: CreateThreadAndRunRequest): ZIO[Any, OpenAIFailure, RunObject]

    Create a thread and run it in one request.

    Create a thread and run it in one request.

    Definition Classes
    LiveThreads
  12. 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.

    Definition Classes
    Threads
  13. def deleteThread(thread_id: String): ZIO[Any, OpenAIFailure, DeleteThreadResponse]

    Delete a thread.

    Delete a thread.

    thread_id

    The ID of the thread to delete.

    Definition Classes
    LiveThreads
  14. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  16. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  17. 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.

    Definition Classes
    LiveThreads
  18. 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.

    Definition Classes
    LiveThreads
  19. 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.

    Definition Classes
    LiveThreads
  20. 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.

    Definition Classes
    LiveThreads
  21. def getThread(thread_id: String): ZIO[Any, OpenAIFailure, ThreadObject]

    Retrieves a thread.

    Retrieves a thread.

    thread_id

    The ID of the thread to retrieve.

    Definition Classes
    LiveThreads
  22. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  23. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  24. 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.

    Definition Classes
    LiveThreads
  25. 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.

    Definition Classes
    LiveThreads
  26. 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.

    Definition Classes
    LiveThreads
  27. 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.

    Definition Classes
    LiveThreads
  28. 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.

    Definition Classes
    LiveThreads
  29. 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.

    Definition Classes
    LiveThreads
  30. 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.

    Definition Classes
    LiveThreads
  31. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  32. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  33. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  34. 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.

    Definition Classes
    LiveThreads
  35. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  36. def toString(): String
    Definition Classes
    AnyRef → Any
  37. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  38. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  39. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Threads

Inherited from AnyRef

Inherited from Any

Ungrouped