supported_models.mdx
Overview
The supported_models.mdx file serves as a documentation page listing all models supported by RAGFlow, a framework that integrates various AI models for tasks such as chat, embedding, reranking, image-to-text, speech-to-text, and text-to-speech (TTS). This file is written in MDX format and is intended to be part of the documentation website, featuring a neatly formatted table of model providers alongside their supported capabilities.
The purpose of this file is to provide users and developers with an up-to-date, consolidated reference of which models are compatible with RAGFlow, helping them choose appropriate providers for their AI workflows. The file also includes important notes about model compatibility and pointers to the source code for the latest supported models.
Structure and Functionality
This file primarily contains a markdown table wrapped inside a React component <APITable>, which likely formats and styles the table for the documentation site.
Key Elements
Table Columns:
The table lists model providers in rows and features in columns:Chat
Embedding
Rerank
Img2txt (Image to Text)
Speech2txt (Speech to Text)
TTS (Text to Speech)
Visual Indicators:
Each cell in the table uses the emoji:heavy_check_mark:(✅) to indicate support for the corresponding feature by the model provider.Metadata Block:
The top YAML frontmatter sets sidebar position and URL slug for the documentation page.Notes and Warnings:
A danger alert highlights that users can configure compatible models with OpenAI APIs via a special "OpenAI-API-Compatible" provider.
A note alert clarifies that the list is extracted from the RAGFlow Python source code and may not always be current.
Detailed Explanation of Components
Frontmatter
---
sidebar_position: 1
slug: /supported_models
---
sidebar_position: Determines the order of the page in the sidebar navigation.slug: Defines the URL path for this documentation page.
Import Statement
import APITable from '@site/src/components/APITable';
Imports the
APITableReact component to render the table with enhanced styling and interactive features on the documentation site.
Models Support Table
The table is enclosed within the <APITable> component via MDX code blocks:
<APITable>
| Provider | Chat | Embedding | Rerank | Img2txt | Speech2txt | TTS |
| --------------------- | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ | ------------------ |
| Anthropic | :heavy_check_mark: | | | | | |
| Azure-OpenAI | :heavy_check_mark: | :heavy_check_mark: | | :heavy_check_mark: | :heavy_check_mark: | |
| ... | ... | ... | ... | ... | ... | ... |
</APITable>
Usage: This table visually conveys which AI model providers support which functionalities.
Extensibility: New models and features can be added by extending this table.
Source: The data is extracted from the RAGFlow Python source, specifically from
rag/llm/init.py.
Alerts
Important Notice
:::danger IMPORTANT
If your model is not listed here but has APIs compatible with those of OpenAI, click **OpenAI-API-Compatible** on the **Model providers** page to configure your model.
:::
Purpose: Guides users on how to add models not explicitly listed but compatible with OpenAI APIs.
Additional Note
:::note
The list of supported models is extracted from [this source](https://github.com/infiniflow/ragflow/blob/main/rag/llm/__init__.py) and may not be the most current. For the latest supported model list, please refer to the Python file.
:::
Purpose: Indicates the official source of truth for the supported models list and encourages users to check the Python code for updates.
Implementation Details and Algorithms
This file does not contain any algorithms or complex logic; it is purely a documentation asset.
The table data is manually maintained or generated from the Python backend source.
The usage of
<APITable>suggests a reusable React component abstracts styling and possibly sorting/filtering features for the table.The emoji checkmarks are a simple, user-friendly way to indicate support status clearly.
Interaction with Other Parts of the System
Source of Truth: The list corresponds to the implementation in the RAGFlow Python module at
rag/llm/init.py, which presumably defines and registers supported models.Documentation Site: This MDX file is part of the static documentation website, rendered by a React-based static site generator (likely Docusaurus).
Model Configuration: Users can follow links or instructions here to configure models in the RAGFlow system.
Component Dependency: Relies on the
APITableReact component for rendering the table.
Usage Example
Since this is a documentation file, there is no direct code usage. However, for developers or users:
To check if a model supports a particular functionality, refer to this table.
For adding a new model, update the source Python file
rag/llm/init.pyand then update this documentation accordingly to reflect the changes.For models with OpenAI-compatible APIs not listed here, use the "OpenAI-API-Compatible" provider option.
Visual Diagram
The following Mermaid flowchart illustrates the structure and data flow related to this file and its connection to the system:
flowchart TD
A[rag/llm/__init__.py] -->|Defines supported models| B[Supported Models Data]
B -->|Extracted to generate| C[supported_models.mdx]
C -->|Rendered using| D[APITable React Component]
D -->|Displayed on| E[Documentation Website]
E -->|User views model support info| F[User/Developer]
subgraph Documentation Site
C
D
E
end
Explanation:
The Python source file
rag/llm/init.pydefines supported models.Data is extracted from Python source to create or update
supported_models.mdx.The MDX file uses the
APITablecomponent to render the table.The documentation site hosts this page.
End-users consult this page for model compatibility information.
Summary
supported_models.mdxis a documentation page listing all AI model providers supported by RAGFlow.It features a feature support matrix table rendered via a custom React component.
The data is sourced from the RAGFlow backend Python module.
The file includes important usage notes and guidance for users adding new models.
It plays a vital role in the documentation ecosystem by helping users understand and select appropriate AI models.
It has no executable code or complex logic, focusing solely on clear, accessible presentation of model support information.
If you need further details about the backend implementation or APITable component, please refer to the respective source files in the RAGFlow repository.