JustSong
d8029550f7
fix: do not consume user quota if failed ( close #881 )
2024-01-01 16:18:50 +08:00
ShinChven ✨
bc6769826b
feat: add condition to validate n value for non-Azure channels ( #775 )
...
- Add a condition to validate the n value only for non-Azure channels, ensuring it falls within the acceptable range.
- Fix Azure compatibility
2023-12-17 19:49:08 +08:00
Ghostz
66f06e5d6f
feat: reset image num to 1 when not given ( #821 )
...
* Update relay-image.go
* fix: reset image num to 1 when not given
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com >
2023-12-17 18:54:08 +08:00
ShinChven ✨
b7570d5c77
feat: support dalle for Azure ( #754 )
...
* feat: Add Message-ID to email headers to comply with RFC 5322
- Extract domain from SMTPFrom
- Generate a unique Message-ID
- Add Message-ID to email headers
* chore: check slice length
* feat: Add Azure compatibility for relayImageHelper
- Handle Azure channel requestURL compatibility
- Set api-key header for Azure channel authentication
- Handle Azure channel request body
fixes: https://github.com/songquanpeng/one-api/issues/751
* refactor: update implementation
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com >
2023-12-03 17:34:59 +08:00
igophper
d85e356b6e
refactor: remove consumeQuota related logic ( #738 )
...
* feat: 删除relay-text中的consumeQuota变量
该变量始终为true,可以删除
* chore: remove useless code
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com >
2023-11-24 20:42:29 +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
vc
3b483639a4
feat: add cloudflare ai gateway support for image & audio ( #607 )
...
* Update channel-test.go
* Update relay-audio.go
* Update relay-image.go
* chore: using a util function
---------
Co-authored-by: JustSong <songquanpeng@foxmail.com >
2023-10-22 17:50:52 +08:00
JustSong
47c08c72ce
fix: check user quota when pre-consume quota
2023-10-01 12:49:40 +08:00
Xyfacai
ecf8a6d875
feat: supprt channel priority now & record channel id in log ( #484 )
...
* feat: 支持设置渠道优先级 & 日志中显示使用的渠道ID
* fix: 设置渠道优先级未更新 ability
* chore: update implementation
---------
Co-authored-by: Xiangyuan Liu <xiangyuan.liu@ui.com >
Co-authored-by: JustSong <songquanpeng@foxmail.com >
Co-authored-by: JustSong <39998050+songquanpeng@users.noreply.github.com >
2023-09-17 19:18:16 +08:00
JustSong
42451d9d02
refactor: update logging related logic
2023-09-17 15:39:46 +08:00
JustSong
3da119efba
perf: reuse http client to reduce delay
2023-07-23 15:18:58 +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
f6fe34676f
refactor: split the relay controller
2023-06-19 10:28:55 +08:00