Share via


MessagesOperations interface

Interface representing a Messages operations.

Properties

create

Creates a new message on a specified thread.

get

Retrieves an existing message.

list

Gets a list of messages that exist on a thread.

update

Modifies an existing message on an existing thread.

Property Details

create

Creates a new message on a specified thread.

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

Property Value

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

get

Retrieves an existing message.

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

Property Value

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

list

Gets a list of messages that exist on a thread.

list: (threadId: string, options?: MessagesListMessagesOptionalParams) => PagedAsyncIterableIterator<ThreadMessage, ThreadMessage[], PageSettings>

Property Value

(threadId: string, options?: MessagesListMessagesOptionalParams) => PagedAsyncIterableIterator<ThreadMessage, ThreadMessage[], PageSettings>

update

Modifies an existing message on an existing thread.

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

Property Value

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