update init

This commit is contained in:
jhqxxx
2025-09-25 12:44:17 +08:00
parent b28b6aa25d
commit ae36194a4b
6 changed files with 70 additions and 8 deletions
+3 -3
View File
@@ -10,9 +10,9 @@ use openai_dive::v1::resources::chat::{
use rocket::futures::Stream;
pub trait GenerateModel {
fn init(path: &str, device: Option<&Device>, dtype: Option<DType>) -> Result<Self>
where
Self: Sized;
// fn init(path: &str, device: Option<&Device>, dtype: Option<DType>) -> Result<Self>
// where
// Self: Sized;
fn generate(&mut self, mes: ChatCompletionParameters) -> Result<ChatCompletionResponse>;
fn generate_stream(
&mut self,