#[non_exhaustive]pub struct AgentRequest<'a> {
pub role: Role,
pub step: &'a str,
pub key: &'a str,
pub conversation: Option<&'a str>,
pub cost_left: Option<f64>,
pub prompt: String,
pub agent: Option<&'a str>,
pub model: Option<&'a str>,
pub tools: Vec<&'static str>,
pub folder: &'a Path,
pub deadline: Option<Instant>,
}Expand description
What an agent is asked.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.role: RoleWhy it is asked.
step: &'a strThe id of the step it is asked for.
key: &'a strWhere in the run it is asked: its answer is kept under this key in the record’s journal. A host may show what the agent does meanwhile under it.
conversation: Option<&'a str>The conversation the step’s work was done in before, when that work was refused and is asked again, so the agent may go on in it.
cost_left: Option<f64>What the run may still spend, when its plan has a cost limit and what it spent so far is known. Agents working at the same time are each told the same.
prompt: StringEverything it is told, in words.
agent: Option<&'a str>The named agent, when the plan names one.
model: Option<&'a str>The model, when the plan names one.
tools: Vec<&'static str>The only kinds of tools it may use.
folder: &'a PathThe folder it works in.
deadline: Option<Instant>When the run’s time is over, when it has a limit.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Forget for AgentRequest<'a>
impl<'a> Freeze for AgentRequest<'a>
impl<'a> Move for AgentRequest<'a>
impl<'a> RefUnwindSafe for AgentRequest<'a>
impl<'a> Send for AgentRequest<'a>
impl<'a> Sync for AgentRequest<'a>where
RawVecInner: Sync,
impl<'a> Unpin for AgentRequest<'a>
impl<'a> UnsafeUnpin for AgentRequest<'a>where
&'a str: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
&'a Path: UnsafeUnpin,
impl<'a> UnwindSafe for AgentRequest<'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