Commit Graph

58 Commits

Author SHA1 Message Date
Butui Hu
6e710f3210 Fix temperature not being set to 0 due to json omitempty
The issue was caused by the `omitempty` tag in the Go struct, which prevented the `temperature` field from being included in the JSON output when it was set to 0.

Signed-off-by: Butui Hu <hot123tea123@gmail.com>
2025-01-21 12:54:09 +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
Yan
49a0db1da8 fix: add index in the tool calls when chat by stream (gemini) 2024-12-28 17:56:31 +08:00
CalciumIon
86b9dc6314 refactor: Update Message methods to use pointer receivers
- Refactored ParseToolCalls, SetToolCalls, IsStringContent, and ParseContent methods in the Message struct to use pointer receivers, improving efficiency and consistency in handling mutable state.
- Enhanced code readability and maintainability by ensuring all relevant methods operate on the pointer receiver, aligning with Go best practices.
2024-12-22 16:30:18 +08:00
CalciumIon
18ed379597 refactor: Update SetToolCalls method to use pointer receiver
- Changed the SetToolCalls method to use a pointer receiver for the Message struct, allowing for modifications to the original instance.
- This change improves the method's efficiency and aligns with Go best practices for mutating struct methods.
2024-12-22 16:22:55 +08:00
CalciumIon
464220cdf1 refactor: Update OpenAI request and message handling
- Changed the type of ToolCalls in the Message struct from `any` to `json.RawMessage` for better type safety and clarity.
- Introduced ParseToolCalls and SetToolCalls methods to handle ToolCalls more effectively, improving code readability and maintainability.
- Updated the ParseContent method to work with the new MediaContent type instead of MediaMessage, enhancing the structure of content parsing.
- Refactored Gemini relay functions to utilize the new ToolCalls handling methods, streamlining the integration with OpenAI and Gemini systems.
2024-12-22 16:20:30 +08:00
CalciumIon
23d1c84503 Merge branch 'feat/o1'
# Conflicts:
#	dto/openai_request.go
2024-12-21 16:45:45 +08:00
MartialBE
a8fa11f9d0 feat: support for Gemini structured output. 2024-12-21 16:01:17 +08:00
HynoR
11408d011d feat: 适配o1模型 2024-12-20 22:07:53 +08:00
CalciumIon
37d6925ef6 feat: 完善audio计费 2024-11-07 16:12:09 +08:00
1808837298@qq.com
1307a23f01 feat: realtime
(cherry picked from commit d4966246e68dbdcdab45ec5c5141362834d74425)
2024-11-05 19:27:47 +08:00
1808837298@qq.com
9e4133a890 feat: realtime
(cherry picked from commit a5529df3e1a4c08a120e8c05203a7d885b0fe8d8)
2024-11-05 19:24:14 +08:00
1808837298@qq.com
698b6ed7d7 Update dto
(cherry picked from commit 030187ff75c64c40017cda2fa98ef2b3c01f0bd5)
2024-11-05 19:23:56 +08:00
CalciumIon
c5633221f0 feat: support gpt-4o-audio-preview 2024-11-04 15:27:12 +08:00
1808837298@qq.com
31c47e19f1 feat: support embedding encoding_format param 2024-10-10 13:23:12 +08:00
1808837298@qq.com
07fa9205cb feat: playground 2024-09-26 00:59:09 +08:00
CalciumIon
e8452869df feat: support o1 channel test 2024-09-13 03:15:32 +08:00
CalciumIon
17c8ba787e feat: claude response return model name 2024-09-11 19:12:55 +08:00
CalciumIon
e12516e93d feat: support SiliconFlow (close #437, close #403) 2024-08-16 18:27:26 +08:00
CalciumIon
5c1a127b1c fix: response format 2024-08-07 15:43:01 +08:00
kakingone
442a2f0f4d addupload 2024-07-31 15:48:51 +08:00
CalciumIon
261ba5a813 feat: support ali image 2024-07-19 00:45:52 +08:00
CalciumIon
24151ab303 feat: support gemini tool calling (close #368) 2024-07-18 20:28:47 +08:00
CalciumIon
dc58ff0434 feat: support claude tool calling 2024-07-18 00:36:05 +08:00
Calcium-Ion
363ae95196 Merge pull request #367 from Calcium-Ion/audio
feat: support cloudflare tts
2024-07-17 17:34:59 +08:00
daggeryu
9d3381a5db fix: embedding model dimensions 2024-07-17 16:40:44 +08:00
CalciumIon
ee0e1c9736 refactor: audio relay 2024-07-16 22:07:10 +08:00
CalciumIon
917c16903c refactor: 重构流模式逻辑 2024-07-15 18:04:05 +08:00
CalciumIon
fe4665fd99 feat: support cloudflare worker ai 2024-07-13 19:55:22 +08:00
CalciumIon
876bed4600 feat: support claude stream_options 2024-07-08 01:45:43 +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
eca52104cc chore: 重构 2024-06-27 19:30:17 +08:00
Xiangyuan Liu
05a4646b44 feat: suno api 支持
feat: 调试 suno

feat: 补充suno 文档
2024-06-13 10:35:48 +08:00
CaIon
97acc9e5c4 feat: add pricing page 2024-05-13 23:02:35 +08:00
CaIon
8e3c527640 fix: 规范claude返回格式 2024-04-26 02:56:35 +08:00
CaIon
483e1c46d2 fix: 规范claude返回格式 2024-04-25 23:57:39 +08:00
CaIon
cae9dbe141 feat: support cohere (close #195) 2024-04-24 18:49:56 +08:00
CaIon
86ab64ec67 feat: 完善函数计费 2024-04-23 23:01:06 +08:00
CaIon
3839838937 feat: 启用函数计费 2024-04-22 16:35:56 +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
2b4119df8a fix: add missing id,object,created 2024-03-21 23:44:39 +08:00
CaIon
1004e3a1d5 fix: fix embedding 2024-03-21 17:39:05 +08:00
CaIon
a5088f5e23 fix: fix SensitiveWords error 2024-03-21 14:29:56 +08:00
CaIon
580f2894ac feat: 初步兼容生成内容检查 2024-03-20 19:00:51 +08:00
CaIon
afa1748591 feat: support InsightFace (close #60) 2024-03-14 18:09:57 +08:00
CaIon
8a632b7825 feat: 兼容自定义变焦,完善modal操作 2024-03-14 16:42:37 +08:00
CaIon
5659e5720f feat: 将操作拆分成单独的模型 2024-03-13 21:19:48 +08:00
CaIon
62bca310e3 feat: support shorten 2024-03-13 17:46:34 +08:00