1
0
mirror of https://github.com/pooneyy/1Panel-Appstore.git synced 2026-03-26 12:14:59 +08:00

add one-api latest version

This commit is contained in:
TGY 2025-03-05 13:26:50 +08:00
parent 2fd3631d89
commit aa85adbc81
7 changed files with 214 additions and 0 deletions

48
one-api/0.6.8/data.yml Normal file
View File

@ -0,0 +1,48 @@
additionalProperties:
formFields:
- default: ""
envKey: PANEL_DB_HOST
key: mysql
labelEn: Database Service
labelZh: 数据库服务
required: true
type: service
- default: oneapi
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: oneapi
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: oneapi
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,24 @@
services:
one-api:
image: justsong/one-api:v0.6.8
container_name: ${CONTAINER_NAME}
restart: always
ports:
- ${PANEL_APP_PORT_HTTP}:3000
networks:
- 1panel-network
volumes:
- ./data:/data
environment:
- SQL_DSN=${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@tcp(${PANEL_DB_HOST}:3306)/${PANEL_DB_NAME} # 修改此行,或注释掉以使用 SQLite 作为数据库
- TZ=${TZ}
# - REDIS_CONN_STRING=redis://redis
# - SESSION_SECRET=random_string # 修改为随机字符串
# - NODE_TYPE=slave # 多机部署时从节点取消注释该行
# - SYNC_FREQUENCY=60 # 需要定期从数据库加载数据时取消注释该行
# - FRONTEND_BASE_URL=https://openai.justsong.cn # 多机部署时从节点取消注释该行
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true

51
one-api/README.md Normal file
View File

@ -0,0 +1,51 @@
# 使用说明
- 默认账户密码
```
usernameroot
password123456
```
# One API
**One API** 是一个通过标准的 OpenAI API 格式访问所有的大模型,开箱即用。
## 主要功能:
- 支持多种大模型:
+ [x] [OpenAI ChatGPT 系列模型](https://platform.openai.com/docs/guides/gpt/chat-completions-api)(支持 [Azure OpenAI API](https://learn.microsoft.com/en-us/azure/ai-services/openai/reference)
+ [x] [Anthropic Claude 系列模型](https://anthropic.com)
+ [x] [Google PaLM2/Gemini 系列模型](https://developers.generativeai.google)
+ [x] [百度文心一言系列模型](https://cloud.baidu.com/doc/WENXINWORKSHOP/index.html)
+ [x] [阿里通义千问系列模型](https://help.aliyun.com/document_detail/2400395.html)
+ [x] [讯飞星火认知大模型](https://www.xfyun.cn/doc/spark/Web.html)
+ [x] [智谱 ChatGLM 系列模型](https://bigmodel.cn)
+ [x] [360 智脑](https://ai.360.cn)
+ [x] [腾讯混元大模型](https://cloud.tencent.com/document/product/1729)
- 支持配置镜像以及众多第三方代理服务。
- 支持通过**负载均衡**的方式访问多个渠道。
- 支持 **stream 模式**,可以通过流式传输实现打字机效果。
- 支持**多机部署**。
- 支持**令牌管理**,设置令牌的过期时间和额度。
- 支持**兑换码管理**,支持批量生成和导出兑换码,可使用兑换码为账户进行充值。
- 支持**通道管理**,批量创建通道。
- 支持**用户分组**以及**渠道分组**,支持为不同分组设置不同的倍率。
- 支持渠道**设置模型列表**。
- 支持**查看额度明细**。
- 支持**用户邀请奖励**。
- 支持以美元为单位显示额度。
- 支持发布公告,设置充值链接,设置新用户初始额度。
- 支持模型映射,重定向用户的请求模型,如无必要请不要设置,设置之后会导致请求体被重新构造而非直接透传,会导致部分还未正式支持的字段无法传递成功。
- 支持失败自动重试。
- 支持绘图接口。
- 支持 [Cloudflare AI Gateway](https://developers.cloudflare.com/ai-gateway/providers/openai/),渠道设置的代理部分填写 `https://gateway.ai.cloudflare.com/v1/ACCOUNT_TAG/GATEWAY/openai` 即可。
- 持丰富的**自定义**设置,
1. 支持自定义系统名称logo 以及页脚。
2. 支持自定义首页和关于页面,可以选择使用 HTML & Markdown 代码进行自定义,或者使用一个单独的网页通过 iframe 嵌入。
- 支持通过系统访问令牌访问管理 APIbearer token用以替代 cookie你可以自行抓包来查看 API 的用法)。
- 支持 Cloudflare Turnstile 用户校验。
- 支持用户管理,支持**多种用户登录注册方式**
+ 邮箱登录注册(支持注册邮箱白名单)以及通过邮箱进行密码重置。
+ [GitHub 开放授权](https://github.com/settings/applications/new)。
+ 微信公众号授权(需要额外部署 [WeChat Server](https://github.com/songquanpeng/wechat-server))。

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

@ -0,0 +1,19 @@
name: One API
tags:
- AI / 大模型
title: OpenAI 接口管理 & 分发系统
description: OpenAI 接口管理 & 分发系统
additionalProperties:
key: one-api
name: One API
tags:
- AI
shortDescZh: 通过标准的 OpenAI 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://openai.justsong.cn/
github: https://github.com/songquanpeng/one-api
document: https://github.com/songquanpeng/one-api

48
one-api/latest/data.yml Normal file
View File

@ -0,0 +1,48 @@
additionalProperties:
formFields:
- default: ""
envKey: PANEL_DB_HOST
key: mysql
labelEn: Database Service
labelZh: 数据库服务
required: true
type: service
- default: oneapi
envKey: PANEL_DB_NAME
labelEn: Database
labelZh: 数据库名
random: true
required: true
rule: paramCommon
type: text
- default: oneapi
envKey: PANEL_DB_USER
labelEn: User
labelZh: 数据库用户
random: true
required: true
rule: paramCommon
type: text
- default: oneapi
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,24 @@
services:
one-api:
image: justsong/one-api:latest
container_name: ${CONTAINER_NAME}
restart: always
ports:
- ${PANEL_APP_PORT_HTTP}:3000
networks:
- 1panel-network
volumes:
- ./data:/data
environment:
- SQL_DSN=${PANEL_DB_USER}:${PANEL_DB_USER_PASSWORD}@tcp(${PANEL_DB_HOST}:3306)/${PANEL_DB_NAME} # 修改此行,或注释掉以使用 SQLite 作为数据库
- TZ=${TZ}
# - REDIS_CONN_STRING=redis://redis
# - SESSION_SECRET=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-api/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.9 KiB