pub struct QueryEngineConfig {
pub cwd: String,
pub model: String,
pub api_key: Option<String>,
pub base_url: Option<String>,
pub tools: Vec<ToolDefinition>,
pub system_prompt: Option<String>,
pub max_turns: u32,
pub max_budget_usd: Option<f64>,
pub max_tokens: u32,
pub can_use_tool: Option<fn(ToolDefinition, Value) -> bool>,
pub on_event: Option<Arc<dyn Fn(AgentEvent) + Send + Sync>>,
}Fields§
§cwd: String§model: String§api_key: Option<String>§base_url: Option<String>§tools: Vec<ToolDefinition>§system_prompt: Option<String>§max_turns: u32§max_budget_usd: Option<f64>§max_tokens: u32§can_use_tool: Option<fn(ToolDefinition, Value) -> bool>Permission check function - called BEFORE tool execution Returns true if tool can be used, false if denied
on_event: Option<Arc<dyn Fn(AgentEvent) + Send + Sync>>Callback for agent events (tool start/complete/error, thinking, done)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for QueryEngineConfig
impl !RefUnwindSafe for QueryEngineConfig
impl Send for QueryEngineConfig
impl Sync for QueryEngineConfig
impl Unpin for QueryEngineConfig
impl UnsafeUnpin for QueryEngineConfig
impl !UnwindSafe for QueryEngineConfig
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