Expand description
§Traits Module
Welcome to the traits
module! This is where llm-chain houses its public traits, which define the essential behavior of steps and executors. These traits are the backbone of our library, and they provide the foundation for creating and working with different models in llm-chain.
Here’s a brief overview of the key concepts:
- Steps: These are the building blocks that make up the chains. Steps define the parameters, including the prompt that is sent to the LLM (Large Language Model).
- Executors: These are responsible for performing the steps. They take the output of a step, invoke the model with that input, and return the resulting output.
By implementing these traits, you can set up a new model and use it in your application. Your step defines the input to the model, and your executor invokes the model and returns the output. The output of the executor is then passed to the next step in the chain, and so on.
Enums§
- Executor
Creation Error - Executor
Error - An error indicating that the model was not succesfully run.
Traits§
- Embeddings
- Embeddings
Error - This marker trait is needed so the concrete VectorStore::Error can have a derived FromEmbeddings::Error
- Executor
- The
Executor
trait represents an executor that performs a single step in a chain. It takes a step, executes it, and returns the output. - Vector
Store - Vector
Store Error - This marker trait is needed so users of VectorStore can derive FromVectorStore::Error