Skip to main content

AgentAnswer

Derive Macro AgentAnswer 

Source
#[derive(AgentAnswer)]
Expand description

Derive ironflow_engine::config::AgentAnswer on a struct or an enum whose fields all implement AgentAnswer: free text from the agent is AgentText, never String.

Every type parameter must implement AgentAnswer too. A field of another type fails to compile, pointing at that field.

§Examples

Compiled and run in ironflow_engine::config:

ⓘ
use ironflow_engine::config::{AgentAnswer, AgentText};

#[derive(AgentAnswer)]
struct Review {
    score: u8,
    summary: AgentText,
}