pub struct PrepareStepContext<'a> {
pub steps: &'a [StepResult],
pub step_number: u32,
pub model: &'a Arc<dyn DynLanguageModel>,
pub instructions: Option<&'a Instructions>,
pub initial_instructions: Option<&'a Instructions>,
pub messages: &'a [Message],
pub initial_messages: &'a [Message],
pub response_messages: &'a [Message],
pub tools_context: Option<&'a JsonValue>,
pub runtime_context: Option<&'a JsonValue>,
pub sandbox: Option<&'a Arc<dyn Sandbox>>,
}Expand description
Information available to a PrepareStep callback.
Fields§
§steps: &'a [StepResult]Steps completed so far.
step_number: u32Zero-based index of the step about to run.
model: &'a Arc<dyn DynLanguageModel>The model configured for the call.
instructions: Option<&'a Instructions>Instructions retained from the preceding step, initially configured on the call.
initial_instructions: Option<&'a Instructions>Instructions originally configured for this invocation.
messages: &'a [Message]Current messages, including new responses since the latest message override.
initial_messages: &'a [Message]The initial messages of the call.
response_messages: &'a [Message]Response messages accumulated so far.
tools_context: Option<&'a JsonValue>The tools context retained from the preceding step.
runtime_context: Option<&'a JsonValue>Application state retained from the preceding step.
sandbox: Option<&'a Arc<dyn Sandbox>>The sandbox configured for the invocation before this step’s override.
Trait Implementations§
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for PrepareStepContext<'a>
impl<'a> !UnwindSafe for PrepareStepContext<'a>
impl<'a> Freeze for PrepareStepContext<'a>
impl<'a> Send for PrepareStepContext<'a>
impl<'a> Sync for PrepareStepContext<'a>
impl<'a> Unpin for PrepareStepContext<'a>
impl<'a> UnsafeUnpin for PrepareStepContext<'a>
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