From cfd587117edea249b5b9f4c22776dc0c0438af0f Mon Sep 17 00:00:00 2001 From: JustSong Date: Sat, 20 May 2023 17:24:56 +0800 Subject: [PATCH] feat: support channel AI Proxy now --- README.md | 1 + common/constants.go | 2 ++ web/src/constants/channel.constants.js | 5 +++-- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index bd8ba596..335c5220 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,7 @@ _✨ All in one 的 OpenAI 接口,整合各种 API 访问方式,开箱即用 + [x] **Azure OpenAI API** + [x] [API2D](https://api2d.com/r/197971) + [x] [OhMyGPT](https://aigptx.top?aff=uFpUl2Kf) + + [x] [AI Proxy](https://aiproxy.io/?i=OneAPI) + [x] [AI.LS](https://ai.ls) + [x] [OpenAI Max](https://openaimax.com) + [x] [OpenAI-SB](https://openai-sb.com) diff --git a/common/constants.go b/common/constants.go index 0a1f1e20..78474bd0 100644 --- a/common/constants.go +++ b/common/constants.go @@ -128,6 +128,7 @@ const ( ChannelTypeOhMyGPT = 7 ChannelTypeCustom = 8 ChannelTypeAILS = 9 + ChannelTypeAIProxy = 10 ) var ChannelBaseURLs = []string{ @@ -141,4 +142,5 @@ var ChannelBaseURLs = []string{ "https://api.ohmygpt.com", // 7 "", // 8 "https://api.caipacity.com", // 9 + "https://api.aiproxy.io", // 10 } diff --git a/web/src/constants/channel.constants.js b/web/src/constants/channel.constants.js index b66d5c34..f84a4deb 100644 --- a/web/src/constants/channel.constants.js +++ b/web/src/constants/channel.constants.js @@ -1,11 +1,12 @@ export const CHANNEL_OPTIONS = [ { key: 1, text: 'OpenAI', value: 1, color: 'green' }, - { key: 2, text: 'API2D', value: 2, color: 'blue' }, + { key: 8, text: '自定义', value: 8, color: 'pink' }, { key: 3, text: 'Azure', value: 3, color: 'olive' }, + { key: 2, text: 'API2D', value: 2, color: 'blue' }, { key: 4, text: 'CloseAI', value: 4, color: 'teal' }, { key: 5, text: 'OpenAI-SB', value: 5, color: 'brown' }, { key: 6, text: 'OpenAI Max', value: 6, color: 'violet' }, { key: 7, text: 'OhMyGPT', value: 7, color: 'purple' }, { key: 9, text: 'AI.LS', value: 9, color: 'yellow' }, - { key: 8, text: '自定义', value: 8, color: 'pink' } + { key: 10, text: 'AI Proxy', value: 10, color: 'purple' } ];