πŸ”₯
Langtorch
  • πŸ‘‹ Introduction
  • πŸ‘₯ Our Approach
  • πŸ€– LLM Service
    • OpenAi
    • CohereAI
    • Minimax
    • Huggingface
  • πŸ”ƒ Processor
    • Input and Output
      • Pre-built types
        • SingleText
        • MultiChatMessage
    • Integration
    • Customize your own processor?
  • πŸ”€ Loader
  • πŸ”§ Pre-processing & Post-processing
    • πŸ”„ Parser
  • πŸ“ Prompt Template
    • Prompt Template Class
    • Annotation Based Prompt Template
  • πŸ’ͺ Capability
    • Capability Unit
    • Capability Node
    • Capability Graph or Capability DAG
  • πŸ•΅οΈβ€β™‚οΈ Agent
  • 🧠 Memory
  • 🧩 Semantic Cache
  • πŸ’Ύ Vector Store
  • πŸ”Œ Dependency Injection
  • πŸš€ Langtorch Hub
  • πŸ“Š Dashboard
  • πŸ—ΊοΈ Roadmap
  • [δΈ­ζ–‡]Langtorch one pager
  • [Eng]Langtorch one pager
Powered by GitBook
On this page
  • Capability Unit
  • Capability Wrapper
  • Capability Graph or DAG
  • Capability Node:

πŸ’ͺ Capability

The only limit to our realization of tomorrow will be our doubts of today; let us move forward with strong and active faith, believing in our capability to achieve the impossible. - Franklin Roosevelt

In langtorch, we define a concept called "Capability": the ability to do something. A capability consists of several "Capability units" combined together. In order to make each capability adapt to each other, we create an interface called "Node" that contains a capability unit and some context information. Combining different nodes together will make a capability DAG(Directed acyclic graph).

Capability Unit

A capability unit represents a single task in langtorch. It could be a large language model (LLM) with a pre-defined prompt or a custom function. In real-life scenarios, a capability unit is roughly equivalent to a task, such as performing a Q&A.

Capability Wrapper

The wrapper is a specialized CapabilityUnit designed for handling different cases

Example:

ConversationLLMWrapperUnitwraps LLMCapabilityUnit and adds conversation context and memory management. It takes a UserMessage as input and produces an AssistantMessage as output.

Capability Graph or DAG

A capability graph is a combination of multiple capability nodes.

Capability Node:

The Node interface represents a node in the CapabilityDAG. Each node has a unique ID, a list of out-degree nodes, and a process method that takes an iterable of inputs and generates an output. A node can be a simple processing step or a more complex capability unit.

PreviousAnnotation Based Prompt TemplateNextCapability Unit

Last updated 2 years ago