Skip to content

Commit 23a3fda

Browse files
cnJasonZjasonhparvinxx
authored
✨ feat: add new model provider PPIO (#6133)
* feat: add new model provider PPIO * feat: add usage docs; fix model configs * fix: fix ppio runtime; fix model configs * fix: fix default model list * fix * fix: fix locales providers.json --------- Co-authored-by: Jason <[email protected]> Co-authored-by: arvinxx <[email protected]>
1 parent f472643 commit 23a3fda

File tree

25 files changed

+1107
-3
lines changed

25 files changed

+1107
-3
lines changed

.env.example

+4
Original file line numberDiff line numberDiff line change
@@ -127,6 +127,10 @@ OPENAI_API_KEY=sk-xxxxxxxxx
127127

128128
# TENCENT_CLOUD_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
129129

130+
### PPIO ####
131+
132+
# PPIO_API_KEY=sk-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
133+
130134
########################################
131135
############ Market Service ############
132136
########################################

Dockerfile

+2
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,8 @@ ENV \
197197
OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
198198
# Perplexity
199199
PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
200+
# PPIO
201+
PPIO_API_KEY="" PPIO_MODEL_LIST="" \
200202
# Qwen
201203
QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
202204
# SambaNova

Dockerfile.database

+2
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,8 @@ ENV \
240240
OPENROUTER_API_KEY="" OPENROUTER_MODEL_LIST="" \
241241
# Perplexity
242242
PERPLEXITY_API_KEY="" PERPLEXITY_MODEL_LIST="" PERPLEXITY_PROXY_URL="" \
243+
# PPIO
244+
PPIO_API_KEY="" PPIO_MODEL_LIST="" \
243245
# Qwen
244246
QWEN_API_KEY="" QWEN_MODEL_LIST="" QWEN_PROXY_URL="" \
245247
# SambaNova

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,7 @@ We have implemented support for the following model service providers:
198198

199199
<details><summary><kbd>See more providers (+26)</kbd></summary>
200200

201+
- **[PPIO](https://lobechat.com/discover/provider/ppio)**: PPIO supports stable and cost-efficient open-source LLM APIs, such as DeepSeek, Llama, Qwen etc. [Learn more](https://ppinfra.com/llm-api?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link)
201202
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI is a platform providing a variety of large language models and AI image generation API services, flexible, reliable, and cost-effective. It supports the latest open-source models like Llama3 and Mistral, offering a comprehensive, user-friendly, and auto-scaling API solution for generative AI application development, suitable for the rapid growth of AI startups.
202203
- **[Together AI](https://lobechat.com/discover/provider/togetherai)**: Together AI is dedicated to achieving leading performance through innovative AI models, offering extensive customization capabilities, including rapid scaling support and intuitive deployment processes to meet various enterprise needs.
203204
- **[Fireworks AI](https://lobechat.com/discover/provider/fireworksai)**: Fireworks AI is a leading provider of advanced language model services, focusing on functional calling and multimodal processing. Its latest model, Firefunction V2, is based on Llama-3, optimized for function calling, conversation, and instruction following. The visual language model FireLLaVA-13B supports mixed input of images and text. Other notable models include the Llama series and Mixtral series, providing efficient multilingual instruction following and generation support.
@@ -668,7 +669,7 @@ If you would like to learn more details, please feel free to look at our [📘 D
668669

669670
## 🤝 Contributing
670671

671-
Contributions of all types are more than welcome; if you are interested in contributing code, feel free to check out our GitHub [Issues][github-issues-link] and [Projects][github-project-link] to get stuck in to show us what youre made of.
672+
Contributions of all types are more than welcome; if you are interested in contributing code, feel free to check out our GitHub [Issues][github-issues-link] and [Projects][github-project-link] to get stuck in to show us what you're made of.
672673

673674
> \[!TIP]
674675
>
@@ -889,7 +890,7 @@ This project is [Apache 2.0](./LICENSE) licensed.
889890
[profile-link]: https://github.com/lobehub
890891
[share-linkedin-link]: https://linkedin.com/feed
891892
[share-linkedin-shield]: https://img.shields.io/badge/-share%20on%20linkedin-black?labelColor=black&logo=linkedin&logoColor=white&style=flat-square
892-
[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20(Function%20Calling),%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT/LLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI
893+
[share-mastodon-link]: https://mastodon.social/share?text=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source,%20extensible%20%28Function%20Calling%29,%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20https://github.com/lobehub/lobe-chat%20#chatbot%20#chatGPT%20#openAI
893894
[share-mastodon-shield]: https://img.shields.io/badge/-share%20on%20mastodon-black?labelColor=black&logo=mastodon&logoColor=white&style=flat-square
894895
[share-reddit-link]: https://www.reddit.com/submit?title=Check%20this%20GitHub%20repository%20out%20%F0%9F%A4%AF%20LobeChat%20-%20An%20open-source%2C%20extensible%20%28Function%20Calling%29%2C%20high-performance%20chatbot%20framework.%20It%20supports%20one-click%20free%20deployment%20of%20your%20private%20ChatGPT%2FLLM%20web%20application.%20%23chatbot%20%23chatGPT%20%23openAI&url=https%3A%2F%2Fgithub.com%2Flobehub%2Flobe-chat
895896
[share-reddit-shield]: https://img.shields.io/badge/-share%20on%20reddit-black?labelColor=black&logo=reddit&logoColor=white&style=flat-square

README.zh-CN.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ LobeChat 支持文件上传与知识库功能,你可以上传文件、图片
197197
- **[GitHub](https://lobechat.com/discover/provider/github)**: 通过 GitHub 模型,开发人员可以成为 AI 工程师,并使用行业领先的 AI 模型进行构建。
198198

199199
<details><summary><kbd>See more providers (+26)</kbd></summary>
200-
200+
- **[PPIO](https://lobechat.com/discover/provider/ppio)**: PPIO 派欧云提供稳定、高性价比的开源模型 API 服务,支持 DeepSeek 全系列、Llama、Qwen 等行业领先大模型。[了解更多](https://ppinfra.com/llm-api?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link)
201201
- **[Novita](https://lobechat.com/discover/provider/novita)**: Novita AI 是一个提供多种大语言模型与 AI 图像生成的 API 服务的平台,灵活、可靠且具有成本效益。它支持 Llama3、Mistral 等最新的开源模型,并为生成式 AI 应用开发提供了全面、用户友好且自动扩展的 API 解决方案,适合 AI 初创公司的快速发展。
202202
- **[Together AI](https://lobechat.com/discover/provider/togetherai)**: Together AI 致力于通过创新的 AI 模型实现领先的性能,提供广泛的自定义能力,包括快速扩展支持和直观的部署流程,满足企业的各种需求。
203203
- **[Fireworks AI](https://lobechat.com/discover/provider/fireworksai)**: Fireworks AI 是一家领先的高级语言模型服务商,专注于功能调用和多模态处理。其最新模型 Firefunction V2 基于 Llama-3,优化用于函数调用、对话及指令跟随。视觉语言模型 FireLLaVA-13B 支持图像和文本混合输入。其他 notable 模型包括 Llama 系列和 Mixtral 系列,提供高效的多语言指令跟随与生成支持。

docs/self-hosting/environment-variables/model-provider.mdx

+16
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,22 @@ If you need to use Azure OpenAI to provide model services, you can refer to the
217217
- Default: `-`
218218
- Example: `-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`
219219

220+
## PPIO
221+
222+
### `PPIO_API_KEY`
223+
224+
- Type: Required
225+
- Description: This your PPIO API Key.
226+
- Default: -
227+
- Example: `sk_xxxxxxxxxx`
228+
229+
### `PPIO_MODEL_LIST`
230+
231+
- Type: Optional
232+
- Description: Used to control the model list, use `+` to add a model, use `-` to hide a model, use `model_name=display_name` to customize the display name of a model, separated by commas. Definition syntax rules see [model-list][model-list]
233+
- Default: `-`
234+
- Example: `-all,+deepseek/deepseek-v3/community,+deepseek/deepseek-r1-distill-llama-70b`
235+
220236
## Github
221237

222238
### `GITHUB_TOKEN`

docs/self-hosting/environment-variables/model-provider.zh-CN.mdx

+16
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,22 @@ LobeChat 在部署时提供了丰富的模型服务商相关的环境变量,
215215
- 默认值:`-`
216216
- 示例:`-all,+01-ai/yi-34b-chat,+huggingfaceh4/zephyr-7b-beta`
217217

218+
## PPIO
219+
220+
### `PPIO_API_KEY`
221+
222+
- 类型:必选
223+
- 描述:这是你在 PPIO 网站申请的 API 密钥
224+
- 默认值:-
225+
- 示例:`sk_xxxxxxxxxxxx`
226+
227+
### `PPIO_MODEL_LIST`
228+
229+
- 类型:可选
230+
- 描述:用来控制模型列表,使用 `+` 增加一个模型,使用 `-` 来隐藏一个模型,使用 `模型名=展示名<扩展配置>` 来自定义模型的展示名,用英文逗号隔开。模型定义语法规则见 [模型列表][model-list]
231+
- 默认值:`-`
232+
- 示例:`-all,+deepseek/deepseek-v3/community,+deepseek/deepseek-r1-distill-llama-70b`
233+
218234
## Github
219235

220236
### `GITHUB_TOKEN`

docs/usage/providers/ppio.mdx

+57
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
title: Using PPIO API Key in LobeChat
3+
description: >-
4+
Learn how to integrate PPIO's language model APIs into LobeChat. Follow
5+
the steps to register, create an PPIO API key, configure settings, and
6+
chat with our various AI models.
7+
tags:
8+
- PPIO
9+
- DeepSeek
10+
- Llama
11+
- Qwen
12+
- uncensored
13+
- API key
14+
- Web UI
15+
---
16+
17+
# Using PPIO in LobeChat
18+
19+
<Image alt={'Using PPIO in LobeChat'} cover src={''} />
20+
21+
[PPIO](https://ppinfra.com?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link) supports stable and cost-efficient open-source LLM APIs, such as DeepSeek, Llama, Qwen etc.
22+
23+
This document will guide you on how to integrate PPIO in LobeChat:
24+
25+
<Steps>
26+
### Step 1: Register and Log in to PPIO
27+
28+
- Visit [PPIO](https://ppinfra.com?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link) and create an account
29+
- Upon registration, PPIO will provide a ¥5 credit (about 5M tokens).
30+
31+
<Image alt={'Register PPIO'} height={457} inStep src={'https://github.com/user-attachments/assets/7cb3019b-78c1-48e0-a64c-a6a4836affd9'} />
32+
33+
### Step 2: Obtain the API Key
34+
35+
- Visit PPIO's [key management page](https://ppinfra.com/settings/key-management), create and copy an API Key.
36+
37+
<Image alt={'Obtain PPIO API key'} inStep src={'https://github.com/user-attachments/assets/5abcf21d-5a6c-4fc8-8de6-bc47d4d2fa98'} />
38+
39+
### Step 3: Configure PPIO in LobeChat
40+
41+
- Visit the `Settings` interface in LobeChat
42+
- Find the setting for `PPIO` under `Language Model`
43+
44+
<Image alt={'Enter PPIO API key in LobeChat'} inStep src={'https://github.com/user-attachments/assets/000d6a5b-f8d4-4fd5-84cd-31556c5c1efd'} />
45+
46+
- Open PPIO and enter the obtained API key
47+
- Choose a PPIO model for your assistant to start the conversation
48+
49+
<Image alt={'Select and use PPIO model'} inStep src={'https://github.com/user-attachments/assets/207888f1-df21-4063-8e66-97b0d9cfa02e'} />
50+
51+
<Callout type={'warning'}>
52+
During usage, you may need to pay the API service provider, please refer to PPIO's [pricing
53+
policy](https://ppinfra.com/llm-api?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link).
54+
</Callout>
55+
</Steps>
56+
57+
You can now engage in conversations using the models provided by PPIO in LobeChat.

docs/usage/providers/ppio.zh-CN.mdx

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: 在 LobeChat 中使用 PPIO 派欧云 API Key
3+
description: >-
4+
学习如何将 PPIO 派欧云的 LLM API 集成到 LobeChat 中。跟随以下步骤注册 PPIO 账号、创建 API
5+
Key、并在 LobeChat 中进行设置。
6+
tags:
7+
- PPIO
8+
- PPInfra
9+
- DeepSeek
10+
- Qwen
11+
- Llama3
12+
- API key
13+
- Web UI
14+
---
15+
16+
# 在 LobeChat 中使用 PPIO 派欧云
17+
18+
<Image alt={'在 LobeChat 中使用 PPIO'} cover src={''} />
19+
20+
[PPIO 派欧云](https://ppinfra.com?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link)提供稳定、高性价比的开源模型 API 服务,支持 DeepSeek 全系列、Llama、Qwen 等行业领先大模型。
21+
22+
本文档将指导你如何在 LobeChat 中使用 PPIO:
23+
24+
<Steps>
25+
### 步骤一:注册 PPIO 派欧云账号并登录
26+
27+
- 访问 [PPIO 派欧云](https://ppinfra.com?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link) 并注册账号
28+
- 注册后,PPIO 会赠送 5 元(约 500 万 tokens)的使用额度
29+
30+
<Image alt={'注册 PPIO'} height={457} inStep src={'https://github.com/user-attachments/assets/7cb3019b-78c1-48e0-a64c-a6a4836affd9'} />
31+
32+
### 步骤二:创建 API 密钥
33+
34+
- 访问 PPIO 派欧云的 [密钥管理页面](https://ppinfra.com/settings/key-management) ,创建并且复制一个 API 密钥.
35+
36+
<Image alt={'创建 PPIO API 密钥'} inStep src={'https://github.com/user-attachments/assets/5abcf21d-5a6c-4fc8-8de6-bc47d4d2fa98'} />
37+
38+
### 步骤三:在 LobeChat 中配置 PPIO 派欧云
39+
40+
- 访问 LobeChat 的 `设置` 界面
41+
-`语言模型` 下找到 `PPIO` 的设置项
42+
- 打开 PPIO 并填入获得的 API 密钥
43+
44+
<Image alt={'在 LobeChat 中输入 PPIO API 密钥'} inStep src={'https://github.com/user-attachments/assets/4eaadac7-595c-41ad-a6e0-64c3105577d7'} />
45+
46+
- 为你的助手选择一个 Novita AI 模型即可开始对话
47+
48+
<Image alt={'选择并使用 PPIO 模型'} inStep src={'https://github.com/user-attachments/assets/8cf66e00-04fe-4bad-9e3d-35afc7d9aa58'} />
49+
50+
<Callout type={'warning'}>
51+
在使用过程中你可能需要向 API 服务提供商付费,PPIO 的 API 费用参考[这里](https://ppinfra.com/llm-api?utm_source=github_lobe-chat&utm_medium=github_readme&utm_campaign=link)
52+
</Callout>
53+
</Steps>
54+
55+
至此你已经可以在 LobeChat 中使用 Novita AI 提供的模型进行对话了。

locales/en-US/providers.json

+3
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,8 @@
139139
},
140140
"zhipu": {
141141
"description": "Zhipu AI offers an open platform for multimodal and language models, supporting a wide range of AI application scenarios, including text processing, image understanding, and programming assistance."
142+
},
143+
"ppio": {
144+
"description": "PPIO supports stable and cost-efficient open-source LLM APIs, such as DeepSeek, Llama, Qwen etc."
142145
}
143146
}

locales/zh-CN/providers.json

+4
Original file line numberDiff line numberDiff line change
@@ -139,5 +139,9 @@
139139
},
140140
"zhipu": {
141141
"description": "智谱 AI 提供多模态与语言模型的开放平台,支持广泛的AI应用场景,包括文本处理、图像理解与编程辅助等。"
142+
},
143+
"ppio": {
144+
"description": "PPIO 派欧云提供稳定、高性价比的开源模型 API 服务,支持 DeepSeek 全系列、Llama、Qwen 等行业领先大模型。"
142145
}
143146
}
147+

src/app/[variants]/(main)/settings/llm/ProviderList/providers.tsx

+2
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import {
2121
NvidiaProviderCard,
2222
OpenRouterProviderCard,
2323
PerplexityProviderCard,
24+
PPIOProviderCard,
2425
QwenProviderCard,
2526
SambaNovaProviderCard,
2627
SenseNovaProviderCard,
@@ -98,6 +99,7 @@ export const useProviderList = (): ProviderItem[] => {
9899
SiliconCloudProviderCard,
99100
HigressProviderCard,
100101
GiteeAIProviderCard,
102+
PPIOProviderCard,
101103
],
102104
[
103105
AzureProvider,

src/config/aiModels/index.ts

+3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import { default as ollama } from './ollama';
3030
import { default as openai } from './openai';
3131
import { default as openrouter } from './openrouter';
3232
import { default as perplexity } from './perplexity';
33+
import { default as ppio } from './ppio';
3334
import { default as qwen } from './qwen';
3435
import { default as sambanova } from './sambanova';
3536
import { default as sensenova } from './sensenova';
@@ -98,6 +99,7 @@ export const LOBE_DEFAULT_MODEL_LIST = buildDefaultModelList({
9899
openai,
99100
openrouter,
100101
perplexity,
102+
ppio,
101103
qwen,
102104
sambanova,
103105
sensenova,
@@ -147,6 +149,7 @@ export { default as ollama } from './ollama';
147149
export { default as openai } from './openai';
148150
export { default as openrouter } from './openrouter';
149151
export { default as perplexity } from './perplexity';
152+
export { default as ppio } from './ppio';
150153
export { default as qwen } from './qwen';
151154
export { default as sambanova } from './sambanova';
152155
export { default as sensenova } from './sensenova';

0 commit comments

Comments
 (0)