pub trait StreamingPrompt<M, R>where
M: CompletionModel + 'static,
<M as CompletionModel>::StreamingResponse: Send,
R: Clone + Unpin + GetTokenUsage,{
// Required method
fn stream_prompt(
&self,
prompt: impl Into<Message> + Send,
) -> StreamingPromptRequest<M, ()>;
}
Expand description
Trait for high-level streaming prompt interface
Required Methods§
Sourcefn stream_prompt(
&self,
prompt: impl Into<Message> + Send,
) -> StreamingPromptRequest<M, ()>
fn stream_prompt( &self, prompt: impl Into<Message> + Send, ) -> StreamingPromptRequest<M, ()>
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.