pub struct StepOverrides {
pub model: Option<LanguageModelRef>,
pub tool_choice: Option<ToolChoice>,
pub active_tools: Option<Vec<ToolName>>,
pub tool_order: Option<Vec<ToolName>>,
pub instructions: Option<Instructions>,
pub messages: Option<Vec<Message>>,
pub tools_context: Option<JsonValue>,
pub settings: Option<CallSettings>,
}Expand description
Overrides returned by a PrepareStep callback. Unset fields keep the
call-level configuration.
Fields§
§model: Option<LanguageModelRef>Model for this step.
tool_choice: Option<ToolChoice>Tool choice for this step.
active_tools: Option<Vec<ToolName>>Active tools for this step.
tool_order: Option<Vec<ToolName>>Tool order for this step.
instructions: Option<Instructions>Instructions for this step.
messages: Option<Vec<Message>>Messages for this step (replaces initial plus response messages).
tools_context: Option<JsonValue>Tools context for this step.
settings: Option<CallSettings>Sampling settings overlaid on the call settings.
Implementations§
Source§impl StepOverrides
impl StepOverrides
Sourcepub fn with_model(self, model: impl Into<LanguageModelRef>) -> Self
pub fn with_model(self, model: impl Into<LanguageModelRef>) -> Self
Overrides the model.
Sourcepub fn with_tool_choice(self, tool_choice: ToolChoice) -> Self
pub fn with_tool_choice(self, tool_choice: ToolChoice) -> Self
Overrides the tool choice.
Sourcepub fn with_active_tools(
self,
names: impl IntoIterator<Item = impl Into<ToolName>>,
) -> Self
pub fn with_active_tools( self, names: impl IntoIterator<Item = impl Into<ToolName>>, ) -> Self
Overrides the active tools.
Sourcepub fn with_tool_order(
self,
names: impl IntoIterator<Item = impl Into<ToolName>>,
) -> Self
pub fn with_tool_order( self, names: impl IntoIterator<Item = impl Into<ToolName>>, ) -> Self
Overrides the tool order.
Sourcepub fn with_instructions(self, instructions: impl Into<Instructions>) -> Self
pub fn with_instructions(self, instructions: impl Into<Instructions>) -> Self
Overrides the instructions.
Sourcepub fn with_messages(self, messages: impl IntoIterator<Item = Message>) -> Self
pub fn with_messages(self, messages: impl IntoIterator<Item = Message>) -> Self
Overrides the messages.
Sourcepub fn with_tools_context(self, context: JsonValue) -> Self
pub fn with_tools_context(self, context: JsonValue) -> Self
Overrides the tools context.
Sourcepub fn with_settings(self, settings: CallSettings) -> Self
pub fn with_settings(self, settings: CallSettings) -> Self
Overlays sampling settings.
Trait Implementations§
Source§impl Debug for StepOverrides
impl Debug for StepOverrides
Source§impl Default for StepOverrides
impl Default for StepOverrides
Source§fn default() -> StepOverrides
fn default() -> StepOverrides
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for StepOverrides
impl !UnwindSafe for StepOverrides
impl Freeze for StepOverrides
impl Send for StepOverrides
impl Sync for StepOverrides
impl Unpin for StepOverrides
impl UnsafeUnpin for StepOverrides
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