Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Attachment(val fileId: FileId? = null, val tools: List<AssistantTool>? = null)

References an Attachment in the message request.

Link copied to clipboard

A message attachment builder.

Link copied to clipboard
@Serializable
data class FileCitation(val fileId: FileId, val quote: String? = null)
Link copied to clipboard
@Serializable
@SerialName(value = "file_citation")
data class FileCitationAnnotation(val text: String, val startIndex: Int, val endIndex: Int, val fileCitation: FileCitation) : TextAnnotation

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 "retrieval" tool to search files.

Link copied to clipboard
@Serializable
data class FilePath(val path: FileId)
Link copied to clipboard
@Serializable
@SerialName(value = "file_path")
data class FilePathAnnotation(val text: String, val startIndex: Int, val endIndex: Int, val filePath: FilePath) : TextAnnotation

A URL for the file that's generated when the assistant used the code interpreter tool to generate a file.

Link copied to clipboard
@Serializable
data class ImageFile(val fileId: FileId)

References an image File in the content of a message.

Link copied to clipboard
@Serializable
data class Message(val id: MessageId, val createdAt: Int, val threadId: ThreadId, val role: Role, val content: List<MessageContent>, val assistantId: AssistantId? = null, val runId: RunId? = null, val metadata: Map<String, String>)

Represents a message within a thread.

Link copied to clipboard
@Serializable
sealed interface MessageContent

The content of the message as text or image.

Link copied to clipboard
@Serializable
value class MessageId(val id: String)

A message id.

Link copied to clipboard
@Serializable
class MessageRequest(val role: Role, val content: String, val attachments: List<Attachment>? = null, val metadata: Map<String, String>? = null)

Create a message request.

Link copied to clipboard

A message request builder.

Link copied to clipboard
@Serializable
sealed interface TextAnnotation

Annotations for a text.

Link copied to clipboard
@Serializable
data class TextContent(val value: String, val annotations: List<TextAnnotation>)

The text content of the message value and annotations.

Functions

Link copied to clipboard

A message attachment builder.

Link copied to clipboard

A message request builder.