pub struct RunConfigBuilder { /* private fields */ }Expand description
Builder for RunConfig.
Provides a fluent API for constructing RunConfig instances. All fields
start with their default values and can be overridden individually.
§Example
use adk_core::{RunConfig, RunConfigBuilder, StreamingMode, ToolConcurrencyConfig};
let config = RunConfigBuilder::default()
.streaming_mode(StreamingMode::Bidi)
.history_max_events(Some(50))
.build();Implementations§
Source§impl RunConfigBuilder
impl RunConfigBuilder
Sourcepub fn streaming_mode(self, mode: StreamingMode) -> Self
pub fn streaming_mode(self, mode: StreamingMode) -> Self
Sets the streaming mode for the run.
Sourcepub fn tool_confirmation_decisions(
self,
decisions: HashMap<String, ToolConfirmationDecision>,
) -> Self
pub fn tool_confirmation_decisions( self, decisions: HashMap<String, ToolConfirmationDecision>, ) -> Self
Sets per-tool confirmation decisions for the current run.
Sourcepub fn cached_content(self, name: impl Into<String>) -> Self
pub fn cached_content(self, name: impl Into<String>) -> Self
Sets the cached content name for automatic prompt caching.
Sourcepub fn transfer_targets(self, targets: Vec<String>) -> Self
pub fn transfer_targets(self, targets: Vec<String>) -> Self
Sets the valid agent names this agent can transfer to.
Sourcepub fn parent_agent(self, name: impl Into<String>) -> Self
pub fn parent_agent(self, name: impl Into<String>) -> Self
Sets the parent agent name.
Sourcepub fn auto_cache(self, enabled: bool) -> Self
pub fn auto_cache(self, enabled: bool) -> Self
Enables or disables automatic prompt caching for supported providers.
Sourcepub fn history_max_events(self, max: Option<usize>) -> Self
pub fn history_max_events(self, max: Option<usize>) -> Self
Sets the maximum number of recent persisted events to load at run start.
Sourcepub fn tool_concurrency(self, config: ToolConcurrencyConfig) -> Self
pub fn tool_concurrency(self, config: ToolConcurrencyConfig) -> Self
Sets the tool concurrency configuration.
Sourcepub fn record_payloads(self, enabled: bool) -> Self
pub fn record_payloads(self, enabled: bool) -> Self
Enables or disables full payload recording in tracing spans.
Sourcepub fn trace_payload_max_bytes(self, max: usize) -> Self
pub fn trace_payload_max_bytes(self, max: usize) -> Self
Sets the maximum serialized bytes for tracing payload fields.
Trait Implementations§
Source§impl Clone for RunConfigBuilder
impl Clone for RunConfigBuilder
Source§fn clone(&self) -> RunConfigBuilder
fn clone(&self) -> RunConfigBuilder
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 moreSource§impl Debug for RunConfigBuilder
impl Debug for RunConfigBuilder
Source§impl Default for RunConfigBuilder
impl Default for RunConfigBuilder
Source§fn default() -> RunConfigBuilder
fn default() -> RunConfigBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for RunConfigBuilder
impl RefUnwindSafe for RunConfigBuilder
impl Send for RunConfigBuilder
impl Sync for RunConfigBuilder
impl Unpin for RunConfigBuilder
impl UnsafeUnpin for RunConfigBuilder
impl UnwindSafe for RunConfigBuilder
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