next_web_ai/chat/model/
chat_model.rs

1use next_web_core::DynClone;
2
3use crate::{
4    chat::{model::chat_response::ChatResponse, prompt::prompt::Prompt},
5    model::{
6        model::Model, model_request::ModelRequest, model_response::ModelResponse,
7        model_result::ModelResult,
8    },
9};
10
11pub trait ChatModel
12where
13    Self: Model<Prompt, ChatResponse>,
14    Self: DynClone + Send + Sync + 'static,
15{
16}
17
18// pub trait ChatModel<T, R, R1>:
19//     Model<Prompt, ChatResponse, T, R, R1> + DynClone + Send + Sync + 'static
20// where
21//     Prompt: ModelRequest<T> + Send + Sync + 'static, // Added this bound
22//     ChatResponse: ModelResponse<R, R1> + Send + Sync + 'static, // And this one
23//     T: Send + Sync + 'static,
24//     R: ModelResult<R1> + 'static,
25//     R1: Send + Sync + 'static,
26// {
27//     // ChatModel specific methods
28// }
29
30next_web_core::clone_trait_object!(ChatModel);