Trait StreamingPrompt

Source
pub trait StreamingPrompt: Send + Sync {
    // Required method
    fn stream_prompt(
        &self,
        prompt: &str,
    ) -> impl Future<Output = Result<StreamingResult, CompletionError>>;
}
Expand description

Trait for high-level streaming prompt interface

Required Methods§

Source

fn stream_prompt( &self, prompt: &str, ) -> impl Future<Output = Result<StreamingResult, CompletionError>>

Stream a simple prompt to the model

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§