diff --git a/conf/llm_factories.json b/conf/llm_factories.json index 195dfb137..5543bb331 100644 --- a/conf/llm_factories.json +++ b/conf/llm_factories.json @@ -2789,6 +2789,128 @@ } ] }, + { + "name": "PPIO", + "logo": "", + "tags": "LLM", + "status": "1", + "llm": [ + { + "llm_name": "deepseek/deepseek-r1/community", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-v3/community", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-r1", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-v3", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-r1-distill-llama-70b", + "tags": "LLM,CHAT,32k", + "max_tokens": 32000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-r1-distill-qwen-32b", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-r1-distill-qwen-14b", + "tags": "LLM,CHAT,64k", + "max_tokens": 64000, + "model_type": "chat" + }, + { + "llm_name": "deepseek/deepseek-r1-distill-llama-8b", + "tags": "LLM,CHAT,32k", + "max_tokens": 32000, + "model_type": "chat" + }, + { + "llm_name": "qwen/qwen-2.5-72b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "qwen/qwen-2-vl-72b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "meta-llama/llama-3.2-3b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "qwen/qwen2.5-32b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32000, + "model_type": "chat" + }, + { + "llm_name": "baichuan/baichuan2-13b-chat", + "tags": "LLM,CHAT,14k", + "max_tokens": 14336, + "model_type": "chat" + }, + { + "llm_name": "meta-llama/llama-3.1-70b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "meta-llama/llama-3.1-8b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "01-ai/yi-1.5-34b-chat", + "tags": "LLM,CHAT,16k", + "max_tokens": 16384, + "model_type": "chat" + }, + { + "llm_name": "01-ai/yi-1.5-9b-chat", + "tags": "LLM,CHAT,16k", + "max_tokens": 16384, + "model_type": "chat" + }, + { + "llm_name": "thudm/glm-4-9b-chat", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + }, + { + "llm_name": "qwen/qwen-2-7b-instruct", + "tags": "LLM,CHAT,32k", + "max_tokens": 32768, + "model_type": "chat" + } + ] + }, { "name": "01.AI", "logo": "", diff --git a/docs/references/supported_models.mdx b/docs/references/supported_models.mdx index fe5ea53db..98511517c 100644 --- a/docs/references/supported_models.mdx +++ b/docs/references/supported_models.mdx @@ -44,6 +44,7 @@ A complete list of models supported by RAGFlow, which will continue to expand. | OpenRouter | :heavy_check_mark: | | | :heavy_check_mark: | | | | PerfXCloud | :heavy_check_mark: | :heavy_check_mark: | | | | | | Replicate | :heavy_check_mark: | :heavy_check_mark: | | | | | +| PPIO | :heavy_check_mark: | | | | | | | SILICONFLOW | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | :heavy_check_mark: | | | | StepFun | :heavy_check_mark: | | | | | | | Tencent Hunyuan | :heavy_check_mark: | | | | | | diff --git a/docs/release_notes.md b/docs/release_notes.md index 10053547c..0c66a8243 100644 --- a/docs/release_notes.md +++ b/docs/release_notes.md @@ -269,7 +269,7 @@ Released on August 26, 2024. - Incorporates monitoring for the task executor. - Introduces Agent tools **GitHub**, **DeepL**, **BaiduFanyi**, **QWeather**, and **GoogleScholar**. - Supports chunking of EML files. -- Supports more LLMs or model services: **GPT-4o-mini**, **PerfXCloud**, **TogetherAI**, **Upstage**, **Novita.AI**, **01.AI**, **SiliconFlow**, **XunFei Spark**, **Baidu Yiyan**, and **Tencent Hunyuan**. +- Supports more LLMs or model services: **GPT-4o-mini**, **PerfXCloud**, **TogetherAI**, **Upstage**, **Novita.AI**, **01.AI**, **SiliconFlow**, **PPIO**, **XunFei Spark**, **Baidu Yiyan**, and **Tencent Hunyuan**. ## v0.9.0 diff --git a/rag/llm/__init__.py b/rag/llm/__init__.py index 6687e9d3f..bb3ba64ee 100644 --- a/rag/llm/__init__.py +++ b/rag/llm/__init__.py @@ -75,6 +75,7 @@ from .chat_model import ( UpstageChat, NovitaAIChat, SILICONFLOWChat, + PPIOChat, YiChat, ReplicateChat, HunyuanChat, @@ -220,6 +221,7 @@ ChatModel = { "Upstage": UpstageChat, "novita.ai": NovitaAIChat, "SILICONFLOW": SILICONFLOWChat, + "PPIO": PPIOChat, "01.AI": YiChat, "Replicate": ReplicateChat, "Tencent Hunyuan": HunyuanChat, diff --git a/rag/llm/chat_model.py b/rag/llm/chat_model.py index 83a4fc37e..4d843c85f 100644 --- a/rag/llm/chat_model.py +++ b/rag/llm/chat_model.py @@ -952,6 +952,13 @@ class OpenAI_APIChat(Base): super().__init__(key, model_name, base_url) +class PPIOChat(Base): + def __init__(self, key, model_name, base_url="https://api.ppinfra.com/v3/openai"): + if not base_url: + base_url = "https://api.ppinfra.com/v3/openai" + super().__init__(key, model_name, base_url) + + class CoHereChat(Base): def __init__(self, key, model_name, base_url=""): from cohere import Client diff --git a/web/src/assets/svg/llm/ppio.svg b/web/src/assets/svg/llm/ppio.svg new file mode 100755 index 000000000..49ab9a1f6 --- /dev/null +++ b/web/src/assets/svg/llm/ppio.svg @@ -0,0 +1,3 @@ + + + diff --git a/web/src/constants/setting.ts b/web/src/constants/setting.ts index a58af0176..ed1165634 100644 --- a/web/src/constants/setting.ts +++ b/web/src/constants/setting.ts @@ -56,6 +56,7 @@ export const IconMap = { Upstage: 'upstage', 'novita.ai': 'novita-ai', SILICONFLOW: 'siliconflow', + 'PPIO': 'ppio', '01.AI': 'yi', Replicate: 'replicate', 'Tencent Hunyuan': 'hunyuan', diff --git a/web/src/utils/common-util.ts b/web/src/utils/common-util.ts index 9ad4d1638..e6f05bcfd 100644 --- a/web/src/utils/common-util.ts +++ b/web/src/utils/common-util.ts @@ -38,6 +38,7 @@ export const formatNumberWithThousandsSeparator = (numberStr: string) => { const orderFactoryList = [ 'OpenAI', 'Moonshot', + "PPIO", 'ZHIPU-AI', 'Ollama', 'Xinference',