Package version:

Interface MessagesOperations

Interface representing a Messages operations.

interface MessagesOperations {
    create: ((threadId: string, role: MessageRole, content: MessageInputContent, options?: MessagesCreateMessageOptionalParams) => Promise<ThreadMessage>);
    get: ((threadId: string, messageId: string, options?: MessagesGetMessageOptionalParams) => Promise<ThreadMessage>);
    list: ((threadId: string, options?: MessagesListMessagesOptionalParams) => PagedAsyncIterableIterator<ThreadMessage, {}, PageSettings>);
    update: ((threadId: string, messageId: string, options?: MessagesUpdateMessageOptionalParams) => Promise<ThreadMessage>);
}

Properties

Properties

create: ((threadId: string, role: MessageRole, content: MessageInputContent, options?: MessagesCreateMessageOptionalParams) => Promise<ThreadMessage>)

Creates a new message on a specified thread.

get: ((threadId: string, messageId: string, options?: MessagesGetMessageOptionalParams) => Promise<ThreadMessage>)

Retrieves an existing message.

Gets a list of messages that exist on a thread.

update: ((threadId: string, messageId: string, options?: MessagesUpdateMessageOptionalParams) => Promise<ThreadMessage>)

Modifies an existing message on an existing thread.