pub struct SimulateStreaming;Expand description
Middleware created by simulate_streaming.
Trait Implementations§
Source§impl Clone for SimulateStreaming
impl Clone for SimulateStreaming
Source§fn clone(&self) -> SimulateStreaming
fn clone(&self) -> SimulateStreaming
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for SimulateStreaming
Source§impl Debug for SimulateStreaming
impl Debug for SimulateStreaming
Source§impl Default for SimulateStreaming
impl Default for SimulateStreaming
Source§fn default() -> SimulateStreaming
fn default() -> SimulateStreaming
Returns the “default value” for a type. Read more
Source§impl LanguageModelMiddleware for SimulateStreaming
impl LanguageModelMiddleware for SimulateStreaming
Source§fn wrap_stream<'a>(
&'a self,
options: CallOptions,
_next: StreamNext<'a>,
ctx: MiddlewareContext<'a>,
) -> BoxFuture<'a, Result<StreamResult, ProviderError>>
fn wrap_stream<'a>( &'a self, options: CallOptions, _next: StreamNext<'a>, ctx: MiddlewareContext<'a>, ) -> BoxFuture<'a, Result<StreamResult, ProviderError>>
Wraps
do_stream.Source§fn transform_params<'a>(
&'a self,
options: CallOptions,
_ctx: MiddlewareContext<'a>,
) -> BoxFuture<'a, Result<CallOptions, ProviderError>>
fn transform_params<'a>( &'a self, options: CallOptions, _ctx: MiddlewareContext<'a>, ) -> BoxFuture<'a, Result<CallOptions, ProviderError>>
Rewrites the call options before the call.
Source§fn wrap_generate<'a>(
&'a self,
options: CallOptions,
next: GenerateNext<'a>,
_ctx: MiddlewareContext<'a>,
) -> BoxFuture<'a, Result<GenerateResult, ProviderError>>
fn wrap_generate<'a>( &'a self, options: CallOptions, next: GenerateNext<'a>, _ctx: MiddlewareContext<'a>, ) -> BoxFuture<'a, Result<GenerateResult, ProviderError>>
Wraps
do_generate.Source§fn override_provider(&self, _model: &dyn DynLanguageModel) -> Option<ProviderId>
fn override_provider(&self, _model: &dyn DynLanguageModel) -> Option<ProviderId>
Overrides the provider id reported by the wrapped model.
Source§fn override_model_id(&self, _model: &dyn DynLanguageModel) -> Option<ModelId>
fn override_model_id(&self, _model: &dyn DynLanguageModel) -> Option<ModelId>
Overrides the model id reported by the wrapped model.
Source§fn override_supported_urls<'a>(
&'a self,
_model: &'a dyn DynLanguageModel,
) -> Option<BoxFuture<'a, SupportedUrls>>
fn override_supported_urls<'a>( &'a self, _model: &'a dyn DynLanguageModel, ) -> Option<BoxFuture<'a, SupportedUrls>>
Overrides the supported URLs of the wrapped model.
Auto Trait Implementations§
impl Freeze for SimulateStreaming
impl RefUnwindSafe for SimulateStreaming
impl Send for SimulateStreaming
impl Sync for SimulateStreaming
impl Unpin for SimulateStreaming
impl UnsafeUnpin for SimulateStreaming
impl UnwindSafe for SimulateStreaming
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more