Outputs
Last updated
Last updated
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.
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.
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.