1
0
Fork 0

add kirara 、one-hub、new-api

This commit is contained in:
TGY 2025-02-25 18:05:52 +08:00
parent 21db2ff3ac
commit 8461188f3b
14 changed files with 626 additions and 0 deletions

82
kirara/README.md Normal file
View File

@ -0,0 +1,82 @@
<div align="center">
# Kirara AI Chatbot Framework
[![GitHub stars](https://img.shields.io/github/stars/lss233/chatgpt-mirai-qq-bot?style=social)](https://github.com/lss233/chatgpt-mirai-qq-bot)
</div>
## 概述
Kirara 是一个基于插件生态和工作流系统的 AI 聊天机器人框架,支持多种 AI 模型和即时通讯平台。
## 主要特性
- 支持多种 AI 模型DeepSeek、Claude、Grok、OpenAI、Gemini、ChatGLM、Ollama
- 人设调教与虚拟女仆功能
- 语音对话支持
- 多平台支持QQ、Telegram、Discord、微信等
- 插件系统扩展
- 工作流自定义
## 部署
### 使用 Docker Compose 部署(推荐)
```yaml
version: "3.8"
services:
kirara-agent:
image: lss233/kirara-agent-framework:latest
container_name: kirara-agent
restart: always
volumes:
- ./data:/app/data
ports:
- "${PANEL_APP_PORT_HTTP}:8080"
```
启动命令:
```bash
docker-compose up -d
```
### 直接使用 Docker 镜像
```bash
docker run -d \
--name kirara-agent \
--restart always \
-v $(pwd)/data:/app/data \
-p 8080:8080 \
lss233/kirara-agent-framework:latest
```
## 配置
环境变量配置:
| 变量名 | 描述 | 默认值 |
|--------|------|--------|
| PANEL_APP_PORT_HTTP | HTTP 服务端口 | 8080 |
| DATA_PATH | 数据存储路径 | /app/data |
## 界面截图
(截图待添加)
## 交流与支持
- GitHub Issues: [https://github.com/lss233/chatgpt-mirai-qq-bot/issues](https://github.com/lss233/chatgpt-mirai-qq-bot/issues)
- QQ 群: 123456789
- Telegram 群: @kirara_chat
## 相关项目
- [Mirai](https://github.com/mamoe/mirai): QQ 协议实现
- [ChatGPT-Mirai](https://github.com/lss233/chatgpt-mirai-qq-bot): 项目基础
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=lss233/chatgpt-mirai-qq-bot&type=Date)](https://star-history.com/#lss233/chatgpt-mirai-qq-bot&Date)

21
kirara/data.yml Normal file
View File

@ -0,0 +1,21 @@
name: kirara
tags:
- AI / 大模型
- 聊天机器人
title: Kirara AI 聊天机器人框架
description: Kirara AI 聊天机器人框架
additionalProperties:
key: kirara
name: kirara
tags:
- AI
- Chatbot
shortDescZh: 插件生态 x 工作流系统DIY 你自己的 AI 聊天机器人支持DeepSeek、Claude、Grok、OpenAI、Gemini、ChatGLM、Ollama人设调教虚拟女仆、语音对话 | 支持 QQ、Telegram、Discord、微信 等平台
shortDescEn: Plugin ecosystem x workflow system, DIY your own AI chatbot! Supports DeepSeek, Claude, Grok, OpenAI, Gemini, ChatGLM, Ollama, character customization, virtual maid, voice chat | Supports QQ, Telegram, Discord, WeChat and other platforms
type: tool
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://kirara-docs.app.lss233.com/
github: https://github.com/lss233/chatgpt-mirai-qq-bot/
document: https://github.com/lss233/chatgpt-mirai-qq-bot/blob/master/README.md

17
kirara/latest/data.yml Normal file
View File

@ -0,0 +1,17 @@
additionalProperties:
formFields:
- default: 48080
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: ./data
edit: true
envKey: DATA_PATH
labelEn: Data folder path
labelZh: 数据文件夹路径
required: true
type: text

View File

@ -0,0 +1,18 @@
version: "3.8"
services:
kirara-agent:
image: lss233/kirara-agent-framework:latest
container_name: ${CONTAINER_NAME}
restart: always
volumes:
- "${DATA_PATH}:/app/data"
ports:
- "${PANEL_APP_PORT_HTTP}:8080"
networks:
- 1panel-network
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

157
new-api/README.md Normal file
View File

@ -0,0 +1,157 @@
<div align="center">
![new-api](https://raw.githubusercontent.com/Calcium-Ion/new-api/refs/heads/main/web/public/logo.png)
# New API
<a href="https://trendshift.io/repositories/8227" target="_blank"><img src="https://trendshift.io/api/badge/repositories/8227" alt="Calcium-Ion%2Fnew-api | Trendshift" style="width: 250px; height: 55px;" width="250" height="55"/></a>
</div>
> [!NOTE]
> 本项目为开源项目,在[One API](https://github.com/songquanpeng/one-api)的基础上进行二次开发
> [!IMPORTANT]
> 使用者必须在遵循 OpenAI 的[使用条款](https://openai.com/policies/terms-of-use)以及**法律法规**的情况下使用,不得用于非法用途。
> 本项目仅供个人学习使用,不保证稳定性,且不提供任何技术支持。
> 根据[《生成式人工智能服务管理暂行办法》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm)的要求,请勿对中国地区公众提供一切未经备案的生成式人工智能服务。
> [!TIP]
> 最新版Docker镜像`calciumion/new-api:latest`
> 默认账号root 密码123456
> 更新指令:
> ```
> docker run --rm -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower -cR
> ```
## 主要变更
此分叉版本的主要变更如下:
1. 全新的UI界面部分界面还待更新
2. 添加[Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy)接口的支持,[对接文档](Midjourney.md)
3. 支持在线充值功能,可在系统设置中设置,当前支持的支付接口:
+ [x] 易支付
4. 支持用key查询使用额度:
+ 配合项目[neko-api-key-tool](https://github.com/Calcium-Ion/neko-api-key-tool)可实现用key查询使用
5. 渠道显示已使用额度,支持指定组织访问
6. 分页支持选择每页显示数量
7. 兼容原版One API的数据库可直接使用原版数据库one-api.db
8. 支持模型按次数收费,可在 系统设置-运营设置 中设置
9. 支持渠道**加权随机**
10. 数据看板
11. 可设置令牌能调用的模型
12. 支持Telegram授权登录。
1. 系统设置-配置登录注册-允许通过Telegram登录
2. 对[@Botfather](https://t.me/botfather)输入指令/setdomain
3. 选择你的bot然后输入http(s)://你的网站地址/login
4. Telegram Bot 名称是bot username 去掉@后的字符串
13. 添加 [Suno API](https://github.com/Suno-API/Suno-API)接口的支持,[对接文档](Suno.md)
14. 支持Rerank模型目前仅兼容Cohere和Jina可接入Dify[对接文档](Rerank.md)
15. **[OpenAI Realtime API](https://platform.openai.com/docs/guides/realtime/integration)** - 支持OpenAI的Realtime API支持Azure渠道。
## 模型支持
此版本额外支持以下模型:
1. 第三方模型 **gps** gpt-4-gizmo-*
2. 智谱glm-4vglm-4v识图
3. Anthropic Claude 3
4. [Ollama](https://github.com/ollama/ollama?tab=readme-ov-file),添加渠道时,密钥可以随便填写,默认的请求地址是[http://localhost:11434](http://localhost:11434),如果需要修改请在渠道中修改
5. [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy)接口,[对接文档](Midjourney.md)
6. [零一万物](https://platform.lingyiwanwu.com/)
7. 自定义渠道,支持填入完整调用地址
8. [Suno API](https://github.com/Suno-API/Suno-API) 接口,[对接文档](Suno.md)
9. Rerank模型目前支持[Cohere](https://cohere.ai/)和[Jina](https://jina.ai/)[对接文档](Rerank.md)
10. Dify
11. Vertex AI目前兼容ClaudeGeminiLlama3.1
您可以在渠道中添加自定义模型gpt-4-gizmo-*此模型并非OpenAI官方模型而是第三方模型使用官方key无法调用。
## 比原版One API多出的配置
- `GENERATE_DEFAULT_TOKEN`:是否为新注册用户生成初始令牌,默认为 `false`
- `STREAMING_TIMEOUT`:设置流式一次回复的超时时间,默认为 60 秒。
- `DIFY_DEBUG`:设置 Dify 渠道是否输出工作流和节点信息到客户端,默认为 `true`
- `FORCE_STREAM_OPTION`是否覆盖客户端stream_options参数请求上游返回流模式usage默认为 `true`建议开启不影响客户端传入stream_options参数返回结果。
- `GET_MEDIA_TOKEN`是否统计图片token默认为 `true`关闭后将不再在本地计算图片token可能会导致和上游计费不同此项覆盖 `GET_MEDIA_TOKEN_NOT_STREAM` 选项作用。
- `GET_MEDIA_TOKEN_NOT_STREAM`:是否在非流(`stream=false`情况下统计图片token默认为 `true`
- `UPDATE_TASK`是否更新异步任务Midjourney、Suno默认为 `true`,关闭后将不会更新任务进度。
- `GEMINI_MODEL_MAP`Gemini模型指定版本(v1/v1beta),使用“模型:版本”指定,","分隔,例如:-e GEMINI_MODEL_MAP="gemini-1.5-pro-latest:v1beta,gemini-1.5-pro-001:v1beta",为空则使用默认配置(v1beta)
- `COHERE_SAFETY_SETTING`Cohere模型[安全设置](https://docs.cohere.com/docs/safety-modes#overview),可选值为 `NONE`, `CONTEXTUAL``STRICT`,默认为 `NONE`
## 部署
### 部署要求
- 本地数据库默认SQLiteDocker 部署默认使用 SQLite必须挂载 `/data` 目录到宿主机)
- 远程数据库MySQL 版本 >= 5.7.8PgSQL 版本 >= 9.6
### 使用宝塔面板Docker功能部署
安装宝塔面板 (**9.2.0版本**及以上),前往 [宝塔面板](https://www.bt.cn/new/download.html) 官网,选择正式版的脚本下载安装
安装后登录宝塔面板,在菜单栏中点击 Docker ,首次进入会提示安装 Docker 服务,点击立即安装,按提示完成安装
安装完成后在应用商店中找到 **New-API** ,点击安装,配置基本选项 即可完成安装
[图文教程](BT.md)
### 基于 Docker 进行部署
### 使用 Docker Compose 部署(推荐)
```shell
# 下载项目
git clone https://github.com/Calcium-Ion/new-api.git
cd new-api
# 按需编辑 docker-compose.yml
# 启动
docker-compose up -d
```
### 直接使用 Docker 镜像
```shell
# 使用 SQLite 的部署命令:
docker run --name new-api -d --restart always -p 3000:3000 -e TZ=Asia/Shanghai -v /home/ubuntu/data/new-api:/data calciumion/new-api:latest
# 使用 MySQL 的部署命令,在上面的基础上添加 `-e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi"`,请自行修改数据库连接参数。
# 例如:
docker run --name new-api -d --restart always -p 3000:3000 -e SQL_DSN="root:123456@tcp(localhost:3306)/oneapi" -e TZ=Asia/Shanghai -v /home/ubuntu/data/new-api:/data calciumion/new-api:latest
```
## 渠道重试
渠道重试功能已经实现,可以在`设置->运营设置->通用设置`设置重试次数,**建议开启缓存**功能。
如果开启了重试功能,第一次重试使用同优先级,第二次重试使用下一个优先级,以此类推。
### 缓存设置方法
1. `REDIS_CONN_STRING`:设置之后将使用 Redis 作为缓存使用。
+ 例子:`REDIS_CONN_STRING=redis://default:redispw@localhost:49153`
2. `MEMORY_CACHE_ENABLED`:启用内存缓存(如果设置了`REDIS_CONN_STRING`,则无需手动设置),会导致用户额度的更新存在一定的延迟,可选值为 `true``false`,未设置则默认为 `false`
+ 例子:`MEMORY_CACHE_ENABLED=true`
### 为什么有的时候没有重试
这些错误码不会重试400504524
### 我想让400也重试
在`渠道->编辑`中,将`状态码复写`改为
```json
{
"400": "500"
}
```
可以实现400错误转为500错误从而重试
## Midjourney接口设置文档
[对接文档](Midjourney.md)
## Suno接口设置文档
[对接文档](Suno.md)
## 界面截图
![796df8d287b7b7bd7853b2497e7df511](https://github.com/user-attachments/assets/255b5e97-2d3a-4434-b4fa-e922ad88ff5a)
![image](https://github.com/Calcium-Ion/new-api/assets/61247483/ad0e7aae-0203-471c-9716-2d83768927d4)
![image](https://github.com/user-attachments/assets/29f81de5-33fc-4fc5-a5ff-f9b54b653c7c)
![image](https://github.com/Calcium-Ion/new-api/assets/61247483/3ca0b282-00ff-4c96-bf9d-e29ef615c605)
夜间模式
![image](https://github.com/Calcium-Ion/new-api/assets/61247483/1c66b593-bb9e-4757-9720-ff2759539242)
![image](https://github.com/Calcium-Ion/new-api/assets/61247483/af9a07ee-5101-4b3d-8bd9-ae21a4fd7e9e)
## 交流群
<img src="https://github.com/user-attachments/assets/9ca0bc82-e057-4230-a28d-9f198fa022e3" width="200">
## 相关项目
- [One API](https://github.com/songquanpeng/one-api):原版项目
- [Midjourney-Proxy](https://github.com/novicezk/midjourney-proxy)Midjourney接口支持
- [chatnio](https://github.com/Deeptrain-Community/chatnio):下一代 AI 一站式 B/C 端解决方案
- [neko-api-key-tool](https://github.com/Calcium-Ion/neko-api-key-tool)用key查询使用额度
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=Calcium-Ion/new-api&type=Date)](https://star-history.com/#Calcium-Ion/new-api&Date)

19
new-api/data.yml Normal file
View File

@ -0,0 +1,19 @@
name: new api
tags:
- AI / 大模型
title: OpenAI 接口管理 & 分发系统
description: OpenAI 接口管理 & 分发系统
additionalProperties:
key: new-api
name: new api
tags:
- AI
shortDescZh: AI模型接口管理与分发系统支持将多种大模型转为OpenAI格式调用、支持Midjourney Proxy、Suno、Rerank兼容易支付协议可供个人或者企业内部管理与分发渠道使用本项目基于One API二次开发。
shortDescEn: Access all LLM through the standard OpenAI API format, easy to deploy & use
type: tool
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://nekoapi.com/
github: https://github.com/Calcium-Ion/new-api
document: https://github.com/Calcium-Ion/new-api/blob/main/README.md

52
new-api/latest/data.yml Normal file
View File

@ -0,0 +1,52 @@
additionalProperties:
formFields:
- default: ""
edit: true
envKey: PANEL_DB_HOST
key: mysql
labelEn: Database Service
labelZh: 数据库服务
required: true
type: service
- default: newapi
edit: true
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: newapi
edit: true
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: newapi
edit: true
envKey: PANEL_DB_USER_PASSWORD
labelEn: Password
labelZh: 数据库用户密码
random: true
required: true
rule: paramComplexity
type: password
- default: 3000
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Time Zone
labelZh: 时区
required: true
type: text

View File

@ -0,0 +1,26 @@
services:
one-api:
image: calciumion/new-api:latest
container_name: ${CONTAINER_NAME}
restart: always
ports:
- ${PANEL_APP_PORT_HTTP}:3000
networks:
- 1panel-network
command: --log-dir /app/logs
volumes:
- ./data:/data
- ./logs:/app/logs
environment:
- SQL_DSN=${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@tcp(${PANEL_DB_HOST}:3306)/${PANEL_DB_NAME} # 修改此行,或注释掉以使用 SQLite 作为数据库
- TZ=${TZ}
# - SESSION_SECRET=${SESSION_SECRET}
# - REDIS_CONN_STRING=redis://redis
# - NODE_TYPE=slave # 多机部署时从节点取消注释该行
# - SYNC_FREQUENCY=60 # 需要定期从数据库加载数据时取消注释该行
# - FRONTEND_BASE_URL=https://openai.justsong.cn # 多机部署时从节点取消注释该行
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

BIN
new-api/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.6 KiB

131
one-hub/README.md Normal file
View File

@ -0,0 +1,131 @@
<p align="right">
<strong>中文</strong> | <a href="./README.en.md">English</a>
</p>
<p align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://github.com/MartialBE/one-hub/assets/42402987/c4125d1a-5577-446d-ba15-2a71c52140c1">
<img height="90" src="https://raw.githubusercontent.com/MartialBE/one-api/main/web/src/assets/images/logo.svg">
</picture>
</p>
<div align="center">
# One Hub
_本项目是基于[one-api](https://github.com/songquanpeng/one-api)二次开发而来的_
<p align="center">
<a href="https://raw.githubusercontent.com/MartialBE/one-api/main/LICENSE">
<img src="https://img.shields.io/github/license/MartialBE/one-api?color=brightgreen" alt="license">
</a>
<a href="https://github.com/MartialBE/one-hub/releases/latest">
<img src="https://img.shields.io/github/v/release/MartialBE/one-api?color=brightgreen&include_prereleases" alt="release">
</a>
<a href="https://github.com/users/MartialBE/packages/container/package/one-api">
<img src="https://img.shields.io/badge/docker-ghcr.io-blue" alt="docker">
</a>
<a href="https://hub.docker.com/r/martialbe/one-api">
<img src="https://img.shields.io/badge/docker-dockerHub-blue" alt="docker">
</a>
<a href="https://goreportcard.com/report/github.com/MartialBE/one-api">
<img src="https://goreportcard.com/badge/github.com/MartialBE/one-api" alt="GoReportCard">
</a>
</p>
**请不要和原版混用,因为新增功能,数据库与原版不兼容**
**为了更加简洁,本项目之后,除了新增供应商时会更新程序自带的模型列表,平常不再更新程序自带的模型列表。**
**如果发现缺少新模型,请在`后台-模型价格-更新价格`中更新新增的模型**
[演示网站](https://one-api-martialbe.vercel.app/)
</div>
> [!WARNING]
> 本项目为个人学习使用,不保证稳定性,且不提供任何技术支持,使用者必须在遵循 OpenAI 的使用条款以及法律法规的情况下使用,不得用于非法用途。
> 根据[《生成式人工智能服务管理暂行办法》](http://www.cac.gov.cn/2023-07/13/c_1690898327029107.htm)的要求,请勿对中国地区公众提供一切未经备案的生成式人工智能服务。
## 功能变化
- 全新的 UI 界面
- 新增用户仪表盘
- 新增管理员分析数据统计界面
- 重构了中转`供应商`模块
- 支持使用`Azure Speech`模拟`TTS`功能
- 渠道可配置单独的 http/socks5 代理
- 支持动态返回用户模型列表
- 支持自定义测速模型
- 日志增加请求耗时
- 支持和优化非 OpenAI 模型的函数调用(支持的模型可以在 lobe-chat 直接使用)
- 支持完成倍率自定义
- 支持完整的分页和排序
- 支持`Telegram bot`
- 支持模型按次收费
- 支持模型通配符
- 支持使用配置文件启动程序
- 支持模型价格更新
- 支持自动获取供应商模型
- 支持仅聊天,开启后如果有传入`function call`参数会跳过该渠道
- 支持支付
- 支持配置用户组 RPM
- 支持`Prometheus`监控
## 文档
请查看[文档](https://github.com/MartialBE/one-hub/wiki)
## 当前支持的供应商
| 供应商 | Chat | Embeddings | Audio | Images | 其他 |
| --------------------------------------------------------------------- | ------------------------ | ---------- | ------ | ----------- | ---------------------------------------------------------------- |
| [OpenAI](https://platform.openai.com/docs/api-reference/introduction) | ✅ | ✅ | ✅ | ✅ | - |
| [Azure OpenAI](https://oai.azure.com/) | ✅ | ✅ | ✅ | ✅ | - |
| [Azure Speech](https://portal.azure.com/) | - | - | ⚠️ tts | - | - |
| [Anthropic](https://www.anthropic.com/) | ✅ | - | - | - | - |
| [Gemini](https://aistudio.google.com/) | ✅ | - | - | - | - |
| [百度文心](https://console.bce.baidu.com/qianfan/overview) | ✅ | ✅ | - | - | - |
| [通义千问](https://dashscope.console.aliyun.com/overview) | ✅ | ✅ | - | - | - |
| [讯飞星火](https://console.xfyun.cn/) | ✅ | - | - | - | - |
| [智谱](https://open.bigmodel.cn/overview) | ✅ | ✅ | - | ⚠️ 图片生成 | - |
| [腾讯混元](https://cloud.tencent.com/product/hunyuan) | ✅ | - | - | - | - |
| [百川](https://platform.baichuan-ai.com/console/apikey) | ✅ | ✅ | - | - | - |
| [MiniMax](https://www.minimaxi.com/user-center/basic-information) | ✅ | ✅ | - | - | - |
| [Deepseek](https://platform.deepseek.com/usage) | ✅ | - | - | - | - |
| [Moonshot](https://moonshot.ai/) | ✅ | - | - | - | - |
| [Mistral](https://mistral.ai/) | ✅ | ✅ | - | - | - |
| [Groq](https://console.groq.com/keys) | ✅ | - | - | - | - |
| [Amazon Bedrock](https://console.aws.amazon.com/bedrock/home) | ⚠️ 仅支持 Anthropic 模型 | - | - | - | - |
| [零一万物](https://platform.lingyiwanwu.com/details) | ✅ | - | - | - | - |
| [Cloudflare AI](https://ai.cloudflare.com/) | ✅ | - | ⚠️ stt | ⚠️ 图片生成 | - |
| [Midjourney](https://www.midjourney.com/) | - | - | - | - | [midjourney-proxy](https://github.com/novicezk/midjourney-proxy) |
| [Cohere](https://cohere.com/) | ✅ | - | - | - | - |
| [Stability AI](https://platform.stability.ai/account/credits) | - | - | - | ⚠️ 图片生成 | - |
| [Coze](https://www.coze.com/open/docs/chat?_lang=zh) | ✅ | - | - | - | - |
| [Ollama](https://github.com/ollama/ollama) | ✅ | ✅ | - | - | - |
| [Suno](https://suno.com/) | - | - | - | - | [Suno-API](https://github.com/Suno-API/Suno-API) |
## 感谢
- 本程序使用了以下开源项目
- [one-api](https://github.com/songquanpeng/one-api)为本项目的基础
- [Berry Free React Admin Template](https://github.com/codedthemes/berry-free-react-admin-template)为本项目的前端界面
- [minimal-ui-kit](https://github.com/minimal-ui-kit/material-kit-react),使用了其中的部分样式
- [new api](https://github.com/Calcium-Ion/new-api)Midjourney/Suno 模块的代码来源于此
- [go-zero](https://github.com/zeromicro/go-zero) - Token 限流器的实现
感谢以上项目的作者和贡献者
## 交流群
<img src="https://github.com/MartialBE/one-hub/assets/42402987/9b608d39-70ae-4b2e-be49-09afab6bd536" width="300">
## 其他
<a href="https://next.ossinsight.io/widgets/official/analyze-repo-stars-history?repo_id=689214770" target="_blank" style="display: block" align="center">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://next.ossinsight.io/widgets/official/analyze-repo-stars-history/thumbnail.png?repo_id=689214770&image_size=auto&color_scheme=dark" width="721" height="auto">
<img alt="Star History of MartialBE/one-api" src="https://next.ossinsight.io/widgets/official/analyze-repo-stars-history/thumbnail.png?repo_id=689214770&image_size=auto&color_scheme=light" width="721" height="auto">
</picture>
</a>

19
one-hub/data.yml Normal file
View File

@ -0,0 +1,19 @@
name: one hub
tags:
- AI / 大模型
title: OpenAI 接口管理 & 分发系统
description: OpenAI 接口管理 & 分发系统
additionalProperties:
key: one-hub
name: one-hub
tags:
- AI
shortDescZh: AI模型接口管理与分发系统支持将多种大模型转为OpenAI格式调用、支持Midjourney Proxy、Suno、Rerank兼容易支付协议可供个人或者企业内部管理与分发渠道使用本项目基于One API二次开发。
shortDescEn: Access all LLM through the standard OpenAI API format, easy to deploy & use
type: tool
crossVersionUpdate: true
limit: 0
recommend: 0
website: https://one-hub.xiao5.info/
github: https://github.com/MartialBE/one-hub
document: https://github.com/MartialBE/one-hub/blob/main/README.md

56
one-hub/latest/data.yml Normal file
View File

@ -0,0 +1,56 @@
additionalProperties:
formFields:
- default: ""
envKey: PANEL_DB_HOST
key: mysql
labelEn: Database Service
labelZh: 数据库服务
required: true
type: service
- default: onehub
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: onehub
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: onehub
envKey: PANEL_DB_USER_PASSWORD
labelEn: Password
labelZh: 数据库用户密码
random: true
required: true
rule: paramComplexity
type: password
- default: 4000
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: Asia/Shanghai
edit: true
envKey: TZ
labelEn: Time Zone
labelZh: 时区
required: true
type: text
- default: onehub
envKey: USER_TOKEN_SECRET
labelEn: USER_TOKEN_SECRET
labelZh: SECRET随机字符串
random: true
required: true
rule: paramComplexity
type: password

View File

@ -0,0 +1,28 @@
services:
one-hub:
image: ghcr.io/martialbe/one-api:latest
container_name: ${CONTAINER_NAME}
restart: always
ports:
- ${PANEL_APP_PORT_HTTP}:3000
networks:
- 1panel-network
command: --log-dir /app/logs
volumes:
- ./data:/data
- ./logs:/app/logs
environment:
- SQL_DSN=${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@tcp(${PANEL_DB_HOST}:3306)/${PANEL_DB_NAME} # 修改此行,或注释掉以使用 SQLite 作为数据库
- TZ=${TZ}
- USER_TOKEN_SECRET=${USER_TOKEN_SECRET} # 必填,否则无法启动,修改为随机字符串,32位以上
# - REDIS_CONN_STRING=redis://redis
# - SESSION_SECRET=random_string # 推荐填写,否则每次重启后已登录用户的 cookie 将失效。
# - HASHIDS_SALT=random_string # 可空,建议设置,字符串元素不能重复
# - NODE_TYPE=slave # 多机部署时从节点取消注释该行
# - SYNC_FREQUENCY=60 # 需要定期从数据库加载数据时取消注释该行
# - FRONTEND_BASE_URL=https://openai.justsong.cn # 多机部署时从节点取消注释该行
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

BIN
one-hub/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB