xiaoyukkkk commited on
Commit
84a9ac0
·
verified ·
1 Parent(s): 61f4fb4

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +134 -124
README.md CHANGED
@@ -1,125 +1,135 @@
1
- <p align="center">
2
- <img src="docs/logo.svg" width="120" alt="Gemini Business2API logo" />
3
- </p>
4
- <h1 align="center">Gemini Business2API</h1>
5
- <p align="center">赋予硅基生物以灵魂</p>
6
- <p align="center">当时明月在 · 曾照彩云归</p>
7
- <p align="center">
8
- <strong>简体中文</strong> | <a href="docs/README_EN.md">English</a>
9
- </p>
10
- <p align="center"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" /> <img src="https://img.shields.io/badge/Python-3.11+-3776AB?logo=python&logoColor=white" /> <img src="https://img.shields.io/badge/FastAPI-0.110-009688?logo=fastapi&logoColor=white" /> <img src="https://img.shields.io/badge/Vue-3-4FC08D?logo=vue.js&logoColor=white" /> <img src="https://img.shields.io/badge/Vite-7-646CFF?logo=vite&logoColor=white" /> <img src="https://img.shields.io/badge/Docker-ready-2496ED?logo=docker&logoColor=white" /></p>
11
-
12
- <p align="center">将 Gemini Business 转换为 OpenAI 兼容接口,支持多账号负载均衡、图像生成、多模态能力与内置管理面板。</p>
13
-
14
- ---
15
-
16
- ## 📜 开源协议与声
17
-
18
- **开源协议**: MIT License - 查看 [LICENSE](LICENSE) 文件了解详情
19
-
20
- **使用声明**:
21
- - ⚠️ **本项目仅限学习与研究用途,禁止用于商业用途**
22
- - 📝 **使用时请保留本声明原作者信息开源来源**
23
- - 🔗 **项目地址**: [github.com/Dreamy-rain/gemini-business2api](https://github.com/Dreamy-rain/gemini-business2api)
24
-
25
- ---
26
-
27
- ## ✨ 功能特性
28
-
29
- - ✅ OpenAI API 完全兼容 - 无缝对接现有工具
30
- - ✅ 多账号负载均衡 - 轮询与故障自动切换
31
- - 流式输出 - 实时响应
32
- - 多模态输入 - 100+ 文件类型(图片PDF、Office 文档、音频、视频、代码等)
33
- - 图片生成 & 图生图 - 模型可配置,Base64 或 URL 返回
34
- - ✅ 智能文件处理 - 自动识别文件类型,支持 URL 与 Base64
35
- - ✅ 日志与监控 - 实时状态与统计信息
36
- - ✅ 代理支持 - 通过 PROXY 配置
37
- - 内置管理面板 - 在线配置与账号管理
38
-
39
- ## 🤖 模型功能
40
-
41
- | 模型ID | 识图 | 香蕉绘图 | 原生联网 | 文件多模态 |
42
- | ------------------------ | ---- | -------- | -------- | ---------- |
43
- | `gemini-auto` | |选 | ✅ | ✅ |
44
- | `gemini-2.5-flash` | | 可选 | ✅ | ✅ |
45
- | `gemini-2.5-pro` | | 可选 | ✅ | ✅ |
46
- | `gemini-3-flash-preview` | | 可选 | ✅ | ✅ |
47
- | `gemini-3-pro-preview` | | 可选 | ✅ | ✅ |
48
-
49
- ## 🚀 快速开始
50
-
51
- ### 方式一:本地运行(推荐)
52
-
53
- ```bash
54
- pip install -r requirements.txt
55
- cp .env.example .env
56
- # 编辑 .env 设置 ADMIN_KEY
57
- python main.py
58
- ```
59
-
60
- ### 方式二:Docker
61
-
62
- ```bash
63
- docker build -t gemini-business2api .
64
- docker run -d -p 7860:7860 \
65
- -e ADMIN_KEY=your_admin_key \
66
- gemini-business2api
67
- ```
68
-
69
- ### 访问方式
70
-
71
- - 管理面板:`http://localhost:7860/`(使用 `ADMIN_KEY` 登录)
72
- - OpenAI 兼容接口:`http://localhost:7860/v1/chat/completions`
73
-
74
- ### 配置提示
75
-
76
- - 账号配置优先读取 `ACCOUNTS_CONFIG`,也可在管理面板中录入并保存至 `data/accounts.json`。
77
- - 如需鉴权,可设置 `API_KEY` 保护 `/v1/chat/completions`。
78
-
79
- ### 更多文档
80
-
81
- - 支持的文件类型:`docs/SUPPORTED_FILE_TYPES.md`
82
-
83
- ## 📸 功能展示
84
-
85
- ### 管理系统
86
-
87
- <table>
88
- <tr>
89
- <td><img src="docs/1.png" alt="管理系统 1" /></td>
90
- <td><img src="docs/2.png" alt="管理系统 2" /></td>
91
- </tr>
92
- <tr>
93
- <td><img src="docs/3.png" alt="管理系统 3" /></td>
94
- <td><img src="docs/4.png" alt="管理系统 4" /></td>
95
- </tr>
96
- <tr>
97
- <td><img src="docs/5.png" alt="管理系统 5" /></td>
98
- <td><img src="docs/6.png" alt="管理系统 6" /></td>
99
- </tr>
100
- </table>
101
-
102
- ### 图片效果
103
-
104
- <table>
105
- <tr>
106
- <td><img src="docs/img_1.png" alt="图片效果 1" /></td>
107
- <td><img src="docs/img_2.png" alt="图片效果 2" /></td>
108
- </tr>
109
- <tr>
110
- <td><img src="docs/img_3.png" alt="图片效果 3" /></td>
111
- <td><img src="docs/img_4.png" alt="图片效果 4" /></td>
112
- </tr>
113
- </table>
114
-
115
- ## 🙏 致谢
116
-
117
- * 源项目:[F佬 Linux.do 讨论](https://linux.do/t/topic/1225645)
118
- * 源项目:[heixxin/gemini](https://huggingface.co/spaces/heixxin/gemini/tree/main) | [Linux.do 讨论](https://linux.do/t/topic/1226413)
119
- * 绘图参考:[Gemini-Link-System](https://github.com/qxd-ljy/Gemini-Link-System) | [Linux.do 讨论](https://linux.do/t/topic/1234363)
120
-
121
- ## Star History
122
-
123
- [![Star History Chart](https://api.star-history.com/svg?repos=Dreamy-rain/gemini-business2api&type=date&legend=top-left)](https://www.star-history.com/#Dreamy-rain/gemini-business2api&type=date&legend=top-left)
124
-
 
 
 
 
 
 
 
 
 
 
125
  **如果这个项目对你有帮助,请给个 ⭐ Star!**
 
1
+ ---
2
+ title: Gemini Business2API
3
+ emoji: 💎
4
+ colorFrom: pink
5
+ colorTo: blue
6
+ sdk: docker
7
+ pinned: false
8
+ license: mit
9
+ ---
10
+
11
+ <p align="center">
12
+ <img src="docs/logo.svg" width="120" alt="Gemini Business2API logo" />
13
+ </p>
14
+ <h1 align="center">Gemini Business2API</h1>
15
+ <p align="center">赋予硅基生物以灵魂</p>
16
+ <p align="center">当时月在 · 曾照彩云归</p>
17
+ <p align="center">
18
+ <strong>简体中文</strong> | <a href="docs/README_EN.md">English</a>
19
+ </p>
20
+ <p align="center"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" /> <img src="https://img.shields.io/badge/Python-3.11+-3776AB?logo=python&logoColor=white" /> <img src="https://img.shields.io/badge/FastAPI-0.110-009688?logo=fastapi&logoColor=white" /> <img src="https://img.shields.io/badge/Vue-3-4FC08D?logo=vue.js&logoColor=white" /> <img src="https://img.shields.io/badge/Vite-7-646CFF?logo=vite&logoColor=white" /> <img src="https://img.shields.io/badge/Docker-ready-2496ED?logo=docker&logoColor=white" /></p>
21
+
22
+ <p align="center">将 Gemini Business 转换为 OpenAI 兼容接口,支持多账号负载均衡图像生成、多模态能力内置管理面板。</p>
23
+
24
+ ---
25
+
26
+ ## 📜 开源协议与声明
27
+
28
+ **开源协议**: MIT License - 查看 [LICENSE](LICENSE) 文件了解详情
29
+
30
+ **使用声明**:
31
+ - ⚠️ **本项目仅限学习与研究用途,禁止用于商业用途**
32
+ - 📝 **使用时请保留本声明原作者信息与开源来源**
33
+ - 🔗 **项目地址**: [github.com/Dreamy-rain/gemini-business2api](https://github.com/Dreamy-rain/gemini-business2api)
34
+
35
+ ---
36
+
37
+ ## 功能特性
38
+
39
+ - OpenAI API 完全兼容 - 无缝对接现有工具
40
+ - ✅ 多账号负载均衡 - 轮询与故障自动切换
41
+ - 流式输出 - 实时响应
42
+ - 多模态输入 - 100+ 文件类型(图片、PDF、Office 文档、音频、视频、代码等)
43
+ - ✅ 图片生成 & 图生图 - 模型配置,Base64 URL 返回
44
+ - ✅ 智能文件处理 - 自动识别文件类型,支持 URL 与 Base64
45
+ - ✅ 日志与监控 - 实时状态与统计信息
46
+ - ✅ 代理支持 - 通过 PROXY 配置
47
+ - ✅ 内置管理面板 - 在线配置与账号管理
48
+
49
+ ## 🤖 模型功能
50
+
51
+ | 模型ID | 识图 | 香蕉绘图 | 原生联网 | 文件多模态 |
52
+ | ------------------------ | ---- | -------- | -------- | ---------- |
53
+ | `gemini-auto` | ✅ | 可选 | ✅ | ✅ |
54
+ | `gemini-2.5-flash` | ✅ | 可选 | ✅ | ✅ |
55
+ | `gemini-2.5-pro` | ✅ | 可选 | ✅ | ✅ |
56
+ | `gemini-3-flash-preview` | ✅ | 可选 | ✅ | ✅ |
57
+ | `gemini-3-pro-preview` | ✅ | 可选 | ✅ | ✅ |
58
+
59
+ ## 🚀 快速开始
60
+
61
+ ### 方式一:本地运行(推荐)
62
+
63
+ ```bash
64
+ pip install -r requirements.txt
65
+ cp .env.example .env
66
+ # 编辑 .env 设置 ADMIN_KEY
67
+ python main.py
68
+ ```
69
+
70
+ ### 方式二:Docker
71
+
72
+ ```bash
73
+ docker build -t gemini-business2api .
74
+ docker run -d -p 7860:7860 \
75
+ -e ADMIN_KEY=your_admin_key \
76
+ gemini-business2api
77
+ ```
78
+
79
+ ### 访问方式
80
+
81
+ - 管理面板:`http://localhost:7860/`(使用 `ADMIN_KEY` 登录)
82
+ - OpenAI 兼容接口:`http://localhost:7860/v1/chat/completions`
83
+
84
+ ### 配置提示
85
+
86
+ - 账号配置优先读取 `ACCOUNTS_CONFIG`,也可在管理面板中录入并保存至 `data/accounts.json`。
87
+ - 如需鉴权,可设置 `API_KEY` 保护 `/v1/chat/completions`。
88
+
89
+ ### 更多文档
90
+
91
+ - 支持的文件类型:`docs/SUPPORTED_FILE_TYPES.md`
92
+
93
+ ## 📸 功能展示
94
+
95
+ ### 管理系统
96
+
97
+ <table>
98
+ <tr>
99
+ <td><img src="docs/1.png" alt="管理系统 1" /></td>
100
+ <td><img src="docs/2.png" alt="管理系统 2" /></td>
101
+ </tr>
102
+ <tr>
103
+ <td><img src="docs/3.png" alt="管理系统 3" /></td>
104
+ <td><img src="docs/4.png" alt="管理系统 4" /></td>
105
+ </tr>
106
+ <tr>
107
+ <td><img src="docs/5.png" alt="管理系统 5" /></td>
108
+ <td><img src="docs/6.png" alt="管理系统 6" /></td>
109
+ </tr>
110
+ </table>
111
+
112
+ ### 图片效果
113
+
114
+ <table>
115
+ <tr>
116
+ <td><img src="docs/img_1.png" alt="图片效果 1" /></td>
117
+ <td><img src="docs/img_2.png" alt="图片效果 2" /></td>
118
+ </tr>
119
+ <tr>
120
+ <td><img src="docs/img_3.png" alt="图片效果 3" /></td>
121
+ <td><img src="docs/img_4.png" alt="图片效果 4" /></td>
122
+ </tr>
123
+ </table>
124
+
125
+ ## 🙏 致谢
126
+
127
+ * 源项目:[F佬 Linux.do 讨论](https://linux.do/t/topic/1225645)
128
+ * 源项目:[heixxin/gemini](https://huggingface.co/spaces/heixxin/gemini/tree/main) | [Linux.do 讨论](https://linux.do/t/topic/1226413)
129
+ * 绘图参考:[Gemini-Link-System](https://github.com/qxd-ljy/Gemini-Link-System) | [Linux.do 讨论](https://linux.do/t/topic/1234363)
130
+
131
+ ## ⭐ Star History
132
+
133
+ [![Star History Chart](https://api.star-history.com/svg?repos=Dreamy-rain/gemini-business2api&type=date&legend=top-left)](https://www.star-history.com/#Dreamy-rain/gemini-business2api&type=date&legend=top-left)
134
+
135
  **如果这个项目对你有帮助,请给个 ⭐ Star!**