Commit Graph

139 Commits

Author SHA1 Message Date
Akarin
d33b802dac Squashed commit of the following:
commit 5a6a0df45dee3dfbf2f65591a79fe5f2b74a49e6
Author: Akarin <jimmyshjj@gmail.com>
Date:   Thu May 16 14:05:28 2024 +0800

    Revert "Update docker-image-amd64.yml"

    This reverts commit 581343a78783bbd779e65b476e125af0e2b64ce5.

commit a0aec1bd030da2c6b25d9541199d598f16813a60
Merge: 5b46c7d 58abb38
Author: Jiayun Shen <jimmyshjj@gmail.com>
Date:   Thu May 16 06:46:51 2024 +0800

    Merge branch 'main' of https://github.com/jimmyshjj/new-api

commit 58abb3864a89294d82f812cda9fe49ccf7e2dd91
Merge: 7d2c026 93858c3
Author: Akarin <jimmyshjj@gmail.com>
Date:   Thu May 16 06:46:00 2024 +0800

    Merge branch 'Calcium-Ion:main' into main

commit 5b46c7dd8e6132d2be3b59c7b2ed6a4b84b93cef
Author: Jiayun Shen <jimmyshjj@gmail.com>
Date:   Thu May 16 06:45:00 2024 +0800

    Update constants.go

    Remove replaced Baidu models

commit 7d2c02679cd90b8b53f4145f83969b980a8c2095
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 23:40:50 2024 +0800

    Update adaptor.go - Normalize model name to lowercase

    Baidu's official model names may include mixed case letters, but their model APIs are case-sensitive and accept only lowercase. To ensure compatibility, the default behavior has been updated to convert model names to lowercase before constructing API requests.

commit 6bc168a39d9a6194d66f2f32b175e56de9295b2e
Merge: bb9fecd 910e76a
Author: Jiayun Shen <jimmyshjj@gmail.com>
Date:   Wed May 15 21:51:52 2024 +0800

    Merge branch 'main' of https://github.com/jimmyshjj/new-api

commit 910e76ac94d7f5dca6254abb4d0669cbb762e724
Merge: 581343a ff044de
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 21:51:13 2024 +0800

    Merge branch 'Calcium-Ion:main' into main

commit bb9fecd5bf2bd9f1859a4017e7e68f80bdb6685a
Author: Jiayun Shen <jimmyshjj@gmail.com>
Date:   Wed May 15 21:50:08 2024 +0800

    update Baidu and 360 models

    Add Baidu and 360 new models. Add Baidu completion ratio

commit 581343a78783bbd779e65b476e125af0e2b64ce5
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 19:41:34 2024 +0800

    Update docker-image-amd64.yml

commit de17e2d95eec80f1eeae66e82dec4e9601cdee43
Merge: 046f653 a3b3e6c
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 19:22:09 2024 +0800

    Merge branch 'Calcium-Ion:main' into main

commit 046f6537913ae8ad8ecf21019b64c0379331b3fd
Merge: 4164d51 7b58305
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 15:32:38 2024 +0800

    Merge branch 'Calcium-Ion:main' into main

commit 4164d51207808283a18ca2728241fd5cddc4855f
Merge: ef35b07 c222bc8
Author: Akarin <jimmyshjj@gmail.com>
Date:   Wed May 15 11:19:13 2024 +0800

    Merge branch 'Calcium-Ion:main' into main

commit ef35b072824b5095ecd2d1ed7ca9fa11673da2c4
Author: Jiayun Shen <jimmyshjj@gmail.com>
Date:   Tue May 14 19:17:32 2024 +0800

    Update adaptor.go

    Update frequently used model names from Baidu official docs and support custom models
2024-05-16 14:05:44 +08:00
wozulong
5ffb520363 merge upstream
Signed-off-by: wozulong <>
2024-05-15 12:36:29 +08:00
HowieWu
0f11461af3
Update model-ratio.go 2024-05-15 10:27:30 +08:00
CaIon
9f18641d7e fix: gpt-4-gizmo-* model ratio 2024-05-14 16:35:43 +08:00
wozulong
7a7a923504 add gpt-4o tokenizer
Signed-off-by: wozulong <>
2024-05-14 14:47:57 +08:00
CaIon
eda3bd1c9d feat: update model ratio 2024-05-14 11:37:24 +08:00
Calcium-Ion
9a9fd34cba
Merge pull request #247 from MapleEve/gpt4o
Support Gpt4o
2024-05-14 11:36:59 +08:00
CaIon
475dea96d2 feat: update model ratio 2024-05-14 11:08:42 +08:00
Maple Gao
256ccfa989 add: Support GPT4o ratio 2024-05-14 09:48:04 +08:00
wozulong
4f6c171a08 add gpt-4o model ratio
Signed-off-by: wozulong <>
2024-05-14 02:38:44 +08:00
CaIon
5715fcf8fb feat: add pricing page 2024-05-13 23:02:35 +08:00
CaIon
71547849bc feat: dalle系列改为使用模型固定价格计费 2024-05-13 16:04:02 +08:00
CaIon
e8800415b8 feat: 支持自定义特殊模型补全倍率 2024-05-12 20:15:56 +08:00
CaIon
6fb1fbfe96 feat: 日志详情展示模型价格 2024-05-12 15:35:57 +08:00
wozulong
0ed6600437 Merge remote-tracking branch 'upstream/main' 2024-05-10 14:08:43 +08:00
1808837298@qq.com
d7a343e2f6 feat: update model ratio 2024-05-08 16:57:11 +08:00
wozulong
ed951b3974 merge upstream
Signed-off-by: wozulong <>
2024-04-25 16:01:18 +08:00
CaIon
86b17fcce8 chore: update model ratio 2024-04-24 22:08:54 +08:00
CaIon
20aaf30785 feat: update model ratio 2024-04-24 18:53:21 +08:00
CaIon
bdc65bdba2 feat: 启用函数计费 2024-04-22 16:35:56 +08:00
CaIon
818bd824da feat: 前端不显示敏感信息 2024-04-18 17:52:18 +08:00
Maple Gao
1456992aae
add: new Gemini model default ratio 2024-04-15 14:25:44 +08:00
Maple Gao
21250a46a6
feat: support google v1beta and Gemini Ultra 2024-04-15 14:19:19 +08:00
xqx333
bf94893f6a
Update model-ratio.go
修复gpt-4-1106-preview和gpt-4-0125-preview的输出倍率错误
2024-04-11 14:03:51 +08:00
1808837298@qq.com
4ef2422b97 update model-ratio 2024-04-10 20:12:56 +08:00
1808837298@qq.com
f188147680 feat: support gpt-4-turbo 2024-04-10 20:10:54 +08:00
wozulong
149902bd8a add gpt-4-turbo
Signed-off-by: wozulong <>
2024-04-10 11:21:12 +08:00
h1xy
c5f6d0e063
Fix: CompletionRatio is not working for openrouter.ai
https://openrouter.ai/docs#models
Model name of openrouter is prefix with company name, e.g. "model": "anthropic/claude-3-opus:beta", therefore, CompletionRatio will not working for it which is only work for prefix with claude-xxx
2024-04-08 02:12:47 +08:00
wozulong
923c2dee32 merge upstream
Signed-off-by: wozulong <>
2024-03-27 18:01:43 +08:00
CaIon
1587ea565b feat: support gemini-1.5 2024-03-25 22:33:46 +08:00
CaIon
f1fb7b32a3 chore: update model ratio 2024-03-25 16:17:35 +08:00
wozulong
11eaba6b5d fix gpt-3.5-turbo points
Signed-off-by: wozulong <>
2024-03-24 00:17:49 +08:00
Calcium-Ion
a500097b36
Merge pull request #137 from MapleEve/main
feat: support 01.AI
2024-03-23 17:38:53 +08:00
CaIon
67332bc8df fix: 模型固定价格为空时错误使用默认价格 2024-03-23 17:19:29 +08:00
Maple Gao
cfabf8a656
Add 01.AI relay 2024-03-20 23:44:03 +08:00
CaIon
d34b55c154 chore: reformat code 2024-03-15 16:05:33 +08:00
Calcium-Ion
f62dcbf669
Merge pull request #114 from Calcium-Ion/midjourney-proxy-plus
feat: support midjourney-proxy-plus
2024-03-14 18:49:30 +08:00
CaIon
d704902b70 feat: 兼容自定义变焦,完善modal操作 2024-03-14 16:42:37 +08:00
CaIon
98c1f66d61 feat: support Anthropic Claude 3.0 Haiku (close #116) 2024-03-14 14:28:21 +08:00
CaIon
3d10c9f090 feat: 将操作拆分成单独的模型 2024-03-13 21:19:48 +08:00
CaIon
655dfe0d09 feat: update claude default model ratio 2024-03-08 21:17:32 +08:00
1808837298@qq.com
54088bc664 fix: 修复添加和编辑渠道无可选择模型 2024-03-03 15:53:48 +08:00
1808837298@qq.com
a16e949318 feat: update SparkDesk model ratio 2024-03-02 22:08:59 +08:00
1808837298@qq.com
b4645d1019 feat: 支持智谱GLM-4V 2024-02-29 18:31:03 +08:00
CaIon
a0c4e9f10e feat: add model gpt-3.5-turbo-0125 2024-02-02 12:46:12 +08:00
CaIon
3dc5d4d95a feat: update model-ratio 2024-01-26 14:21:10 +08:00
CaIon
a3921ea54d feat: add midjourney price log 2024-01-25 14:56:49 +08:00
CaIon
fb95216b5a chore: delete model price log 2024-01-09 12:11:09 +08:00
CaIon
e2d994d73a fix: 修复mj固定价格设置无效的问题 2024-01-07 23:40:06 +08:00
Calcium-Ion
290fed3841
Merge pull request #41 from Calcium-Ion/optimize/mj
optimize: MJ 部分调整、优化
2024-01-03 22:45:23 +08:00
Hao Mei
afbd585048 feat: add support for davinci-002 and babbage-002 2024-01-03 20:19:00 +08:00
Xyfacai
5c747dfee2 optimize: MJ 部分调整、优化
MJ
增加simple-change、list接口,
变换和重试操作区别出来,价格与绘图一样
优化图片返回
2024-01-01 22:46:05 +08:00
CaIon
14592f9758 support gemini-pro-vision 2023-12-27 16:32:54 +08:00
CaIon
3475643257 支持设置模型按次计费 2023-12-21 20:14:04 +08:00
CaIon
e057c0e42e 添加gemini支持 2023-12-18 23:46:05 +08:00
CaIon
a29e3765f4 修复gpts无法设置倍率的问题 2023-12-13 00:29:53 +08:00
CaIon
4b93f185bb 添加gpt-4-1106-vision-preview模型 2023-12-12 16:41:37 +08:00
CaIon
773e48ed6f 修复语音系列模型计费bug 2023-11-16 01:44:15 +08:00
CaIon
63cd3f05f2 support tts 2023-11-15 21:05:14 +08:00
CaIon
d09807af09 添加mj渠道 2023-11-12 23:32:22 +08:00
CaIon
5b2d898b36 更新模型倍率 2023-11-11 02:31:07 +08:00
CaIon
6fbe1fe087 更新模型倍率 2023-11-11 01:55:29 +08:00
JustSong
63fafba112 feat: support ERNIE-Bot-4 (close #608) 2023-10-22 18:48:35 +08:00
JustSong
b4b4acc288 feat: support Tencent's model (close #519) 2023-10-03 14:19:03 +08:00
JustSong
a85ecace2e chore: delete 360's 360GPT_S2_V9.4 2023-10-03 12:51:53 +08:00
JustSong
fd98463611 chore: update ali's model name 2023-09-23 22:57:59 +08:00
JustSong
f5a1cd3463 feat: add support for gpt-3.5-turbo-instruct (close #545) 2023-09-23 22:37:11 +08:00
igophper
d0a0e871e1
fix: support ali's embedding model (#481, close #469)
* feat:支持阿里的 embedding 模型

* fix: add to model list

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2023-09-03 22:12:35 +08:00
JustSong
d09d317459 feat: supper whisper now (close #197) 2023-08-27 15:28:23 +08:00
JustSong
5ee24e8acf feat: support 360's models (close #331, close #461)
feat: support 360's models (close #331, close #461)
2023-08-26 13:36:20 +08:00
Benny
23b1c63538
fix: claude model ratio (#449)
* fix: Claude model ratio

* chore: update implementation

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-08-19 16:58:34 +08:00
JustSong
8a866078b2 feat: support xunfei's llm (close #206) 2023-07-29 21:55:57 +08:00
JustSong
130e6bfd83 feat: support baidu's embedding model (close #324) 2023-07-29 12:15:07 +08:00
JustSong
e92da7928b feat: support ali's llm (close #326) 2023-07-28 23:45:08 +08:00
JustSong
26c6719ea3 feat: support zhipu's ChatGLM (close #289) 2023-07-23 11:51:44 +08:00
JustSong
8f721d67a5 feat: support Google PaLM2 (close #105) 2023-07-23 00:32:47 +08:00
JustSong
9a1db61675 feat: support baidu's models now (close #286) 2023-07-22 23:24:09 +08:00
JustSong
2ff15baf66 feat: support claude now (close #150) 2023-07-22 16:18:03 +08:00
ckt
b520b54625
feat: initial support of Dall-E (#148, #266)
* feat: initial support of Dall-E

* fix: fix N not timed

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com>
2023-07-15 12:30:06 +08:00
JustSong
7adac1c09c chore: update default ratio for text-embedding-ada-002 2023-06-25 12:07:42 +08:00
JustSong
00151a0124 chore: format logs 2023-06-22 10:59:01 +08:00
JustSong
24a4b323eb chore: set the fallback model ratio to 30 2023-06-18 22:28:28 +08:00
JustSong
38668e7331 chore: update gpt3.5 completion ratio 2023-06-14 09:41:06 +08:00
JustSong
323f3d263a feat: add new released models 2023-06-14 09:12:14 +08:00
JustSong
955d5f8707 fix: fix group list not correct (close #147) 2023-06-12 09:11:48 +08:00
JustSong
4339f45f74 feat: support /v1/moderations now (close #117) 2023-06-11 09:37:36 +08:00
JustSong
4b6adaec0b feat: support /v1/completions (close #115) 2023-06-08 14:54:02 +08:00
JustSong
9edc54ca69 fix: fix the default ratio for text-embedding-ada-002 2023-05-11 22:43:39 +08:00
JustSong
d9db16e999 feat: able to configure ratio for more models now (close #53) 2023-05-11 20:59:35 +08:00