Skip to main content

Crate rig_derive

Crate rig_derive 

Source

Attribute Macros§

rig_tool
Generates a tool type, parameter struct, and uppercase static from a function returning Result<T, E>. Functions with a mutable context implement rig_core::tool::Tool; others implement rig_core::tool::PortableTool. Imported context names need #[rig(context)]; qualified Rig paths are recognized directly. The context is excluded from model arguments.

Derive Macros§

ContextValue
Derives rig_core::tool::ContextValue with the type name as its default key. #[context(key = "...")] overrides the key. The type must support serde serialization and deserialization.
Embed
Derives rig_core::embeddings::Embed using fields marked with #[embed].