routers.mdx
 1  ---
 2  title: "Routers"
 3  id: routers
 4  slug: "/routers"
 5  description: "Routers is a group of components that route queries or documents to other components that can handle them best."
 6  ---
 7  
 8  # Routers
 9  
10  Routers is a group of components that route queries or documents to other components that can handle them best.
11  
12  | Component                                                              | Description                                                                                                     |
13  | --- | --- |
14  | [ConditionalRouter](routers/conditionalrouter.mdx)                           | Routes data based on specified conditions.                                                                      |
15  | [DocumentLengthRouter](routers/documentlengthrouter.mdx)                       | Routes documents to different output connections based on the length of their `content` field.                  |
16  | [DocumentTypeRouter](routers/documenttyperouter.mdx)                           | Routes documents based on their MIME types to different outputs for further processing.                         |
17  | [FileTypeRouter](routers/filetyperouter.mdx)                                   | Routes file paths or byte streams based on their type further down the pipeline.                                |
18  | [LLMMessagesRouter](routers/llmmessagesrouter.mdx)                             | Routes Chat Messages to various output connections using a generative Language Model to perform classification. |
19  | [MetadataRouter](routers/metadatarouter.mdx)                                   | Routes documents based on their metadata field values.                                                          |
20  | [TextLanguageRouter](routers/textlanguagerouter.mdx)                           | Routes queries based on their language.                                                                         |
21  | [TransformersTextRouter](routers/transformerstextrouter.mdx)                 | Routes text input to various output connections based on a model-defined categorization label.                  |
22  | [TransformersZeroShotTextRouter](routers/transformerszeroshottextrouter.mdx) | Routes text input to various output connections based on user-defined categorization label.                     |