pub struct ContextRequest<'a> {
pub agent_name: &'a str,
pub input: &'a str,
pub model: Option<String>,
pub trace_id: Option<String>,
pub session: Option<Arc<dyn Session>>,
pub workspace: Option<PathBuf>,
pub context: Option<Arc<dyn Any + Send + Sync>>,
pub max_prompt_chars: Option<usize>,
pub metadata: Metadata,
}Fields§
§agent_name: &'a str§input: &'a str§model: Option<String>§trace_id: Option<String>§session: Option<Arc<dyn Session>>§workspace: Option<PathBuf>§context: Option<Arc<dyn Any + Send + Sync>>§max_prompt_chars: Option<usize>§metadata: MetadataImplementations§
Source§impl<'a> ContextRequest<'a>
impl<'a> ContextRequest<'a>
pub fn new(agent_name: &'a str, input: &'a str) -> Self
pub fn for_test(agent_name: &'a str, input: &'a str) -> Self
pub fn max_prompt_chars(self, max_prompt_chars: usize) -> Self
pub fn model(self, model: impl Into<String>) -> Self
pub fn trace_id(self, trace_id: impl Into<String>) -> Self
pub fn session(self, session: Arc<dyn Session>) -> Self
pub fn workspace(self, workspace: impl Into<PathBuf>) -> Self
pub fn context(self, context: Arc<dyn Any + Send + Sync>) -> Self
pub fn metadata(self, key: impl Into<String>, value: Value) -> Self
Auto Trait Implementations§
impl<'a> !RefUnwindSafe for ContextRequest<'a>
impl<'a> !UnwindSafe for ContextRequest<'a>
impl<'a> Freeze for ContextRequest<'a>
impl<'a> Send for ContextRequest<'a>
impl<'a> Sync for ContextRequest<'a>
impl<'a> Unpin for ContextRequest<'a>
impl<'a> UnsafeUnpin for ContextRequest<'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
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> 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>
Converts
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>
Converts
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 moreCreates a shared type from an unshared type.