snaily
530c958afc
chore: 更新版本号至2.2.0
v2.2.0
2025-07-20 01:47:35 +08:00
snaily
57d861b578
feat: 增加URL上下文理解功能
...
本次提交引入了一项新功能,允许模型在对话中理解所提供URL的上下文。
主要变更:
- **配置**:新增了 `URL_CONTEXT_ENABLED` 和 `URL_CONTEXT_MODELS` 两个配置项,用于控制此功能的开关和支持的模型列表。
- **后端服务**:在 `gemini_chat_service`、`openai_chat_service` 和 `vertex_express_chat_service` 中,为支持的模型动态添加 `urlContext` 工具。
- **前端界面**:在配置编辑器页面增加了相应的UI控件,方便用户启用/禁用该功能并管理支持的模型列表。
- **文档**:更新了 `.env.example`、`README.md` 和 `README_ZH.md`,包含了新配置项的说明。
2025-07-20 01:46:18 +08:00
snaily
99664298b9
fix: 更新思考配置,针对gemini-2.5-pro模型设置思考预算为128
2025-07-19 22:20:55 +08:00
snaily
a6fe5a7022
fix: 更新思考模型预算说明,使用-1表示自动预算
2025-07-19 22:11:36 +08:00
snaily
1918dad602
chore: 更新版本号至2.1.13
v2.1.13
2025-07-19 15:24:36 +08:00
snaily
69399c291e
fix: 在密钥验证成功时重置失败计数
2025-07-19 10:49:09 +08:00
snaily
9ec33ce320
fix: 为API_KEYS和ALLOWED_TOKENS添加默认值
2025-07-19 09:31:59 +08:00
snaily
c35d3aff7d
chore: 更新版本号至2.1.12
v2.1.12
2025-07-19 01:39:32 +08:00
snaily
2a5744d1c4
fix: 移除请求payload构建中的by_alias参数
2025-07-19 01:38:48 +08:00
snaily
825511506b
chore: 更新版本号至2.1.11
v2.1.11
2025-07-19 00:41:08 +08:00
snaily
5a98a701cb
fix: 修复生成配置字段名称以符合API要求
2025-07-19 00:40:44 +08:00
snaily
dd1fa35c73
chore: 更新版本号至2.1.10
v2.1.10
2025-07-18 22:34:46 +08:00
snaily
fb572fa849
chore: 移除不必要的json导入
2025-07-18 22:33:46 +08:00
snaily
c0a473ed19
Merge branch 'pr/hewenyu/220'
2025-07-18 16:47:22 +08:00
snaily
030641adc6
chore: 移除不必要的环境变量配置
2025-07-18 16:39:23 +08:00
hewenyu
445ef49dc8
fix # 219
...
修复token的问题
2025-07-18 10:50:52 +08:00
snaily
32d4c60541
fix: 修正Callirhoe拼写错误为Callirrhoe
...
refactor: 优化常量格式,提升可读性
2025-07-17 22:07:18 +08:00
snaily
23f865be07
Merge branch 'pr/cxyfer/200'
2025-07-17 21:30:35 +08:00
cxyfer
5d55325c12
refactor: Centralize API base URL and clean up
...
Replaces hardcoded Google API base URLs with `settings.BASE_URL` for improved configurability and maintainability across services.
Removes unused imports and variables from various modules to reduce code bloat and enhance readability.
2025-07-16 04:50:55 +08:00
zzh2632185
900330509a
Delete .augment-guidelines
2025-07-16 01:26:38 +09:00
zzh
cfb682ae3c
修复parts的错误
2025-07-16 01:25:51 +09:00
zzh
abae90b16d
删除冗余代码
2025-07-16 00:13:30 +09:00
zzh
470fc37f26
普通文本生成 案例模型修改。
2025-07-15 18:47:50 +09:00
zzh
7a7caef1a6
修改README.md对openai兼容tts的案例支持
2025-07-15 18:39:24 +09:00
zzh
a6aecb5d89
添加对gemini原生格式TTS的支持
2025-07-15 18:04:16 +09:00
zzh
4a004f9aa1
删掉多余提交的内容。
2025-07-15 16:00:56 +09:00
zzh
1a6feae23b
Update multi-speaker TTS README
...
- Reflect current smart detection implementation
- Remove outdated ENABLE_TTS environment variable references
- Add TTS systems comparison table
- Update usage examples with correct URLs
- Add intelligent routing flowchart
- Clarify zero-configuration approach
- Update feature list to match current implementation
2025-07-15 15:55:47 +09:00
zzh
af5b2fa2c9
Clean up TTS module dependencies
...
- Remove references to deleted tts_config.py
- Simplify tts_routes.py to directly return TTSGeminiChatService
- Update __init__.py imports
- Prepare for multi-speaker TTS testing
2025-07-15 15:44:55 +09:00
zzh
eeec45274b
Implement smart multi-speaker TTS detection
...
- Only activate multi-speaker TTS when multiSpeakerVoiceConfig is present
- Preserve original TTS functionality for single-speaker requests
- Support dynamic model selection from user request
- Add fallback mechanism to standard service if multi-speaker TTS fails
- Maintain full backward compatibility with existing TTS systems
2025-07-15 15:43:12 +09:00
zzh
2b48c853fe
Refactor: Use TTS service only for TTS models, keep original service for others
...
- Remove ENABLE_TTS environment variable dependency
- Detect TTS models dynamically by model name
- Use TTS-enhanced service only when needed
- Fallback to standard service if TTS processing fails
- Maintain full backward compatibility
2025-07-15 15:34:55 +09:00
zzh
c47f696691
Merge branch 'main' of https://github.com/zzh2632185/gemini-balance
2025-07-15 15:05:54 +09:00
zzh
9a8e4c8e15
Fix TTS payload - remove tools and safetySettings for TTS requests
2025-07-15 15:05:40 +09:00
zzh2632185
24aab9a658
Delete .augment-guidelines
2025-07-15 15:05:39 +09:00
zzh
afdaaffac5
Trigger Docker build - Add TTS functionality description
2025-07-15 14:46:15 +09:00
zzh
fe721116e2
添加对gemini多人语音功能的支持
2025-07-15 14:39:33 +09:00
cxyfer
8e0a834daa
fix: Fix datetime.timezone AttributeError in file cleanup
...
- Change datetime.timezone.utc to timezone.utc in services.py
- Resolves error: 'type object datetime.datetime has no attribute timezone'
2025-07-12 08:48:46 +08:00
cxyfer
c9fca1561c
Merge remote-tracking branch 'origin/main' into feature/upload-compatibility
2025-07-12 03:36:46 +08:00
cxyfer
5eb2dfd822
feat: Add Files API support with upload, list, get and delete operations
...
- Implement complete Files API compatible with Gemini API format
- Support resumable file uploads with chunked transfer (tested with 15MB video)
- Create file management service with database tracking
- Add file domain models and API request/response objects
- Implement file routes with proper authentication
- Use fixed API key for Files API requests (due to Google API restrictions)
- Support file state management (PROCESSING, ACTIVE, FAILED)
- Add scheduled task for automatic expired file cleanup
- Integrate seamlessly with existing key management and load balancing
2025-07-12 03:33:39 +08:00
snaily
0b837c3f80
chore: 更新版本号至 2.1.9
v2.1.9
2025-07-10 21:33:54 +08:00
snaily
a6cfc12443
feat: 更新响应处理逻辑以支持推理内容
...
- 修改了 response_handler.py 中的 _handle_openai_stream_response 和 _handle_openai_normal_response 方法,增加了对推理内容 (reasoning_content) 的支持。
- 更新了 _extract_result 方法的返回值,确保能够提取推理内容。
- 在 gemini_chat_service.py 和 openai_chat_service.py 中,调整了生成配置以包含思考过程的选项。
- 在 vertex_express_chat_service.py 中,增强了对客户端思考配置的处理逻辑,确保优先使用客户端提供的配置。
2025-07-10 21:21:55 +08:00
snaily
f6d64dd850
feat: 添加 TTS 语音名称常量并更新 TTS 服务逻辑
...
- 在 constants.py 中新增 TTS_VOICE_NAMES 列表,包含多个语音名称。
- 更新 tts_service.py 中的语音配置逻辑,确保使用请求中的语音名称(如果有效),否则回退到默认配置。
2025-07-10 01:03:20 +08:00
snaily
eed62caa78
refactor: 移除 ApiClient 中的 count_tokens 抽象方法
...
- 从 ApiClient 类中删除了 count_tokens 方法的抽象定义,以简化接口。
2025-07-10 00:53:06 +08:00
ripper
204d41d6f3
feat: add JSON Schema cleaning function to remove unsupported fields in Gemini API
2025-07-09 10:29:42 +08:00
ripper
858df0548e
fix: ensure generationConfig is not None in payload
2025-07-09 10:17:32 +08:00
snaily
b3da021803
refactor: 优化配置解析逻辑,增强对泛型类型的支持
...
- 在 config.py 中引入 get_args 和 get_origin 函数,以更好地处理 List 和 Dict 类型的解析。
- 更新了对 List[str] 和 List[Dict[str, str]] 的解析逻辑,增加了错误处理和日志记录。
- 在 keys_status.js 中将 filterValidKeys 函数替换为 filterAndSearchValidKeys,保留旧函数以避免破坏潜在的遗留调用。
- 在 keys_status.html 中新增选项以支持更多项目选择。
2025-07-08 16:35:56 +08:00
snaily
d234f826f4
chore: 更新 Vertex API 相关注释和正则表达式为 Vertex Express API,确保一致性和准确性。修改了多个文件中的相关描述和提示信息,以反映 API 名称的变化。
2025-07-08 15:27:16 +08:00
snaily
231b69ecf8
feat: 添加自定义 Headers 功能
...
- 在配置中添加 `CUSTOM_HEADERS` 选项,允许用户定义全局请求头。
- 更新 API 客户端,将自定义 `header` 应用于所有出站请求。
- 在配置页面上为 `CUSTOM_HEADERS` 添加了完整的前端编辑功能。
2025-07-08 13:58:05 +08:00
snaily
0a08913677
Merge pull request #183 from liucong2013/feature/count-tokens-compatibility
2025-07-07 17:24:45 +08:00
snaily
49d32813ea
chore: 更新 GitHub Actions 工作流以生成发布说明
...
- 修改了版本标签的引号格式
- 添加了生成发布说明的步骤
- 更新了创建发布的步骤以包含发布说明
- 调整了步骤的顺序和注释
2025-07-07 14:45:07 +08:00
snaily
c5d57e97b1
chore: 更新版本号至2.1.8
v2.1.8
2025-07-07 14:21:41 +08:00