pub struct AgentOptions { /* private fields */ }Expand description
Configuration for model requests, tool execution, and hooks.
Construct validated options with AgentOptions::builder. Default leaves the
model and base URL empty without validation. Clones share tool handlers.
max_tokens and temperature remain unset unless explicitly supplied.
Implementations§
Source§impl AgentOptions
impl AgentOptions
Sourcepub fn builder() -> AgentOptionsBuilder
pub fn builder() -> AgentOptionsBuilder
Creates a builder that requires a model and base URL.
See AgentOptionsBuilder for an example.
Sourcepub fn system_prompt(&self) -> &str
pub fn system_prompt(&self) -> &str
Returns the system prompt.
Sourcepub fn max_turns(&self) -> u32
pub fn max_turns(&self) -> u32
Returns the retained max_turns compatibility value.
The SDK does not enforce it. Use max_tool_iterations
for automatic tool rounds and enforce conversation limits in your application.
Sourcepub fn max_tokens(&self) -> Option<u32>
pub fn max_tokens(&self) -> Option<u32>
Returns the maximum tokens setting.
Sourcepub fn temperature(&self) -> Option<f32>
pub fn temperature(&self) -> Option<f32>
Returns the sampling temperature, or None when the server should choose.
Sourcepub fn protocol(&self) -> ApiProtocol
pub fn protocol(&self) -> ApiProtocol
Returns the wire protocol this endpoint speaks.
Sourcepub fn auto_execute_tools(&self) -> bool
pub fn auto_execute_tools(&self) -> bool
Returns whether automatic tool execution is enabled.
Sourcepub fn max_tool_iterations(&self) -> u32
pub fn max_tool_iterations(&self) -> u32
Returns the maximum tool execution iterations.
Sourcepub fn include_reasoning(&self) -> bool
pub fn include_reasoning(&self) -> bool
Returns whether the reasoning channel is surfaced to the caller.
Trait Implementations§
Source§impl Clone for AgentOptions
impl Clone for AgentOptions
Source§fn clone(&self) -> AgentOptions
fn clone(&self) -> AgentOptions
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AgentOptions
Omits credentials and shows tool counts instead of handlers.
impl Debug for AgentOptions
Omits credentials and shows tool counts instead of handlers.