Package-level declarations
Types
Link copied to clipboard
Represents a function that can be called by the AI model.
Link copied to clipboard
data class ChatCompletionRequest(val messages: List<Message>, val model: String, val store: Boolean = false, val reasoningEffort: String = "medium", val metadata: Metadata? = null, val maxCompletionTokens: Int? = null, val frequencyPenalty: Double? = 0.0, val responseFormat: ResponseFormat? = null, val temperature: Double = 1.0, val seed: Int? = null, val stream: Boolean = false, val streamOptions: ChatCompletionStreamOptions? = null, val tools: List<Tool>? = null)
Represents a request for generating a chat-based completions in an OpenAI-like environment.
Link copied to clipboard
Link copied to clipboard
data class CompletionTokensDetails(val reasoningTokens: Int, val acceptedPredictionTokens: Int, val rejectedPredictionTokens: Int)
Detailed breakdown of completion tokens by category.
Link copied to clipboard
Represents an incremental message update in a streaming chat completion.
Link copied to clipboard
data class FunctionObject(val name: String, val description: String? = null, val parameters: JsonElement? = null, val strict: Boolean? = false)
Represents a function that can be called by the model.
Link copied to clipboard
data class Message(val role: ChatCompletionRole, val content: MessageContent, val refusal: String? = null, val toolCalls: List<ToolCall>? = null)
Represents a message in a chat completion.
Link copied to clipboard
Mock implementation of an OpenAI-compatible service for testing purposes.
Link copied to clipboard
data class ResponseFormat(val type: String, val jsonSchema: ResponseFormat.SchemaDescriptor? = null)
Specifies the format that the model must output.
Link copied to clipboard
Detailed breakdown of prompt tokens by category.
Link copied to clipboard
Represents a tool that can be called by the model.
Link copied to clipboard
Represents a tool call generated by the model.
Link copied to clipboard
data class Usage(val promptTokens: Int, val completionTokens: Int, val totalTokens: Int, val completionTokensDetails: CompletionTokensDetails, val promptTokensDetails: TokenDetails? = null)
Usage statistics for a completion request.