Module llm_chain::traits

source ·
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

Traits