CompletionResponse

@Serializable
data class CompletionResponse(val requestId: String = UUID.randomUUID().toString(), val sender: String = "", val documents: List<Document> = emptyList(), val timestamp: Long = 0, val index: Int = 0, val content: String? = null, val end: Boolean = true, val suggestions: List<Suggestion>? = null, val additionalContext: AdditionalContext? = null, val links: List<Link> = emptyList(), val state: AiAssistantEvents = AiAssistantEvents.Loading)

Response from an AI Assistant completion request.

Constructors

Link copied to clipboard
constructor(requestId: String = UUID.randomUUID().toString(), sender: String = "", documents: List<Document> = emptyList(), timestamp: Long = 0, index: Int = 0, content: String? = null, end: Boolean = true, suggestions: List<Suggestion>? = null, additionalContext: AdditionalContext? = null, links: List<Link> = emptyList(), state: AiAssistantEvents = AiAssistantEvents.Loading)

Properties

Link copied to clipboard

Optional additional context information.

Link copied to clipboard

The text content of the AI response.

Link copied to clipboard

The list of documents associated with this response.

Link copied to clipboard

Whether this is the final response in a streaming sequence.

Link copied to clipboard
val index: Int

The index of this response in a streaming sequence.

Link copied to clipboard

List of hyperlinks included in the response.

Link copied to clipboard

Returns the quoted context text when suggestions are present, or null otherwise.

Link copied to clipboard

A unique identifier for this response, matching the original request.

Link copied to clipboard

The sender of this response (e.g., "ai", "system").

Link copied to clipboard

The current state of the AI Assistant event.

Link copied to clipboard

Optional list of suggested follow-up actions.

Link copied to clipboard

The Unix timestamp when this response was generated.