#[non_exhaustive]pub struct TurnRunOptions {
pub model: ModelRef,
pub generation: GenerationOptions,
pub cache: CacheDirective,
pub limits: TurnLimits,
pub preparer: Option<Arc<dyn ContextPreparer>>,
pub observer: Option<Arc<RunObserver>>,
pub processor_data: Option<ProcessorData>,
}Expand description
Choices fixed for one run; the model must be supplied explicitly.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.model: ModelRefModel used by every logical invocation.
generation: GenerationOptionsGeneration parameters used by every logical invocation.
cache: CacheDirectiveProvider cache instruction.
limits: TurnLimitsExecution limits.
preparer: Option<Arc<dyn ContextPreparer>>Optional exclusive material preparation before each invocation.
observer: Option<Arc<RunObserver>>Optional synchronous borrowed observation callback.
processor_data: Option<ProcessorData>Optional host data handed to every tool processor of the run, through
causa_kernel::ProcessorContext::data. Passed through unchanged:
state that changes during the run belongs in a shared handle.
Implementations§
Source§impl TurnRunOptions
impl TurnRunOptions
Sourcepub fn new(model: ModelRef) -> Self
pub fn new(model: ModelRef) -> Self
Select a model with default generation, limits and no preparation, observer or processor data.
Sourcepub fn with_generation(self, generation: GenerationOptions) -> Self
pub fn with_generation(self, generation: GenerationOptions) -> Self
Replaces the generation parameters used by every invocation.
Sourcepub fn with_cache(self, cache: CacheDirective) -> Self
pub fn with_cache(self, cache: CacheDirective) -> Self
Replaces the provider cache instruction.
Sourcepub fn with_limits(self, limits: TurnLimits) -> Self
pub fn with_limits(self, limits: TurnLimits) -> Self
Replaces the execution limits.
Sourcepub fn with_preparer(self, preparer: Arc<dyn ContextPreparer>) -> Self
pub fn with_preparer(self, preparer: Arc<dyn ContextPreparer>) -> Self
Sets the exclusive material preparation before each invocation.
Sourcepub fn with_observer(self, observer: Arc<RunObserver>) -> Self
pub fn with_observer(self, observer: Arc<RunObserver>) -> Self
Sets the synchronous borrowed observation callback.
Sourcepub fn with_processor_data(self, processor_data: ProcessorData) -> Self
pub fn with_processor_data(self, processor_data: ProcessorData) -> Self
Sets the host data handed to every tool processor of the run.