overlay/llm/chat
Types
pub type Completion(call) {
Completion(
thinking: String,
content: String,
tool_calls: List(call),
)
}
Constructors
-
Completion( thinking: String, content: String, tool_calls: List(call), )
pub type Message(call) {
UserMessage(text: String, images: List(String))
AssistantMessage(text: String, tool_calls: List(call))
ToolResultMessage(
tool_call_id: String,
text: String,
images: List(String),
)
}
Constructors
-
UserMessage(text: String, images: List(String)) -
AssistantMessage(text: String, tool_calls: List(call)) -
ToolResultMessage( tool_call_id: String, text: String, images: List(String), )
Values
pub fn append_chunks(
completion: Completion(call),
chunks: List(Completion(call)),
) -> Completion(call)
pub fn fresh() -> Completion(call)
pub fn from_completion(
completion: Completion(call),
) -> Message(call)