llm-tool 0.2.1

Framework-agnostic Rust tool definitions for LLM agents
Documentation
#![cfg_attr(not(feature = "std"), no_std)]
#![doc = include_str!("../README.md")]

extern crate alloc;

// Allow `::llm_tool::` paths (generated by the `#[llm_tool]` proc macro) to
// resolve when compiling tests within this crate.
extern crate self as llm_tool;

mod compat;
mod registry;
mod rust_tool;
mod types;

/// Re-export `prompt_templates` so generated code can
/// reference `::llm_tool::__prompt_templates::` without requiring the user
/// to add `prompt-templates` as a direct dependency.
#[cfg(feature = "prompt-templates")]
#[doc(hidden)]
pub use prompt_templates as __prompt_templates;
/// Public re-export of `prompt_templates` for use in `context = fn` functions.
///
/// Use `llm_tool::prompt_templates::Context` when writing a context function
/// for `#[llm_tool(prompt_file = "...", context = my_fn)]`.
#[cfg(feature = "prompt-templates")]
pub use prompt_templates;
/// Re-export `prompt_templates_macros` so `response_file` generated code can
/// auto-generate response types via `::llm_tool::__prompt_templates_macros::include_types!`
/// without requiring the user to add `prompt-templates-macros` as a direct dependency.
#[cfg(feature = "prompt-templates")]
#[doc(hidden)]
pub use prompt_templates_macros as __prompt_templates_macros;
pub use registry::*;
pub use rust_tool::*;
pub use types::*;