Messages

interface Messages

Create messages within threads

Inheritors

Functions

Link copied to clipboard
abstract suspend fun message(threadId: ThreadId, messageId: MessageId, requestOptions: RequestOptions? = null): Message

Retrieve a message.

abstract suspend fun message(threadId: ThreadId, request: MessageRequest, requestOptions: RequestOptions? = null): Message

Create a message.

abstract suspend fun message(threadId: ThreadId, messageId: MessageId, metadata: Map<String, String>? = null, requestOptions: RequestOptions? = null): Message

Modify a message.

Link copied to clipboard
abstract suspend fun messages(threadId: ThreadId, limit: Int? = null, order: SortOrder? = null, after: MessageId? = null, before: MessageId? = null, requestOptions: RequestOptions? = null): List<Message>

Returns a list of messages for a given thread.