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§
fn infer_stream( &self, prompt: Prompt, ) -> Result<impl Future<Output = Result<StringStream>> + Send>
Provided Methods§
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.