Trait LargeLanguageModel

Source
pub trait LargeLanguageModel {
    // Required method
    fn infer_stream(
        &self,
        prompt: Prompt,
    ) -> Result<impl Future<Output = Result<StringStream>> + Send>;

    // Provided method
    fn infer(
        &self,
        prompt: Prompt,
    ) -> Result<impl Future<Output = Result<String>> + Send> { ... }
}
Expand description

LLM

Required Methods§

Source

fn infer_stream( &self, prompt: Prompt, ) -> Result<impl Future<Output = Result<StringStream>> + Send>

Provided Methods§

Source

fn infer( &self, prompt: Prompt, ) -> Result<impl Future<Output = Result<String>> + Send>

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§