> For the complete documentation index, see [llms.txt](https://docs.aiplanet.com/genai-stack-1/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.aiplanet.com/genai-stack-1/components/outputs.md).

# Outputs

### 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.

<figure><img src="/files/8fjvCuXryTQr7jV6nX7r" alt=""><figcaption><p>TextGenerationOutput with no query</p></figcaption></figure>

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

<figure><img src="/files/jjE1iT6sQZkxfSCSIl2Q" alt=""><figcaption><p>TextGenerationOutput with query</p></figcaption></figure>

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

<figure><img src="/files/umQDY0DjM8HRKVUQXLBc" alt=""><figcaption><p>TextGenerationOutput with Multimodal (OpenAITextToSpeech) as an input</p></figcaption></figure>

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.
