ExStreamClient.Operations.Chat.Threads (ExStreamClient v0.1.0)

View Source
Modules for interacting with the `chat/threads` group of OpenAI APIs

API Reference: https://platform.openai.com/docs/api-reference/chat/threads

Summary

Functions

get_thread(message_id, opts \\ [])

@spec get_thread(String.t(),
  member_limit: integer(),
  participant_limit: integer(),
  reply_limit: integer()
) :: {:ok, ExStreamClient.Model.GetThreadResponse.t()} | {:error, any()}
Return a specific thread


### Required Arguments:
    - `message_id`
### Optional Arguments:
    - `reply_limit`
    - `participant_limit`
    - `member_limit`

query_threads(payload)

Returns the list of threads for specific user


### Required Arguments:
    - `payload`: QueryThreadsRequest

update_thread_partial(message_id, payload)

Updates certain fields of the thread

Sends events:

  • thread.updated

  • thread.updated

    ### Required Arguments:

      - `message_id`
      - `payload`: UpdateThreadPartialRequest