Skip to main content

TurnInputContributor

Trait TurnInputContributor 

Source
pub trait TurnInputContributor: Send + Sync {
    // Required method
    fn contribute<'a>(
        &'a self,
        input: TurnInputContext,
        session_store: &'a ExtensionData,
        thread_store: &'a ExtensionData,
        turn_store: &'a ExtensionData,
        step_store: &'a ExtensionData,
    ) -> ExtensionFuture<'a, Vec<Box<dyn ContextualUserFragment + Send>>>;
}
Expand description

Extension contribution that can add turn-local model input.

Implementations should resolve only the model-visible input they own and must preserve authority boundaries for external resources. Expensive or host-specific dependencies belong on the extension value installed by the host, not in this input.

Required Methods§

Source

fn contribute<'a>( &'a self, input: TurnInputContext, session_store: &'a ExtensionData, thread_store: &'a ExtensionData, turn_store: &'a ExtensionData, step_store: &'a ExtensionData, ) -> ExtensionFuture<'a, Vec<Box<dyn ContextualUserFragment + Send>>>

Returns additional contextual fragments for one submitted turn.

step_store contains host capabilities bound to the sampling step that will consume these fragments.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§