Package-level declarations

Types

Link copied to clipboard
@Serializable
data class FileCitation(val fileId: FileId, val quote: String)
Link copied to clipboard
@Serializable
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
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 fileIds: List<FileId>, val metadata: Map<String, String>)

Represents a message within a thread.

Link copied to clipboard
@Serializable
interface MessageContent

The content of the message as text or image.

Link copied to clipboard
@Serializable
data class MessageFile(val id: FileId, val createdAt: Int? = null, val messageId: MessageId? = null)

File attached to a message.

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 fileIds: List<FileId>? = null, val metadata: Map<String, String>? = null)

Create a message request.

Link copied to clipboard

A message request builder.

Link copied to clipboard
@Serializable
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 request builder.