Messages
Build Assistants that can call models and use tools.
List messages
Create message
Modify message
Retrieve message
Delete message
ModelsExpand Collapse
type AnnotationUnion interface{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type FileCitationAnnotation struct{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type AnnotationDeltaUnion interface{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type FileCitationDeltaAnnotation struct{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type FileCitationDeltaAnnotation struct{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type ImageFile struct{…}
The File ID of the image in the message content. Set purpose="vision" when uploading the File if you need to later display the file content.
type ImageFileDelta struct{…}
Detail ImageFileDeltaDetailOptionalSpecifies the detail level of the image if specified by the user. low uses fewer tokens, you can opt in to high resolution using high.
Specifies the detail level of the image if specified by the user. low uses fewer tokens, you can opt in to high resolution using high.
The File ID of the image in the message content. Set purpose="vision" when uploading the File if you need to later display the file content.
type ImageFileDeltaBlock struct{…}References an image File in the content of a message.
References an image File in the content of a message.
type ImageURLContentBlock struct{…}References an image URL in the content of a message.
References an image URL in the content of a message.
type Message struct{…}Represents a message within a thread.
Represents a message within a thread.
If applicable, the ID of the assistant that authored this message.
Attachments []MessageAttachmentA list of files attached to the message, and the tools they were added to.
A list of files attached to the message, and the tools they were added to.
Content []MessageContentUnionThe content of the message in array of text and/or images.
The content of the message in array of text and/or images.
IncompleteDetails MessageIncompleteDetailsOn an incomplete message, details about why the message is incomplete.
On an incomplete message, details about why the message is incomplete.
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, and querying for objects via API or the dashboard.
Keys are strings with a maximum length of 64 characters. Values are strings with a maximum length of 512 characters.
The ID of the run associated with the creation of this message. Value is null when messages are created manually using the create message or create thread endpoints.
Status MessageStatusThe status of the message, which can be either in_progress, incomplete, or completed.
The status of the message, which can be either in_progress, incomplete, or completed.
The thread ID that this message belongs to.
type MessageContentUnion interface{…}References an image File in the content of a message.
References an image File in the content of a message.
type MessageContentDeltaUnion interface{…}References an image File in the content of a message.
References an image File in the content of a message.
type ImageFileDeltaBlock struct{…}References an image File in the content of a message.
References an image File in the content of a message.
type MessageContentPartParamUnionResp interface{…}References an image File in the content of a message.
References an image File in the content of a message.
type MessageDelta struct{…}The delta containing the fields that have changed on the Message.
The delta containing the fields that have changed on the Message.
The content of the message in array of text and/or images.
The content of the message in array of text and/or images.
type ImageFileDeltaBlock struct{…}References an image File in the content of a message.
References an image File in the content of a message.
type MessageDeltaEvent struct{…}Represents a message delta i.e. any changed fields on a message during streaming.
Represents a message delta i.e. any changed fields on a message during streaming.
The delta containing the fields that have changed on the Message.
type Text struct{…}
Annotations []AnnotationUnion
type FileCitationAnnotation struct{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
type TextContentBlock struct{…}The text content that is part of a message.
The text content that is part of a message.
type TextDelta struct{…}
type FileCitationDeltaAnnotation struct{…}A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.
A citation within the message that points to a specific quote from a specific File associated with the assistant or the message. Generated when the assistant uses the “file_search” tool to search files.