serdes-ai-output 0.1.5

Output schema validation and structured output support for serdes-ai
Documentation

serdes-ai-output

Crates.io Documentation License: MIT

Output schema validation and structured output support for serdes-ai

This crate provides structured output support for SerdesAI agents:

  • Output trait for types that can be extracted from LLM responses
  • JSON schema generation for output types
  • Validation and parsing utilities
  • Integration with serde

Installation

[dependencies]
serdes-ai-output = "0.1"

Usage

use serdes_ai_output::Output;
use serdes_ai_macros::Output;
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize, Output)]
struct PersonInfo {
    name: String,
    age: u32,
}

let agent = Agent::new(model)
    .output_type::<PersonInfo>()
    .build();

Part of SerdesAI

This crate is part of the SerdesAI workspace.

For most use cases, you should use the main serdes-ai crate which re-exports these types.

License

MIT License - see LICENSE for details.