LogoLogo
Home
  • Introduction
  • Quickstart
    • Starter guide
    • Core Concepts
      • Stack Type
      • Data Loader
      • Inputs/Outputs
      • Text Splitters
      • Embedding Model
      • Vector Store
      • Large Language Model
      • Memory
      • Chain
    • Testing Stack
    • Deployment
    • Knowledge Base
    • Organization and Teams
    • Secret Keys
    • Logs
  • Components
    • Inputs
    • Outputs
    • Document Loaders
    • Prompts
    • Text Splitters
    • Embeddings
    • Vector Store
    • Retrievers
    • Multi Modals
    • Agents
    • Large Language Models
    • Memories
    • Chains
    • Output Parsers
  • Customization
    • Writing Custom Components in GenAI Stack
    • Build your own custom component
    • Define parameters used for required components
  • Usecases
    • Simple QA using Open Source Large Language Models
    • Multilingual Indic Language Translation
    • Document Search and Chat
    • Chat with Multiple Documents
  • Terminologies
    • RAG - Retrieval Augmented Generation
    • Hybrid Search - Ensemble Retriever
  • REST APIs
    • GenAI Stack REST APIs
    • Chat API Reference
    • Text Generation API Reference
    • Rate Limiting and Sleep Mode
  • Troubleshooting
    • How to verify what is loaded and chunked from the loader?
  • Acknowledgements
    • Special Mentions
Powered by GitBook
On this page

Was this helpful?

  1. Components

Outputs

PreviousInputsNextDocument Loaders

Last updated 11 months ago

Was this helpful?

TextGenerationOutput

The TextGenerationOutput component is designed to store and manage text extracted from Document Loaders, images/speech outputs from Multimodal components, and output generated by Chains. It includes a Query field that allows users to input a query. This component's primary function is to ensure that the generated output is made readily accessible to users.

Parameters

  • Chain: Users can connect any chain component as an input to the TextGenerationOutput.

  • Documents: Users can connect any component that returns a list of documents, such as the PyPdfLoader, TextSplitters, etc.

  • Multimodal: Users can connect any Multimodal component that returns an object like an image or a speech.

  • Query: A Query is a special field that lets users input a query in case a stack doesn't have a prompt and memory component.

Example Usage

In the below example, the LLMChain acts as an input to the Output component (with no query). Since we have a prompt and memory, we are mentioning the inputs in the prompt and memory itself.

Since there is no prompt and memory, we are adding the query in the Output component to invoke a chain for generating the output.

In the example below, the Multimodal output is connected to the text generation output to invoke the speech generation process.

The Output component can take Chains as an input. It can also take any component that returns Documents. Additionally, it takes Multimodal outputs and a Query in case a stack doesn't have a prompt and memory component.

TextGenerationOutput with no query
TextGenerationOutput with query
TextGenerationOutput with Multimodal (OpenAITextToSpeech) as an input