Expand description
‘llm-toolkit’ - A low-level Rust toolkit for the LLM last mile problem.
This library provides a set of sharp, reliable, and unopinionated “tools” for building robust LLM-powered applications in Rust. It focuses on solving the common and frustrating problems that occur at the boundary between a strongly-typed Rust application and the unstructured, often unpredictable string-based responses from LLM APIs.
Re-exports§
pub use attachment::Attachment;pub use attachment::AttachmentSchema;pub use attachment::ToAttachments;pub use extract::FlexibleExtractor;pub use extract::MarkdownCodeBlockExtractor;pub use intent::frame::IntentFrame;pub use intent::IntentError;pub use intent::IntentExtractor;pub use intent::PromptBasedExtractor;Deprecated pub use multimodal::ImageData;pub use prompt::PromptPart;pub use prompt::PromptSetError;pub use prompt::ToPrompt;pub use prompt::ToPromptFor;pub use prompt::ToPromptSet;
Modules§
- attachment
 - Attachment types for multimodal workflows.
 - extract
 - intent
 - Traits and implementations for extracting structured intents from LLM responses.
 - multimodal
 - Multimodal support for prompts, including image data handling.
 - prompt
 - A trait and macros for powerful, type-safe prompt generation.
 
Macros§
- prompt
 - Creates a prompt string from a template and key-value pairs.
 
Functions§
- extract_
json  - Extracts a JSON string from a raw LLM response string.
 - extract_
markdown_ block  - Extracts content from any Markdown code block in the text.
 - extract_
markdown_ block_ with_ lang  - Extracts content from a Markdown code block with a specific language.