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#[cfg(feature = "md-tmpl")]
22#[doc(hidden)]
23pub use md_tmpl as __md_tmpl;
24/// Public re-export of `md_tmpl` for use in `context = fn` functions.
25///
26/// Use `llm_tool::md_tmpl::Context` when writing a context function
27/// for `#[llm_tool(description_file = "...", context = my_fn)]`.
28#[cfg(feature = "md-tmpl")]
29pub use md_tmpl;
30/// Re-export `md_tmpl_macros` so `response_file` generated code can
31/// auto-generate response types via `::llm_tool::__md_tmpl_macros::include_types!`
32/// without requiring the user to add `md-tmpl-macros` as a direct dependency.
33#[cfg(feature = "md-tmpl")]
34#[doc(hidden)]
35pub use md_tmpl_macros as __md_tmpl_macros;
36#[doc(hidden)]
37pub use private::__private;
38pub use registry::*;
39pub use rust_prompt::*;
40pub use rust_resource::*;
41pub use rust_tool::*;
42pub use types::*;