Commit Graph

71 Commits

Author SHA1 Message Date
Laisky.Cai
a20f57a923 fix: update .gitignore and improve model handling in various adapters and billing ratios
closes #37
2025-03-13 01:47:41 +00:00
Laisky.Cai
3effdef34a fix: synchronize custom channel updates with allModels
relates #39
2025-03-12 02:36:41 +00:00
Laisky.Cai
864c53e3e9 fix: /v1/models support custom channel
closes #39
2025-03-12 02:11:04 +00:00
Laisky.Cai
155a3aac73 Merge branch 'patch/models-api' 2025-02-27 01:12:38 +00:00
Laisky.Cai
54635ca4fe fix: models api return models in deactivate channels
- Enhance logging functionality by adding context support and improving debugging options.
- Standardize function naming conventions across middleware to ensure consistency.
- Optimize data retrieval and handling in the model controller, including caching and error management.
- Simplify the bug report template to streamline the issue reporting process.
2025-02-27 00:57:06 +00:00
Laisky.Cai
5905a7f295 fix: models api return models in deactivate channels
- Enhance logging functionality by adding context support and improving debugging options.
- Standardize function naming conventions across middleware to ensure consistency.
- Optimize data retrieval and handling in the model controller, including caching and error management.
- Simplify the bug report template to streamline the issue reporting process.
2025-02-26 11:22:03 +00:00
Laisky.Cai
c524e60d9f Merge remote-tracking branch 'origin/upstream/main' 2024-05-29 06:12:37 +00:00
Laisky.Cai
ca23dd9a97 Merge commit '1c2654320e5b6268b13b6efca40ce37a523d032b' 2024-04-28 01:53:31 +00:00
Laisky.Cai
7047d9605e Merge commit '3d149fedf45472eff92910324974c762fc37dad6' 2024-04-21 15:05:13 +00:00
JustSong
3d149fedf4 chore: do not hardcode context key 2024-04-21 19:43:23 +08:00
Laisky.Cai
c735b9b4d3 Merge commit '2369025842b828ac38f4427fd1ebab8d03b1fe7f' 2024-04-20 01:07:29 +00:00
Laisky.Cai
50bab08496 Refactor codebase, introduce relaymode package, update constants and improve consistency
- Refactor constant definitions and organization
- Clean up package level variables and functions
- Introduce new `relaymode` and `apitype` packages for constant definitions
- Refactor and simplify code in several packages including `openai`, `relay/channel/baidu`, `relay/util`, `relay/controller`, `relay/channeltype`
- Add helper functions in `relay/channeltype` package to convert channel type constants to corresponding API type constants
- Remove deprecated functions such as `ResponseText2Usage` from `relay/channel/openai/helper.go`
- Modify code in `relay/util/validation.go` and related files to use new `validator.ValidateTextRequest` function
- Rename `util` package to `relaymode` and update related imports in several packages
2024-04-06 05:18:04 +00: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
f9d914873f chore: reorganize constant related package 2024-04-06 00:44:33 +08:00
JustSong
a44fb5d482 fix: fix channel model list is empty 2024-04-05 23:44:57 +08:00
JustSong
fb90747c23 fix: fix /v1/models return null data when no models available 2024-04-04 18:53:42 +08:00
JustSong
8b9813d63b feat: /v1/models now only return available models 2024-04-04 02:44:59 +08:00
JustSong
dc7aaf2de5 feat: able to set model limitation for token (close #178) 2024-04-04 02:08:18 +08:00
Laisky.Cai
72501cb746 Merge remote-tracking branch 'origin/upstream/main' 2024-03-11 09:32:11 +00:00
JustSong
b33616df44 feat: support groq now (close #1087) 2024-03-10 14:09:44 +08:00
Laisky.Cai
82b2f2c427 fix 2024-03-09 01:37:30 +00:00
Laisky.Cai
099e15f98b Merge remote-tracking branch 'origin/upstream/main' 2024-03-09 01:31:04 +00:00
JustSong
cf16f44970 feat: load channel models from server 2024-03-09 02:28:23 +08:00
Laisky.Cai
cb6cb66646 Merge remote-tracking branch 'origin/upstream/main' 2024-03-05 01:02:35 +00:00
JustSong
9d8967f7d3 feat: support Mistral's models now (close #1051) 2024-03-03 21:46:45 +08:00
JustSong
df1fd9aa81 feat: support minimax's models now (close #354) 2024-03-02 01:24:28 +08:00
JustSong
614c2e0442 feat: support baichuan's models now (close #1057) 2024-03-02 00:55:48 +08:00
Laisky.Cai
609a6cb4b2 Merge remote-tracking branch 'origin/upstream/main' 2024-02-22 01:54:25 +00:00
JustSong
cece77e533 fix: fix model list 2024-02-19 22:20:18 +08:00
Laisky.Cai
79daa892bd fix: Refactor: Ignore nil adaptors when initializing OpenAI models map
- Ignore nil adaptors when initializing OpenAI models map
2024-02-19 07:34:24 +00:00
JustSong
2acc2f5017 feat: support moonshot now (close #804) 2024-02-18 16:17:19 +08:00
JustSong
1aa374ccfb refactor: use adaptor to do relay & test 2024-02-18 00:15:31 +08:00
JustSong
2cd1a78203 chore: update module name 2024-01-28 19:38:58 +08:00
Benny
26e2e646cb
feat: sync models with OpenAI (#971)
* add new 0125 chat models and embedding-3 models

* refine the step of manually deploying

* add gpt-4-turbo-preview
2024-01-28 16:09:21 +08:00
JustSong
eed9f5fdf0
refactor: refactor relay part (#935) 2024-01-14 19:21:03 +08:00
Buer
48989d4a0b
feat: add new theme berry (#860)
* feat: add theme berry

* docs: add development notes

* fix: fix blank page

* chore: update implementation

* fix: fix package.json

* chore: update ui copy

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2024-01-07 14:20:07 +08:00
Tailen
498dea2dbb
feat: add support for davinci-002 and babbage-002 (#888) 2024-01-01 17:06:17 +08:00
JustSong
1c8922153d feat: support gemini-vision-pro 2023-12-24 18:54:32 +08:00
Oliver Lee
0fe26cc4bd
feat: update ali relay implementation (#830)
* 修改通译千问最新接口:1.删除history参数,改用官方推荐的messages参数 2.整理messages参数顺序,补充必要上下文信息 3.用autogen调试测试通过

* chore: update impl

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-12-17 19:43:23 +08:00
David Zhuang
5cf23d8698
feat: add Google Gemini Pro support (#826)
* fest: Add Google Gemini Pro, fix #810

* fest: Add tooling to Gemini; Add OpenAI-like system prompt to Gemini

* refactor: removing unused if statement

* fest: Add dummy model message for system message in gemini model

* chore: update implementation

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-12-17 12:48:32 +08:00
JustSong
9889377f0e feat: support claude-2.x (close #736) 2023-11-24 21:39:44 +08:00
ckt1031
ddcaf95f5f
feat: support tts model (#713)
* Added support for Text-to-Speech models and
endpoints

* chore: update impl

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-11-17 21:18:51 +08:00
ckt1031
1d15157f7d
feat: keep sync with dall-e updates (#679)
* Updated ImageRequest struct and OpenAIModels,
added new Dall-E models and size ratios

* Fixed suspect `or`

* Refactored size ratio calculation in
relayImageHelper function

* Updated the format of resolution keys in
DalleSizeRatios map

* Added error handling for unsupported image size in
relayImageHelper function

* Added validation for number of generated images
and defined image generation ratios

* Refactored variable name from
DalleGenerationImageAmountRatios to
DalleGenerationImageAmounts

* Added validation for prompt length in
relayImageHelper function

* Updated model validation and removed size not
supported error in relayImageHelper function

* Refactored image size and model validation in
relayImageHelper function

* chore: discard binary file

* chore: update impl

---------

Co-authored-by: cktsun1031 <65409152+cktsun1031@users.noreply.github.com>
Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-11-17 20:03:16 +08:00
Mikey
9d43ec57d8
feat: sync pricing for new 1106 models (#696)
* feat: sync pricing for new 1106 models

* chore: change ratio after 2023-12-11

---------

Co-authored-by: JustSong <songquanpeng@foxmail.com>
2023-11-10 21:08:23 +08:00
papersnake
c70c614018
feat: support chatglm_turbo (#648)
* feat: support chatglm_turbo

* fix: remove characterglm
2023-11-05 17:59:38 +08:00
Baksi
0d87de697c
fix: fix typo (#651) 2023-11-02 22:24:22 +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