pub struct BackgroundTasksConfig {
pub wait_for_completion: Option<bool>,
pub agentic: Option<Vec<String>>,
pub always: Option<Vec<String>>,
pub never: Option<Vec<String>>,
pub max_concurrency: Option<usize>,
pub timeout: Option<Duration>,
pub manage_tool_name: Option<String>,
}Expand description
Background tool execution settings (BackgroundTasksConfig). Tools are named by
Tool::name; * matches every tool without an exact entry.
Fields§
§wait_for_completion: Option<bool>Wait for background work before an invocation returns. Defaults to true.
agentic: Option<Vec<String>>Tools whose execution mode the model selects. Defaults to ["*"] unless always or
never holds *.
always: Option<Vec<String>>Tools that always run in the background.
never: Option<Vec<String>>Tools that never run in the background.
max_concurrency: Option<usize>The most background tasks running at once. Defaults to 4.
timeout: Option<Duration>The timeout of one execution, in whole milliseconds. Defaults to none.
manage_tool_name: Option<String>Name of the tool the model calls to list, get or cancel background tasks
(manageToolName). Must not match another tool on the agent. The name is written into
conversation history, so keep it stable across a saved session. Defaults to
manage_background_task.
Implementations§
Source§impl BackgroundTasksConfig
impl BackgroundTasksConfig
Sourcepub fn builder() -> BackgroundTasksConfigBuilder
pub fn builder() -> BackgroundTasksConfigBuilder
Create an instance of BackgroundTasksConfig using the builder syntax
Trait Implementations§
Source§impl Clone for BackgroundTasksConfig
impl Clone for BackgroundTasksConfig
Source§impl Debug for BackgroundTasksConfig
impl Debug for BackgroundTasksConfig
Source§impl Default for BackgroundTasksConfig
impl Default for BackgroundTasksConfig
impl Eq for BackgroundTasksConfig
Source§impl From<BackgroundTasksConfig> for Toggle<BackgroundTasksConfig>
impl From<BackgroundTasksConfig> for Toggle<BackgroundTasksConfig>
Source§fn from(config: BackgroundTasksConfig) -> Self
fn from(config: BackgroundTasksConfig) -> Self
Source§impl PartialEq for BackgroundTasksConfig
impl PartialEq for BackgroundTasksConfig
impl StructuralPartialEq for BackgroundTasksConfig
Auto Trait Implementations§
impl Freeze for BackgroundTasksConfig
impl RefUnwindSafe for BackgroundTasksConfig
impl Send for BackgroundTasksConfig
impl Sync for BackgroundTasksConfig
impl Unpin for BackgroundTasksConfig
impl UnsafeUnpin for BackgroundTasksConfig
impl UnwindSafe for BackgroundTasksConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more