Files
aha/src/models/mod.rs
T

22 lines
585 B
Rust
Raw Normal View History

2025-10-10 23:25:25 +08:00
pub mod common;
2025-09-25 12:25:24 +08:00
pub mod minicpm4;
pub mod qwen2_5vl;
2025-10-03 22:25:58 +08:00
pub mod voxcpm;
2025-10-26 21:39:23 +08:00
pub mod qwen3vl;
2025-09-25 12:09:25 +08:00
2025-09-22 16:38:12 +08:00
use anyhow::Result;
2025-09-22 23:58:08 +08:00
use openai_dive::v1::resources::chat::{
ChatCompletionChunkResponse, ChatCompletionParameters, ChatCompletionResponse,
};
2025-09-22 23:49:58 +08:00
use rocket::futures::Stream;
2025-09-22 16:38:12 +08:00
pub trait GenerateModel {
2025-09-22 23:49:58 +08:00
fn generate(&mut self, mes: ChatCompletionParameters) -> Result<ChatCompletionResponse>;
2025-09-22 23:58:08 +08:00
fn generate_stream(
&mut self,
mes: ChatCompletionParameters,
2025-09-25 12:25:24 +08:00
) -> Result<impl Stream<Item = Result<ChatCompletionChunkResponse, anyhow::Error>>>
where
Self: Sized;
2025-09-22 16:38:12 +08:00
}