Skip to main content

Target

Trait Target 

Source
pub trait Target: WasmCompatSend + WasmCompatSync {
    // Required method
    fn run<'a>(
        &'a self,
        case: &'a Case,
    ) -> WasmBoxedFuture<'a, Result<TargetOutput, TargetError>>;
}
Expand description

Something to evaluate: runs a case’s input and reports what it did.

Required Methods§

Source

fn run<'a>( &'a self, case: &'a Case, ) -> WasmBoxedFuture<'a, Result<TargetOutput, TargetError>>

Run case.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

impl Target for Agent

Source§

fn run<'a>( &'a self, case: &'a Case, ) -> WasmBoxedFuture<'a, Result<TargetOutput, TargetError>>

Prompts the agent with the case’s input, or with each of its turns in order on one conversation (the agent keeps the history between turns). The tool calls are the ones in the runs’ transcripts, each with the result its tool returned; the usage is the total over the turns. A multi-turn case that fails part way is a TurnFailed holding the turns that completed.

Implementors§

Source§

impl Target for AgentCoreTarget

Available on crate feature agentcore only.
Source§

impl<F, Fut, O> Target for FnTarget<F>
where F: Fn(Case) -> Fut + WasmCompatSend + WasmCompatSync, Fut: Future<Output = Result<O, TargetError>> + WasmCompatSend + 'static, O: Into<TargetOutput>,

Source§

impl<N: Node> Target for NodeTarget<N>

Available on crate feature multiagent only.