gleamstral/chat/response
Types
pub type ChatCompletionChoice {
ChatCompletionChoice(
index: Int,
message: message.Message,
finish_reason: FinishReason,
)
}
Constructors
-
ChatCompletionChoice( index: Int, message: message.Message, finish_reason: FinishReason, )
pub type FinishReason {
Stop
Length
ModelLength
Err
ToolCalls
}
Constructors
-
Stop
-
Length
-
ModelLength
-
Err
-
ToolCalls
pub type Response {
Response(
id: String,
object: String,
created: Int,
model: String,
choices: List(ChatCompletionChoice),
usage: Usage,
)
}
Constructors
-
Response( id: String, object: String, created: Int, model: String, choices: List(ChatCompletionChoice), usage: Usage, )
Functions
pub fn response_decoder() -> Decoder(Response)