Expand description
A robust Rust library for converting structured XML output from Large Language Models (LLMs) back into Rust data structures.
This library provides a procedural macro (#[llm_prompt]) to automatically generate XML schemas
and prompts from your Rust structs, ensuring LLMs generate predictable and correct XML output
for reliable deserialization.
For more details and usage examples, see the README.
Re-exports§
pub use type::*;
Modules§
Traits§
- LlmPrompt
- Trait implemented by structures annotated with
#[llm_prompt].
Functions§
- generate_
as - Attempts to generate structured data of type
Tfrom an LLM response. - generate_
as_ with_ retries - Attempts to generate structured data of type
Tfrom an LLM response with a specified number of retries.
Type Aliases§
Attribute Macros§
- llm_
prompt - Procedural macro used to derive
LlmPromptimplementation and integrate custom deserialization logic for LLM-generated XML.