ChatCompletion

@JsonSerializable
data class ChatCompletion(val model: ModelName, val messages: List<Message>, val max_tokens: Int? = null, val temperature: Temperature = Temperature.ONE, val top_p: Double = 1.0, val seed: Int = 1, val stop: List<String>? = null, val presence_penalty: Double = 0.0, val frequency_penalty: Double = 0.0, val user: User? = null, val stream: Boolean = false, val response_format: ResponseFormat? = null, val tools: List<Tool>? = null, val tool_choice: Any? = null, val n: Integer? = null) : ModelCompletion

Constructors

Link copied to clipboard
constructor(model: ModelName, messages: List<Message>, max_tokens: Int = 16, stream: Boolean = true)
constructor(model: ModelName, message: Message, max_tokens: Int = 16, stream: Boolean = true)
constructor(model: ModelName, messages: List<Message>, max_tokens: Int? = null, temperature: Temperature = Temperature.ONE, top_p: Double = 1.0, seed: Int = 1, stop: List<String>? = null, presence_penalty: Double = 0.0, frequency_penalty: Double = 0.0, user: User? = null, stream: Boolean = false, response_format: ResponseFormat? = null, tools: List<Tool>? = null, tool_choice: Any? = null, n: Integer? = null)

Properties

Link copied to clipboard
Link copied to clipboard
val max_tokens: Int? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val n: Integer? = null
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val seed: Int = 1
Link copied to clipboard
val stop: List<String>? = null
Link copied to clipboard
open override val stream: Boolean = false
Link copied to clipboard
Link copied to clipboard
val tool_choice: Any? = null
Link copied to clipboard
val tools: List<Tool>? = null
Link copied to clipboard
val top_p: Double = 1.0
Link copied to clipboard
val user: User? = null

Functions

Link copied to clipboard
open override fun content(): List<Message>
Link copied to clipboard
open override fun toRequest(): Request
Link copied to clipboard
open override fun toResult(response: Response): Result<Sequence<CompletionResponse>, RemoteFailure>