pub struct SessionContext {
pub session_id: Option<String>,
pub service_session_id: Option<String>,
pub input_messages: Vec<Message>,
pub instructions: Option<String>,
pub messages: Vec<Message>,
pub tools: Vec<ToolDefinition>,
}Expand description
Per-invocation context a provider contributes to a run. Providers mutate this in place in before_run. Rust equivalent of upstream SessionContext.
Fields§
§session_id: Option<String>Local session identifier (from the thread), for provider scoping.
service_session_id: Option<String>Service-managed session/conversation id, when applicable.
input_messages: Vec<Message>The run’s input messages (read-only for providers).
instructions: Option<String>Extra system instructions to inject (providers append via add_instructions).
messages: Vec<Message>Extra context messages to inject ahead of history.
tools: Vec<ToolDefinition>Extra tools to make available for this run.
Implementations§
Trait Implementations§
Source§impl Clone for SessionContext
impl Clone for SessionContext
Source§fn clone(&self) -> SessionContext
fn clone(&self) -> SessionContext
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SessionContext
impl Debug for SessionContext
Source§impl Default for SessionContext
impl Default for SessionContext
Source§fn default() -> SessionContext
fn default() -> SessionContext
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !RefUnwindSafe for SessionContext
impl !UnwindSafe for SessionContext
impl Freeze for SessionContext
impl Send for SessionContext
impl Sync for SessionContext
impl Unpin for SessionContext
impl UnsafeUnpin for SessionContext
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