Trait askitty::ai::llm::traits::LLM

source ·
pub trait LLM {
    // Required methods
    fn new(
        host: String,
        model: String,
        api_key: String
    ) -> Result<Self, LLMError>
       where Self: Sized;
    fn completion(
        &self,
        chats: Vec<Message>
    ) -> impl Future<Output = Result<String, LLMError>> + Send;
}

Required Methods§

source

fn new(host: String, model: String, api_key: String) -> Result<Self, LLMError>
where Self: Sized,

source

fn completion( &self, chats: Vec<Message> ) -> impl Future<Output = Result<String, LLMError>> + Send

Object Safety§

This trait is not object safe.

Implementors§