Crate llm_chain

Source
Expand description

Β§πŸš€ llm-chain πŸš€

llm-chain is the ultimate toolbox for developers looking to supercharge their applications with the power of Large Language Models (LLMs)! πŸŽ‰

This versatile crate lets you chain together LLMs, making it incredibly useful for:

  • Effortlessly summarizing lengthy documents πŸ“š
  • Allow your bots to interact with the environment using tools.
  • Seamlessly chaining together multiple prompts to tackle complex tasks.
  • ChatGPT model support
  • LLaMA model support

And that’s not all! llm-chain is also your best friend when it comes to creating and managing prompts for LLMs. Say goodbye to hassle and bloated syntax! Quickly create and manage prompts with our intuitive templating system, and let llm-chain handle the rest! 🀩

Keep in mind that this crate is a library, which means it doesn’t include any LLMs out of the box. But fear not! We also offer the llm-chain-openai crate, which brings the power of OpenAI’s LLMs right to your fingertips! πŸͺ„ We recommend starting with that crate to make the most of llm-chain. πŸ˜‰

So, buckle up and dive into the amazing world of LLMs! Unlock the full potential of your applications with llm-chain and watch them soar! 🌈πŸ’₯

To help you get started, we’ve prepared a comprehensive tutorial that will guide you through the process of using llm-chain. The tutorial covers everything from installation to advanced usage, so you’ll be well-equipped to make the most of this powerful toolbox.

Happy coding, and may your LLM adventures be both exciting and productive! πŸ₯³πŸš€

Re-exports§

pub use parameters::Parameters;

Modules§

agents
chains
Chains are multi-step modes of execution for LLMs such as Sequential or MapReduce.
document_stores
executor
Utilities for working with executors
frame
A frame is the combination of a Step and an Executor. It wraps common behavior used by different chain types.
options
output
parameters
Parameters are used to pass data steps of the chain. This module implements them.
parsing
Functions for parsing the output of LLMs, including YAML and Markdown.
prompt
Module implementing prompts and prompt templates. Contains the prompt! macro, Prompts and PromptTemplates.
schema
Schema for Documents that can be stored in vector stores.
serialization
Envelope Serialization
step
Steps are individual LLM invocations in a chain. They are a combination of a prompt and a configuration.
summarization
Opinionated text summarization functionality
tokens
Tokens Module
tools
Tool Access Module
traits
Traits Module

Macros§

executor
A macro that creates a new executor for a specified model.
multitool
options
options! is a declarative macro that facilitates the creation of an Options instance.
parameters
A macro that creates a new Parameters instance with the provided key-value pairs.
prompt
Creates a TextPrompt or a ChatPrompt based on the number of arguments provided.