pub struct ExecuteRequestBuilder { /* private fields */ }Expand description
Fluent builder for ExecuteRequest.
ExecuteRequest carries three required fields plus a long tail of optional
overrides; constructing it by hand forces callers to spell out ~20 Nones.
This builder requires only initial_message + event_tx + cancel_token,
defaults every optional field to None (matching the runtime’s spawn
defaults), and exposes fluent setters for the rest.
It lives in bamboo-engine so both the in-crate server layer (e.g. the
schedule manager) and the root bamboo_agent SDK facade (which re-exports
it) construct requests through one shared builder — no forked assembly.
Implementations§
Source§impl ExecuteRequestBuilder
impl ExecuteRequestBuilder
Sourcepub fn new(
initial_message: impl Into<String>,
event_tx: Sender<AgentEvent>,
cancel_token: CancellationToken,
) -> Self
pub fn new( initial_message: impl Into<String>, event_tx: Sender<AgentEvent>, cancel_token: CancellationToken, ) -> Self
Create a builder with the three required fields. All optional overrides
default to None.
Sourcepub fn tools(self, v: Arc<dyn ToolExecutor>) -> Self
pub fn tools(self, v: Arc<dyn ToolExecutor>) -> Self
Override the tool executor for this execution.
Sourcepub fn provider_override(self, v: Arc<dyn LLMProvider>) -> Self
pub fn provider_override(self, v: Arc<dyn LLMProvider>) -> Self
Override the LLM provider for this execution.
Sourcepub fn model_roster(self, roster: ModelRoster) -> Self
pub fn model_roster(self, roster: ModelRoster) -> Self
Seed the full model selection from a ModelRoster.
Decomposes the roster back into the builder’s individual fields so it composes with the existing per-field fluent setters; later individual setters override the corresponding roster entry.
Sourcepub fn provider_name(self, v: impl Into<String>) -> Self
pub fn provider_name(self, v: impl Into<String>) -> Self
Override the provider name.
Sourcepub fn provider_type(self, v: impl Into<String>) -> Self
pub fn provider_type(self, v: impl Into<String>) -> Self
Override the provider type.
Sourcepub fn fast_model(self, v: impl Into<String>) -> Self
pub fn fast_model(self, v: impl Into<String>) -> Self
Override the fast-model name.
Sourcepub fn fast_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
pub fn fast_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
Override the provider used for fast-model calls.
Sourcepub fn background_model(self, v: impl Into<String>) -> Self
pub fn background_model(self, v: impl Into<String>) -> Self
Override the background-model name.
Sourcepub fn background_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
pub fn background_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
Override the provider used for background/memory model calls.
Sourcepub fn summarization_model(self, v: impl Into<String>) -> Self
pub fn summarization_model(self, v: impl Into<String>) -> Self
Override the summarization-model name.
Sourcepub fn summarization_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
pub fn summarization_model_provider(self, v: Arc<dyn LLMProvider>) -> Self
Override the provider used for summarization/compression calls.
Sourcepub fn reasoning_effort(self, v: ReasoningEffort) -> Self
pub fn reasoning_effort(self, v: ReasoningEffort) -> Self
Set the reasoning effort.
Sourcepub fn auxiliary_model_resolver(
self,
v: Arc<dyn Fn() -> AuxiliaryModelConfig + Send + Sync>,
) -> Self
pub fn auxiliary_model_resolver( self, v: Arc<dyn Fn() -> AuxiliaryModelConfig + Send + Sync>, ) -> Self
Set the per-round auxiliary-model resolver.
Sourcepub fn disabled_filter_resolver(
self,
v: Arc<dyn Fn() -> (BTreeSet<String>, BTreeSet<String>) + Send + Sync>,
) -> Self
pub fn disabled_filter_resolver( self, v: Arc<dyn Fn() -> (BTreeSet<String>, BTreeSet<String>) + Send + Sync>, ) -> Self
Set the per-round resolver for the live disabled tool/skill sets (#136).
Sourcepub fn disabled_tools(self, v: BTreeSet<String>) -> Self
pub fn disabled_tools(self, v: BTreeSet<String>) -> Self
Set the disabled tool names (merged with config defaults at runtime).
Sourcepub fn disabled_skill_ids(self, v: BTreeSet<String>) -> Self
pub fn disabled_skill_ids(self, v: BTreeSet<String>) -> Self
Set the disabled skill ids.
Sourcepub fn selected_skill_ids(self, v: Vec<String>) -> Self
pub fn selected_skill_ids(self, v: Vec<String>) -> Self
Set the explicitly selected skill ids.
Sourcepub fn selected_skill_mode(self, v: impl Into<String>) -> Self
pub fn selected_skill_mode(self, v: impl Into<String>) -> Self
Set the skill-selection mode.
Sourcepub fn image_fallback(self, v: ImageFallbackConfig) -> Self
pub fn image_fallback(self, v: ImageFallbackConfig) -> Self
Set the image fallback configuration.
Sourcepub fn app_data_dir(self, v: PathBuf) -> Self
pub fn app_data_dir(self, v: PathBuf) -> Self
Set the Bamboo application data directory.
Sourcepub fn build(self) -> ExecuteRequest
pub fn build(self) -> ExecuteRequest
Materialize the underlying ExecuteRequest.
gold_config is an internal feature flag with only a crate-visible
setter (Self::gold_config); public SDK callers leave it None.