Skip to main content

llm_tool/
lib.rs

1#![cfg_attr(not(feature = "std"), no_std)]
2#![doc = include_str!("../README.md")]
3
4extern crate alloc;
5
6// Allow `::llm_tool::` paths (generated by the `#[llm_tool]` proc macro) to
7// resolve when compiling tests within this crate.
8extern crate self as llm_tool;
9
10mod compat;
11mod private;
12mod registry;
13mod rust_prompt;
14mod rust_resource;
15mod rust_tool;
16mod types;
17
18/// Re-export `md_tmpl` so generated code can
19/// reference `::llm_tool::__md_tmpl::` without requiring the user
20/// to add `md-tmpl` as a direct dependency.
21#[doc(hidden)]
22pub use md_tmpl as __md_tmpl;
23/// Public re-export of `md_tmpl` for use in `context = fn` functions.
24///
25/// Use `llm_tool::md_tmpl::Context` when writing a context function
26/// for `#[llm_tool(description_file = "...", context = my_fn)]`.
27pub use md_tmpl;
28/// Re-export `md_tmpl_macros` so `response_file` generated code can
29/// auto-generate response types via `::llm_tool::__md_tmpl_macros::include_types!`
30/// without requiring the user to add `md-tmpl-macros` as a direct dependency.
31#[doc(hidden)]
32pub use md_tmpl_macros as __md_tmpl_macros;
33#[doc(hidden)]
34pub use private::__private;
35pub use registry::*;
36pub use rust_prompt::*;
37pub use rust_resource::*;
38pub use rust_tool::*;
39pub use types::*;