Expand description
Chains are multi-step modes of execution for LLMs such as Sequential or MapReduce.
This module contains submodules for various types of chains. Chains are powerful tools that allow you to connect multiple steps together in a sequence. They take a set of parameters and an executor, perform the steps, and return the result.
Currently, we support two types of chains that cater to different use cases. But worry not! We will be adding more in the future
Here are the supported chain types:
- Sequential: This chain type executes the steps one after another in a linear sequence. It’s perfect for tasks that need a clear and simple order of execution.
- MapReduce: This chain type follows the MapReduce paradigm, where the steps are divided into mapping and reducing phases. It’s great for tasks that require parallel processing and data aggregation.
- Converstation: This chain type models a conversation between the LLM and some other entity. It’s great for tasks that require a back-and-forth between the LLM and the user. Stay tuned for more chain types, and feel free to contribute your own! 🎉
Modules§
- conversation
- The
Chain
module models a conversation between an entity and an LLM. It manages the conversation state and provides methods for sending messages and receiving responses. - map_
reduce - The
map_reduce
module contains theChain
struct, which represents a map-reduce chain. - sequential
- A module for implementing a sequential chain of LLM steps.