use crate::RunObserver;
use causa_kernel::{CacheDirective, ContextPreparer, GenerationOptions, ModelRef};
use std::sync::Arc;
#[derive(Debug, Clone, Copy)]
pub struct TurnLimits {
pub max_model_rounds: u32,
pub max_tool_calls: u32,
}
impl Default for TurnLimits {
fn default() -> Self {
Self {
max_model_rounds: 10,
max_tool_calls: 64,
}
}
}
#[derive(Clone)]
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>>,
}
impl TurnRunOptions {
pub fn new(model: ModelRef) -> Self {
Self {
model,
generation: GenerationOptions::default(),
cache: CacheDirective::None,
limits: TurnLimits::default(),
preparer: None,
observer: None,
}
}
}