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 extract::FlexibleExtractor;
- pub use extract::MarkdownCodeBlockExtractor;
- pub use intent::IntentError;
- pub use intent::IntentExtractor;
- pub use intent::PromptBasedExtractor;
- pub use multimodal::ImageData;
- pub use prompt::PromptPart;
- pub use prompt::ToPrompt;
Modules§
- 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.