Commit Graph

60 Commits

Author SHA1 Message Date
1808837298@qq.com
80f60109cf feat: add Azure default API version configuration
- Introduce `AZURE_DEFAULT_API_VERSION` environment variable
- Set default Azure API version to `2024-12-01-preview`
- Update README documentation for new environment configuration
- Modify Azure channel relay to use default API version when not specified
2025-02-03 22:38:23 +08:00
1808837298@qq.com
c2702a7125 feat: enhance model name handling and logging
- Add `RecodeModelName` to `RelayInfo` struct for more flexible model name tracking
- Update text relay and quota consumption to use `RecodeModelName`
- Move reasoning effort from admin info to other info in log generation
- Ensure consistent model name handling across relay components
2025-02-03 15:06:46 +08:00
1808837298@qq.com
1798595afc refactor: realtime quota 2025-01-04 15:46:35 +08:00
1808837298@qq.com
16afc5b3d6 fix: retry prompt tokens 2025-01-02 16:33:00 +08:00
CalciumIon
aefd53b683 refactor: token cache logic 2024-12-30 17:10:48 +08:00
CalciumIon
966cdc1f7f refactor: user cache logic 2024-12-29 16:50:26 +08:00
CalciumIon
e326679b72 feat: add multi-file type support for Gemini and Claude
- Add file data DTO for structured file handling
- Implement file decoder service
- Update Claude and Gemini relay channels to handle various file types
- Reorganize worker service to cf_worker for clarity
- Update token counter and image service for new file types
2024-12-29 00:00:24 +08:00
xqx333
541e07e6e7 Update relay-text.go
在上下文中存入promptTokens,避免重试过程重复计算
2024-12-26 02:00:04 +08:00
CalciumIon
0d1ba65592 refactor: migrate group ratio and user usable groups logic to new setting package
- Replaced references to common.GroupRatio and common.UserUsableGroups with corresponding functions from the new setting package across multiple controllers and services.
- Introduced new setting functions for managing group ratios and user usable groups, enhancing code organization and maintainability.
- Updated related functions to ensure consistent behavior with the new setting package integration.
2024-12-25 19:31:12 +08:00
CalciumIon
7e8adb5b34 feat: Enhance logging functionality with group support
- Added a new 'group' parameter to various logging functions, including RecordConsumeLog, GetAllLogs, and GetUserLogs, to allow for more granular log tracking.
- Updated the logs table component to display group information, improving the visibility of log data.
- Refactored related functions to accommodate the new group parameter, ensuring consistent handling across the application.
- Improved the initialization of the group column for PostgreSQL compatibility.
2024-12-24 14:48:11 +08:00
CalciumIon
69c590d439 feat: Introduce settings package and refactor constants
- Added a new `setting` package to replace the `constant` package for configuration management, improving code organization and clarity.
- Moved various configuration variables such as `ServerAddress`, `PayAddress`, and `SensitiveWords` to the new `setting` package.
- Updated references throughout the codebase to use the new `setting` package, ensuring consistent access to configuration values.
- Introduced new files for managing chat settings and midjourney settings, enhancing modularity and maintainability of the code.
2024-12-22 17:24:29 +08:00
CalciumIon
7ae97088c3 chore: Update dependencies and refactor JSON handling #614
- Removed the `bytedance/sonic` dependency and replaced its usage with the standard `encoding/json` package for JSON marshalling in `relay-text.go`.
- Updated `go.mod` to reflect the removal of `sonic` and adjusted the version of `sonic/loader`.
- Cleaned up `go.sum` to ensure consistency with the updated dependencies.
2024-12-12 14:14:24 +08:00
CalciumIon
a22a0e8285 refactor: improve validation logic and error handling in relay-text.go
- Simplified validation checks for MaxTokens and Messages fields.
- Enhanced error messages for better clarity.
- Updated goroutine to avoid passing context unnecessarily.
2024-12-01 08:24:41 +08:00
CalciumIon
710c88cb26 feat: 暂时禁用透传功能 2024-11-19 15:04:19 +08:00
CalciumIon
37d6925ef6 feat: 完善audio计费 2024-11-07 16:12:09 +08:00
Xyfacai
14f4320923 fix: 部分情况缺少返回预扣
(cherry picked from commit 96373455521a38095706bd81c57f9a18557d9c2e)
2024-11-05 19:28:08 +08:00
1808837298@qq.com
9e4133a890 feat: realtime
(cherry picked from commit a5529df3e1a4c08a120e8c05203a7d885b0fe8d8)
2024-11-05 19:24:14 +08:00
1808837298@qq.com
105289887c feat: 上游渠道为OpenAI渠道类型时,透传请求 (close #532) 2024-10-15 18:37:44 +08:00
1808837298@qq.com
07fa9205cb feat: playground 2024-09-26 00:59:09 +08:00
CalciumIon
7197ea0d29 feat: support jina embedding 2024-09-02 01:11:19 +08:00
CalciumIon
e12516e93d feat: support SiliconFlow (close #437, close #403) 2024-08-16 18:27:26 +08:00
CalciumIon
37cc9c2448 feat: support gpt-4o-gizmo-* (close #436) 2024-08-16 17:25:03 +08:00
CalciumIon
a7c14a26cc feat: 区分额度不足和预扣费失败提示 2024-08-09 18:48:13 +08:00
CalciumIon
d583529421 feat: 区分额度不足和预扣费失败提示 2024-08-09 18:34:51 +08:00
CalciumIon
37e4dcacdc fix: 重试后request id不一致 2024-08-03 17:46:13 +08:00
CalciumIon
9f149bcae1 feat: 日志新增rpm和tpm数据。(close #384) 2024-08-01 16:13:08 +08:00
CalciumIon
5d4c562825 feat: update stream_options 2024-07-19 14:06:10 +08:00
CalciumIon
dd91799ca9 chore: log format 2024-07-18 00:41:31 +08:00
CalciumIon
d7b34f0816 refactor: image relay 2024-07-17 23:50:37 +08:00
CalciumIon
acfff805ef fix: fix bug 2024-07-16 23:40:52 +08:00
CalciumIon
ee0e1c9736 refactor: audio relay 2024-07-16 22:07:10 +08:00
CalciumIon
7b20b4ed3d fix: azure stream options 2024-07-15 16:05:30 +08:00
CalciumIon
f2a251025d feat: 完善stream_options 2024-07-08 02:00:39 +08:00
CalciumIon
22bc0bf773 feat: support stream_options 2024-07-08 01:27:57 +08:00
CalciumIon
c7ba4a245b feat: support cohere rerank 2024-07-06 17:09:22 +08:00
CalciumIon
6e92f1f2d1 feat: 记录流模式首字时间 (close #323) 2024-06-26 18:04:49 +08:00
1808837298@qq.com
313c16f360 refactor: 重构敏感词 2024-05-23 23:59:55 +08:00
CaIon
a127461b7f feat: 日志显示重试信息 2024-05-16 16:41:08 +08:00
CaIon
0fe4c98b3f feat: dalle系列改为使用模型固定价格计费 2024-05-13 16:04:02 +08:00
CaIon
7ef1636321 feat: 完善日志详情 2024-05-13 15:08:01 +08:00
CaIon
391f0404a5 feat: 日志详情展示模型价格 2024-05-12 15:35:57 +08:00
1808837298@qq.com
4a2e969579 feat: log completionRatio 2024-05-03 12:26:17 +08:00
CaIon
86ab64ec67 feat: 完善函数计费 2024-04-23 23:01:06 +08:00
CaIon
3721ed796c feat: support aws claude 2024-04-23 11:44:40 +08:00
CaIon
90620827f4 feat: 状态码复写 2024-04-20 21:05:23 +08:00
CaIon
46bbd5a2d0 chore: 优化按次计费的数据库查询次数 2024-04-04 20:10:30 +08:00
CaIon
fb992eeeac feat: 本地重试 2024-04-04 16:35:44 +08:00
CaIon
54c18dc89e fix: remove sensitive check on completion (close #157) 2024-03-29 22:20:14 +08:00
CaIon
2269d1f08e fix: try to fix 307 2024-03-25 22:51:31 +08:00
CaIon
5aad98d736 feat: 统一错误提示 2024-03-20 20:36:55 +08:00