mirror of
https://github.com/infiniflow/ragflow.git
synced 2026-07-16 04:37:21 +08:00
### Summary Adds FunASR as a self-hosted speech-to-text provider through its OpenAI-compatible `/v1/audio/transcriptions` endpoint. This is a focused replacement for #15526 by @Rene0422 and relates to #15448. The unrelated Markdown parser changes from the previous branch are intentionally removed so this PR contains only the FunASR provider integration. - register FunASR as a `SPEECH2TEXT` factory; - add `FunASRSeq2txt` with `sensevoice` and `http://localhost:8000/v1` defaults, an optional API key, URL normalization, and inherited transcription handling; - wire FunASR into the current local-provider schema with a prefilled local URL and official documentation link; - discover the server's `/v1/models` dynamically and expose every returned model as speech-to-text in the model picker; - use RAGFlow's existing default provider icon fallback instead of referencing a missing `funasr` asset; - list FunASR in the supported-provider documentation; - add focused backend and frontend regression tests. ### Validation - focused backend pytest suite -> `7 passed` - real CPU `funasr-server` + RAGFlow provider smoke test -> discovered `fun-asr-nano`, `sensevoice`, and `paraformer`; transcribed a real WAV as `我现在在录一段测试音频` (`10` tokens, `0.504s`) - `ruff check` and `ruff format --check` on the changed Python files - `python3 -m py_compile` on the provider and its test - JSON parse and a semantic assertion for exactly one enabled FunASR `SPEECH2TEXT` factory - focused frontend Jest test -> `2 passed` - ESLint and Prettier on all changed TypeScript files - `npm run build` -> production build succeeded (`14,181` modules transformed) - `git diff --check` ### Deployment Run FunASR separately and point the RAGFlow provider at it: ```bash pip install funasr funasr-server --device cuda --model sensevoice ``` The API key remains optional because the stock local server does not require authentication. A key can still be supplied when the endpoint is protected by a gateway. --------- Signed-off-by: LauraGPT <LauraGPT@users.noreply.github.com> Co-authored-by: LauraGPT <LauraGPT@users.noreply.github.com>
101 lines
5.6 KiB
Plaintext
101 lines
5.6 KiB
Plaintext
---
|
|
sidebar_position: 3
|
|
slug: /supported_models
|
|
sidebar_custom_props: {
|
|
categoryIcon: LucideBox
|
|
}
|
|
---
|
|
# Model providers
|
|
|
|
import APITable from '@site/src/components/APITable';
|
|
|
|
A complete list of model providers supported by RAGFlow, which will continue to expand.
|
|
|
|
```mdx-code-block
|
|
<APITable>
|
|
```
|
|
|
|
| Provider | URL |
|
|
| --------------------- | ----------------------------------------------- |
|
|
| Anthropic | `https://www.anthropic.com` |
|
|
| Astraflow | `https://astraflow.ucloud-global.com/en-us` |
|
|
| Astraflow-CN | `https://astraflow.ucloud.cn/` |
|
|
| Avian | `https://www.avian.io` |
|
|
| Azure-OpenAI | `https://azure.microsoft.com/en-us/products/ai-services/openai-service` |
|
|
| BaiChuan | `https://www.baichuan-ai.com` |
|
|
| BaiduYiyan | `https://yiyan.baidu.com` |
|
|
| Bedrock | `https://aws.amazon.com/bedrock/` |
|
|
| Cohere | `https://cohere.com` |
|
|
| DeepSeek | `https://www.deepseek.com` |
|
|
| Fish Audio | `https://fish.audio` |
|
|
| FunASR | `https://github.com/modelscope/FunASR` |
|
|
| FuturMix | `https://futurmix.ai` |
|
|
| Gemini | `https://gemini.google.com` |
|
|
| Google Cloud | `https://cloud.google.com` |
|
|
| GPUStack | `https://gpustack.ai` |
|
|
| Groq | `https://groq.com` |
|
|
| HuggingFace | `https://huggingface.co` |
|
|
| Jina | `https://jina.ai` |
|
|
| LocalAI | `https://localai.io` |
|
|
| LongCat | `https://longcat.chat` |
|
|
| LM-Studio | `https://lmstudio.ai` |
|
|
| MiniMax | `https://www.minimaxi.com` |
|
|
| MinerU | `https://mineru.net/` |
|
|
| Mistral | `https://mistral.ai` |
|
|
| ModelScope | `https://www.modelscope.cn` |
|
|
| Moonshot | `https://www.moonshot.cn` |
|
|
| NovitaAI | `https://novita.ai` |
|
|
| NVIDIA | `https://www.nvidia.com` |
|
|
| Ollama | `https://ollama.com` |
|
|
| OpenAI | `https://openai.com` |
|
|
| OpenAI-API-Compatible | N/A |
|
|
| OpenRouter | `https://openrouter.ai` |
|
|
| Perplexity | `https://www.perplexity.ai` |
|
|
| Replicate | `https://replicate.com` |
|
|
| PPIO | `https://ppio.com` |
|
|
| SILICONFLOW | `https://siliconflow.cn` |
|
|
| StepFun | `https://www.stepfun.com` |
|
|
| Tencent Hunyuan | `https://hunyuan.tencent.com` |
|
|
| Tencent Cloud | `https://cloud.tencent.com` |
|
|
| TogetherAI | `https://www.together.ai` |
|
|
| TokenPony | `https://tokenpony.cn` |
|
|
| Tongyi-Qianwen | `https://tongyi.aliyun.com` |
|
|
| Upstage | `https://www.upstage.ai` |
|
|
| VLLM | `https://vllm.ai` |
|
|
| VolcEngine | `https://www.volcengine.com` |
|
|
| Voyage AI | `https://www.voyageai.com` |
|
|
| Xinference | `https://github.com/xorbitsai/inference` |
|
|
| XunFei Spark | `https://xinghuo.xfyun.cn` |
|
|
| xAI | `https://x.ai` |
|
|
| ZHIPU-AI | `https://www.zhipuai.cn` |
|
|
| DeepInfra | `https://deepinfra.com` |
|
|
| 302.AI | `https://302.ai` |
|
|
| CometAPI | `https://cometapi.com` |
|
|
| DeerAPI | `https://deerapi.com` |
|
|
| Jiekou.AI | `https://jiekou.ai` |
|
|
|
|
```mdx-code-block
|
|
</APITable>
|
|
```
|
|
|
|
:::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.
|
|
:::
|
|
|
|
## Example: AI Badgr (OpenAI-compatible)
|
|
|
|
You can use **AI Badgr** with RAGFlow via the existing OpenAI-API-Compatible provider.
|
|
|
|
To configure AI Badgr:
|
|
|
|
- **Provider**: `OpenAI-API-Compatible`
|
|
- **Base URL**: `https://aibadgr.com/api/v1`
|
|
- **API Key**: your AI Badgr API key (from the AI Badgr dashboard)
|
|
- **Model**: any AI Badgr chat or embedding model ID, as exposed by AI Badgr's OpenAI-compatible APIs
|
|
|
|
AI Badgr implements OpenAI-compatible endpoints for `/v1/chat/completions`, `/v1/embeddings`, and `/v1/models`, so no additional code changes in RAGFlow are required.
|
|
|
|
:::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.
|
|
:::
|