Skip to main content

AgentRequest

Struct AgentRequest 

Source
#[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: Role

Why it is asked.

§step: &'a str

The id of the step it is asked for.

§key: &'a str

Where 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: String

Everything 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 Path

The folder it works in.

§deadline: Option<Instant>

When the run’s time is over, when it has a limit.

Trait Implementations§

Source§

impl<'a> Debug for AgentRequest<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Forget for AgentRequest<'a>

§

impl<'a> Freeze for AgentRequest<'a>
where &'a str: Freeze, *const u8 is !null: Freeze, PhantomData<u8>: Freeze, PhantomData<&'static str>: Freeze, &'a Path: Freeze,

§

impl<'a> Move for AgentRequest<'a>

§

impl<'a> RefUnwindSafe for AgentRequest<'a>

§

impl<'a> Send for AgentRequest<'a>
where &'a str: Send, RawVecInner: Send, &'static str: Send, &'a Path: Send,

§

impl<'a> Sync for AgentRequest<'a>
where RawVecInner: Sync,

§

impl<'a> Unpin for AgentRequest<'a>
where &'a str: Unpin, *const u8 is !null: Unpin, &'static str: Unpin, &'a Path: Unpin,

§

impl<'a> UnsafeUnpin for AgentRequest<'a>

§

impl<'a> UnwindSafe for AgentRequest<'a>
where &'a str: UnwindSafe, RawVecInner: UnwindSafe, &'static str: UnwindSafe, &'a Path: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.