basic features like streaming, stopping, simple formatting, etc.

This commit is contained in:
jrosh 2025-09-13 02:53:58 +02:00
commit 24990f514f
Signed by: jrosh
GPG key ID: CC50156D9BDF5EFB
7 changed files with 887 additions and 143 deletions

View file

@ -11,6 +11,8 @@ pub struct ChatRequest {
pub model: String,
pub messages: Vec<ChatMessage>,
pub stream: bool,
#[serde(skip_serializing_if = "Option::is_none")]
pub think: Option<bool>,
}
#[derive(Debug, Serialize, Deserialize)]
@ -20,6 +22,14 @@ pub struct ChatResponse {
pub done: bool,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct StreamResponse {
pub model: String,
pub created_at: String,
pub message: ChatMessage,
pub done: bool,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ModelInfo {
pub name: String,
@ -28,4 +38,4 @@ pub struct ModelInfo {
#[derive(Debug, Serialize, Deserialize)]
pub struct ModelsResponse {
pub models: Vec<ModelInfo>,
}
}