Qiying Wang
f636c50c84
fix: duplicate [DONE] ( #1629 )
2024-07-09 22:43:59 +08:00
Qiying Wang
720fe2dfeb
feat: refactor AwsClaude to Aws to support both llama3 and claude ( #1601 )
...
* feat: refactor AwsClaude to Aws to support both llama3 and claude
* fix: aws llama3 ratio
2024-07-06 13:19:41 +08:00
Jason
e090e76c86
feat: add Novita AI as model provider ( #1609 )
2024-07-06 13:16:46 +08:00
zijiren
efd30a40b3
feat: cloudflare support native openai api ( #1596 )
2024-07-06 13:12:30 +08:00
Mikey
0fc07ea558
feat: add support for Claude 3 tool use (function calling) ( #1587 )
...
* feat: add tool support for AWS & Claude
* fix: add {} for openai compatibility in streaming tool_use
2024-07-02 00:12:01 +08:00
igophper
fecaece71b
fix: fix size not support during image generation ( #1564 )
...
Fixes #1224 , #1068
2024-06-30 19:52:33 +08:00
Shi Jilin
c135d74f13
feat: support Spark4.0 Ultra ( #1575 )
...
* fix: fix SparkDesk Function Call (修复 Spark Pro/Max函数调用只会返回普通对话回答而不是Function Call回答的问题
* feat: support Spark4.0 Ultra
2024-06-30 19:38:02 +08:00
lihangfu
d0369b114f
feat: support spark4.0 ultra ( #1569 )
...
* feat: 支持v3最新协议的腾讯混元(#1452)
* feat: 支持Spark4.0 Ultra
---------
Co-authored-by: lihangfu <hfli8@iflytek.com>
2024-06-30 19:37:07 +08:00
zijiren
b21b3b5b46
refactor: abusing goroutines and channel ( #1561 )
...
* refactor: abusing goroutines
* fix: trim data prefix
* refactor: move functions to render package
* refactor: add back trim & flush
---------
Co-authored-by: JustSong <quanpengsong@gmail.com>
2024-06-30 18:36:33 +08:00
shaoyun
ae1cd29f94
feat: added support for Claude Sonnet 3.5 ( #1567 )
2024-06-30 16:25:25 +08:00
Ghostz
5a58426859
fix minimax empty log ( #1560 )
2024-06-30 16:09:16 +08:00
JustSong
3777517f64
chore: add ut
2024-06-23 14:28:55 +08:00
Shi Jilin
ff196b75a7
fix: fix sparkdesk function call
2024-06-20 22:56:59 +08:00
lihangfu
279caf82dc
feat: support tencent v3 api ( #1542 )
...
Co-authored-by: lihangfu <hfli8@iflytek.com>
2024-06-20 00:23:08 +08:00
Wei Tingjiang
b1520b308b
Try to fix Gemini streaming return being truncated by FinishReason. ( #1477 )
...
1
2024-06-14 00:30:47 +08:00
Zhong Liu
c1971870fa
fix: support for Spark Lite model ( #1526 )
...
* fix: Support for Spark Lite model
* fix: fix panic
* fix: fix xunfei version config
---------
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-06-13 00:07:26 +08:00
wagxuebing
f83894c83f
fix: xunfei interface call 4001 error ( #1499 )
...
Co-authored-by: lynnssb <lynntobing@gmail.com>
2024-06-12 23:12:58 +08:00
fxsome
e9981fff36
feat: post all messages for cloudflare ( #1515 )
2024-06-08 13:34:23 +08:00
取梦为饮
98669d5d48
feat: add support for bytedance's doubao ( #1438 )
...
* 增加豆包大模型支持
* chore: update channel options & add prompt
---------
Co-authored-by: 康龙彪 <longbiao.kang@i-tudou.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-06-08 13:26:26 +08:00
Wei Tingjiang
9321427c6e
feat: support gemini embeddings (text-embedding-004,embedding-001) ( #1475 )
...
* Refactor Gemini Adaptor to Support Embeddings
* Add new models to ModelList
2024-05-29 01:17:32 +08:00
JustSong
ceea4c6d4a
feat: support user content download proxy & relay proxy now
2024-05-29 01:14:00 +08:00
Mo
332c8db0b3
fix: add prefixes to image models to solve the problem of duplicate models ( #1469 )
...
* Add prefixes to image models to solve the problem of duplicate models
* Fix the issue that response_format is not set, causing the b64_json parameter to be ignored.
2024-05-28 01:32:57 +08:00
Dafei Zhao
a9211d66f6
fix: fix gpt-4o token encoding ( #1446 )
2024-05-28 01:26:07 +08:00
Qiying Wang
2457d00afb
feat: support gpt-4o ( #1431 )
2024-05-21 01:14:22 +08:00
JustSong
91b80ae879
fix: remove extra space
2024-05-07 23:57:34 +08:00
JustSong
2720e1a358
feat: support minimax's 6.5 models ( close #1395 )
2024-04-30 02:23:14 +08:00
JustSong
71f4403fd5
feat: add together.ai support ( #1298 )
2024-04-30 02:16:53 +08:00
JustSong
1f76c80553
fix: fix aws claude panic ( #1384 )
2024-04-29 22:49:06 +08:00
JustSong
7e027d2bd0
fix: fix minimax prompt & completion tokens is empty ( #1391 )
2024-04-29 22:35:47 +08:00
JustSong
30f373b623
fix: fix usage is empty ( close #1391 )
2024-04-29 22:29:13 +08:00
plusye
1c2654320e
fix: fix getPreConsumedQuota ( #1312 )
2024-04-27 16:07:06 +08:00
caixinjiang
6cffb116b7
fix: fix zhipu embedding error when input is array but not string ( #1306 )
...
* fix zhipu embedding error when input is array but not string
* fix: only use the first one
---------
Co-authored-by: 蔡新疆 <cxj@icc.link>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-27 16:05:14 +08:00
Qiying Wang
a84c7b38b7
fix: claude stream response parse ( #1334 )
2024-04-27 15:58:07 +08:00
NongMO
6170b91d1c
feat: support for the ollama vision model ( #1376 )
...
* feat: support for the ollama vision model
`llava` model, pass test
* Update main.go
format code
* chore: remove useless log
---------
Co-authored-by: nongqiqin <nongqiqin@tipdm.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-27 15:47:27 +08:00
JustSong
04b49aa0ec
chore: use StringContent() to convert response to text
2024-04-27 15:41:02 +08:00
Wei Tingjiang
ef88497f25
fix: refactor Gemini adaptor to support streaming content generation ( #1382 )
2024-04-27 15:39:59 +08:00
JustSong
007906216d
feat: support DeepL's model ( close #1126 )
2024-04-27 13:37:22 +08:00
JustSong
e64e7707a0
feat: support cohere's web search
2024-04-27 00:06:43 +08:00
JustSong
ea210b6ed7
chore: update ollama models
2024-04-26 23:12:39 +08:00
JustSong
9026ec7510
feat: support cloudflare now
2024-04-26 23:05:48 +08:00
JustSong
c317872097
feat: support deepseek now
2024-04-26 00:48:53 +08:00
JustSong
da0842272c
fix: add model to response ( close #1362 )
2024-04-24 22:19:58 +08:00
Ghostz
24f026d18e
feat: add cohere support ( #1355 )
...
* support cohere
* chore: tiny improvements
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-24 21:50:01 +08:00
Wei Tingjiang
779b747e9e
feat: add function and tools support for Gemini ( #1358 )
...
* Update model.go
* Support Gemini tool_calls.
* Fix gemini tool calls (also keep support functions).
* Fixed the problem of arguments not being stringified.
Fix panic: candidate.Content.Parts out of range
2024-04-24 21:26:45 +08:00
JustSong
3d149fedf4
chore: do not hardcode context key
2024-04-21 19:43:23 +08:00
JustSong
e30ebda0fe
chore: move config key to package ctxkey
2024-04-21 18:55:13 +08:00
JustSong
e5b3e37c46
feat: support bot prefix for coze
2024-04-21 18:04:56 +08:00
JustSong
8de489cf06
feat: support coze now
2024-04-21 17:59:57 +08:00
JustSong
541182102e
fix: ignore empty choice response for azure ( close #1324 )
2024-04-21 16:22:28 +08:00
JustSong
b2679cca65
fix: fix preview completion ratio ( close #1326 )
2024-04-21 15:57:01 +08:00
tylinux
a2a00dfbc3
feat: groq support Llama3 now ( #1333 )
...
* feat: groq support Llama3 now
* fix: update model ratio
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-21 14:53:03 +08:00
JustSong
2369025842
fix: use prefix to match more json response
2024-04-20 01:15:33 +08:00
Laisky.Cai
fc9a784950
feat: support aws bedrockruntime claude3 ( #1328 )
...
* feat: support aws bedrockruntime claude3
closes #622 , closes #749 , closes #1300
* fix: convert to aws claude model id
* fix: Update AWS adapter to handle stream completions and calculate usage metrics
Based on the file summaries provided, here are the important bullet points for the commit message:
- Add functionality to handle stream completion events from AWS in the relay/adaptor/aws/main.go file
- Marshall AWS response to OpenAI format and calculate usage metrics in the same file
- Implement a custom render function for streaming events in the same file
- Improve error handling for JSON unmarshalling and marshalling errors in the same file
* fix: Implement AWS handler with usage tracking and error handling
- Implemented streaming response handling for AWS handler
- Set response content type to text/event-stream
- Added error handling for failed marshaling/unmarshaling
- Updated return values to include `relaymodel.ErrorWithStatusCode` and `relaymodel.Usage`
- Improved error handling and response formatting for AWS adaptor
* fix: Refactor AWS Adapter for Improved Model Mapping and Error Handling
* Refactor AWS adapter to improve model management
- Replace hardcoded model list in `adapter.go` with a function to get models from `awsModelIDMap`
- Update `GetModelList` function to return model list directly
- Add `GetChannelName` function to get channel name from `Adaptor` object
* Improve error handling and code organization in main.go
- Replace switch statement with a map to map AWS model IDs to OpenAI model IDs
- Return an error if the model is not found in the map
- Use a single return statement instead of wrapping multiple return statements in the `awsModelID` function
- Add a new error message for when the model is not found in the map in the `Handler` function
* fix: bug fix
* chore: change variable name & package
* chore: change variable name
* perf: update config related code
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-20 00:40:47 +08:00
JustSong
a10232f43a
feat: add gpt-4-turbo support ( close #1304 )
2024-04-13 11:39:31 +08:00
JustSong
e086da05b1
feat: able to change gemini version ( close #1211 )
2024-04-06 20:48:22 +08:00
JustSong
572fc9ffb8
fix: fix stepfun model ratio & id
2024-04-06 10:43:54 +08:00
JustSong
961b4108e6
chore: fix refactor caused typo
2024-04-06 02:12:50 +08:00
JustSong
0b8ccb94eb
chore: reorganize common package
2024-04-06 02:03:59 +08:00
JustSong
f586ae0ad8
chore: remove helper & util subpackage for relay
2024-04-06 01:50:12 +08:00
JustSong
24ed170e7b
chore: reorganize adaptor related package
2024-04-06 01:36:48 +08:00
JustSong
f70506eac1
chore: reorganize relay related package
2024-04-06 01:31:44 +08:00
JustSong
8f4d78e24d
chore: reorganize billing related package
2024-04-06 01:26:48 +08:00
JustSong
cd2707692f
chore: reorganize billing related package
2024-04-06 01:09:23 +08:00
JustSong
2ab7d25a80
chore: reorganize helper related package
2024-04-06 01:02:35 +08:00
JustSong
f9d914873f
chore: reorganize constant related package
2024-04-06 00:44:33 +08:00
JustSong
880e12c855
feat: support cogview-3
2024-04-06 00:30:08 +08:00
JustSong
0cb224e62e
chore: fix typo
2024-04-05 23:55:25 +08:00
JustSong
eec41849ec
chore: fix ali image implementation
2024-04-05 18:25:57 +08:00
Mo
d4347e7a35
feat: support Ali stable-diffusion-xl and wanx-v1 model ( #1240 )
...
* Fix ali ConvertRequest function to use baidu keyword
* Support Ali stable-diffusion-xl and wanx-v1 model
* Support Ali stable-diffusion-xl and wanx-v1 model
* Support Ali stable-diffusion-xl and wanx-v1 model
* chore: update ali constants and model ratio
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2024-04-05 18:09:54 +08:00
manjieqi
b50b43eb65
feat: update baidu model name & ratio ( #1277 )
2024-04-05 17:30:48 +08:00
JustSong
5b41f57423
feat: support stepfun's models
2024-04-05 12:32:05 +08:00
JustSong
0bb7db0b44
fix: do not detect quota field in error message ( close #1276 )
2024-04-05 12:11:50 +08:00
JustSong
76569bb0b6
chore: disable channel when error message contain credit or balance
2024-04-05 00:31:41 +08:00
JustSong
1994256bac
chore: disable channel when error message contain quota
2024-04-05 00:18:26 +08:00
JustSong
1f80b0a39f
chore: add omitempty for xunfei functions
2024-04-05 00:13:37 +08:00
manjieqi
f73f2e51df
feat: update baidu model name & ratio ( #1253 )
...
* 修正百度模型名称
* 更新百度模型名称,并保留旧版兼容以及修正单价
* chore: add more model and adjust order
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-05 00:02:15 +08:00
Yang Fei
6f036bd0c9
feat: add embedding-2 support for zhipu ( #1273 )
...
* 增加对智谱embedding-2模型的支持
* fix: fix usage & ratio
---------
Co-authored-by: yangfei <yangfei@xuyao.info>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-04-04 23:32:59 +08:00
JustSong
065da8ef8c
fix: fix ali function call ( #1242 )
2024-04-04 00:46:30 +08:00
JustSong
e3cfb1fa52
feat: use given usage if available in stream mode
2024-03-31 23:41:52 +08:00
JustSong
f89ae5ad58
feat: initial function call support for xunfei
2024-03-31 23:12:29 +08:00
JustSong
06a3fc5421
chore: update GeneralOpenAIRequest
2024-03-31 22:23:42 +08:00
JustSong
3f3c13c98c
feat: support top_k for claude ( close #1239 )
2024-03-30 10:47:07 +08:00
JustSong
2ba28c72cb
feat: support function call for ali ( close #1242 )
2024-03-30 10:43:26 +08:00
JustSong
f76c46d648
feat: add gemini-1.5-pro ( #1211 )
2024-03-24 22:50:09 +08:00
JustSong
56ddbb842a
fix: return pre-consumed quota when error happened for audio ( close #1217 )
2024-03-24 22:20:41 +08:00
JustSong
99f81a267c
fix: fix xunfei error handling ( close #1218 )
2024-03-24 22:14:45 +08:00
xietong
c243cd5535
feat: 支持 ollama 的 embedding 接口 ( #1221 )
...
* 增加ollama的embedding接口
* chore: fix function name
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-03-24 21:51:31 +08:00
GuangxiaoLong
e96b173abe
feat: 移除 azure model 的 TrimSuffix ( #1193 )
2024-03-24 21:47:46 +08:00
Ian Li
ade19ba4a2
feat: update default API version for Azure OpenAI ( #994 )
...
* feat: Update default API version for Azure OpenAI.
* chore: update other theme
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-03-17 19:34:21 +08:00
Ian Li
4d86d021c4
feat: support Azure OpenAI TTS. ( #1177 )
2024-03-17 19:30:50 +08:00
JustSong
1185303346
chore: update comments
2024-03-17 14:10:35 +08:00
majian
205aba694f
chore: limit the temperature and top_p parameter value range to (0.0, 1) for zhipu ( #1091 )
2024-03-16 13:39:30 +08:00
Jguobao
66efabd5ae
fix: fix baidu url check ( #1143 )
...
添加百度的另外3个向量模型【"bge-large-zh",
"bge-large-en",
"tao-8k",
】
2024-03-14 23:31:07 +08:00
JustSong
b169173860
fix: force set Accept header for ali stream request ( close #1151 )
2024-03-14 23:20:38 +08:00
JustSong
e3767cbb07
fix: fix haiku model name ( close #1149 )
2024-03-14 23:13:05 +08:00
JustSong
be9eb59fbb
feat: support lingyiwanwu
2024-03-14 23:11:36 +08:00
JustSong
2dcef85285
feat: support ollama now ( close #870 )
2024-03-14 01:02:47 +08:00
JustSong
79d0cd378a
fix: fix baidu system prompt ( close #1079 )
2024-03-13 22:56:54 +08:00
JustSong
e99150bdb9
fix: make quota int64
2024-03-13 20:00:51 +08:00
JustSong
a72e5fcc9e
fix: when cached quota is too low, force refresh it
2024-03-13 19:38:44 +08:00