mirror of
https://github.com/linux-do/new-api.git
synced 2025-09-17 16:06:38 +08:00
commit
a500097b36
@ -55,6 +55,7 @@
|
|||||||
3. Anthropic Claude 3 (claude-3-opus-20240229, claude-3-sonnet-20240229)
|
3. Anthropic Claude 3 (claude-3-opus-20240229, claude-3-sonnet-20240229)
|
||||||
4. [Ollama](https://github.com/ollama/ollama?tab=readme-ov-file),添加渠道时,密钥可以随便填写,默认的请求地址是[http://localhost:11434](http://localhost:11434),如果需要修改请在渠道中修改
|
4. [Ollama](https://github.com/ollama/ollama?tab=readme-ov-file),添加渠道时,密钥可以随便填写,默认的请求地址是[http://localhost:11434](http://localhost:11434),如果需要修改请在渠道中修改
|
||||||
5. [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy)接口,[对接文档](Midjourney.md)
|
5. [Midjourney-Proxy(Plus)](https://github.com/novicezk/midjourney-proxy)接口,[对接文档](Midjourney.md)
|
||||||
|
6. [零一万物](https://platform.lingyiwanwu.com/)
|
||||||
|
|
||||||
您可以在渠道中添加自定义模型gpt-4-gizmo-*,此模型并非OpenAI官方模型,而是第三方模型,使用官方key无法调用。
|
您可以在渠道中添加自定义模型gpt-4-gizmo-*,此模型并非OpenAI官方模型,而是第三方模型,使用官方key无法调用。
|
||||||
|
|
||||||
|
@ -212,6 +212,7 @@ const (
|
|||||||
ChannelTypeMoonshot = 25
|
ChannelTypeMoonshot = 25
|
||||||
ChannelTypeZhipu_v4 = 26
|
ChannelTypeZhipu_v4 = 26
|
||||||
ChannelTypePerplexity = 27
|
ChannelTypePerplexity = 27
|
||||||
|
ChannelTypeLingYiWanWu = 31
|
||||||
)
|
)
|
||||||
|
|
||||||
var ChannelBaseURLs = []string{
|
var ChannelBaseURLs = []string{
|
||||||
@ -243,4 +244,8 @@ var ChannelBaseURLs = []string{
|
|||||||
"https://api.moonshot.cn", //25
|
"https://api.moonshot.cn", //25
|
||||||
"https://open.bigmodel.cn", //26
|
"https://open.bigmodel.cn", //26
|
||||||
"https://api.perplexity.ai", //27
|
"https://api.perplexity.ai", //27
|
||||||
|
"", //28
|
||||||
|
"", //29
|
||||||
|
"", //30
|
||||||
|
"https://api.lingyiwanwu.com", //31
|
||||||
}
|
}
|
||||||
|
@ -93,6 +93,11 @@ var DefaultModelRatio = map[string]float64{
|
|||||||
"embedding_s1_v1": 0.0715, // ¥0.001 / 1k tokens
|
"embedding_s1_v1": 0.0715, // ¥0.001 / 1k tokens
|
||||||
"semantic_similarity_s1_v1": 0.0715, // ¥0.001 / 1k tokens
|
"semantic_similarity_s1_v1": 0.0715, // ¥0.001 / 1k tokens
|
||||||
"hunyuan": 7.143, // ¥0.1 / 1k tokens // https://cloud.tencent.com/document/product/1729/97731#e0e6be58-60c8-469f-bdeb-6c264ce3b4d0
|
"hunyuan": 7.143, // ¥0.1 / 1k tokens // https://cloud.tencent.com/document/product/1729/97731#e0e6be58-60c8-469f-bdeb-6c264ce3b4d0
|
||||||
|
// https://platform.lingyiwanwu.com/docs#-计费单元
|
||||||
|
// 已经按照 7.2 来换算美元价格
|
||||||
|
"yi-34b-chat-0205": 0.018,
|
||||||
|
"yi-34b-chat-200k": 0.0864,
|
||||||
|
"yi-vl-plus": 0.0432,
|
||||||
}
|
}
|
||||||
|
|
||||||
var DefaultModelPrice = map[string]float64{
|
var DefaultModelPrice = map[string]float64{
|
||||||
|
@ -10,6 +10,7 @@ import (
|
|||||||
"one-api/relay"
|
"one-api/relay"
|
||||||
"one-api/relay/channel/ai360"
|
"one-api/relay/channel/ai360"
|
||||||
"one-api/relay/channel/moonshot"
|
"one-api/relay/channel/moonshot"
|
||||||
|
"one-api/relay/channel/lingyiwanwu"
|
||||||
relayconstant "one-api/relay/constant"
|
relayconstant "one-api/relay/constant"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -101,6 +102,17 @@ func init() {
|
|||||||
Parent: nil,
|
Parent: nil,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
for _, modelName := range lingyiwanwu.ModelList {
|
||||||
|
openAIModels = append(openAIModels, OpenAIModels{
|
||||||
|
Id: modelName,
|
||||||
|
Object: "model",
|
||||||
|
Created: 1626777600,
|
||||||
|
OwnedBy: "lingyiwanwu",
|
||||||
|
Permission: permission,
|
||||||
|
Root: modelName,
|
||||||
|
Parent: nil,
|
||||||
|
})
|
||||||
|
}
|
||||||
for modelName, _ := range constant.MidjourneyModel2Action {
|
for modelName, _ := range constant.MidjourneyModel2Action {
|
||||||
openAIModels = append(openAIModels, OpenAIModels{
|
openAIModels = append(openAIModels, OpenAIModels{
|
||||||
Id: modelName,
|
Id: modelName,
|
||||||
|
9
relay/channel/lingyiwanwu/constrants.go
Normal file
9
relay/channel/lingyiwanwu/constrants.go
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
package lingyiwanwu
|
||||||
|
|
||||||
|
// https://platform.lingyiwanwu.com/docs
|
||||||
|
|
||||||
|
var ModelList = []string{
|
||||||
|
"yi-34b-chat-0205",
|
||||||
|
"yi-34b-chat-200k",
|
||||||
|
"yi-vl-plus",
|
||||||
|
}
|
@ -11,6 +11,7 @@ import (
|
|||||||
"one-api/relay/channel"
|
"one-api/relay/channel"
|
||||||
"one-api/relay/channel/ai360"
|
"one-api/relay/channel/ai360"
|
||||||
"one-api/relay/channel/moonshot"
|
"one-api/relay/channel/moonshot"
|
||||||
|
"one-api/relay/channel/lingyiwanwu"
|
||||||
relaycommon "one-api/relay/common"
|
relaycommon "one-api/relay/common"
|
||||||
"one-api/service"
|
"one-api/service"
|
||||||
"strings"
|
"strings"
|
||||||
@ -88,6 +89,8 @@ func (a *Adaptor) GetModelList() []string {
|
|||||||
return ai360.ModelList
|
return ai360.ModelList
|
||||||
case common.ChannelTypeMoonshot:
|
case common.ChannelTypeMoonshot:
|
||||||
return moonshot.ModelList
|
return moonshot.ModelList
|
||||||
|
case common.ChannelTypeLingYiWanWu:
|
||||||
|
return lingyiwanwu.ModelList
|
||||||
default:
|
default:
|
||||||
return ModelList
|
return ModelList
|
||||||
}
|
}
|
||||||
|
@ -15,6 +15,7 @@ export const CHANNEL_OPTIONS = [
|
|||||||
{key: 16, text: 'Moonshot', value: 25, color: 'green', label: 'Moonshot'},
|
{key: 16, text: 'Moonshot', value: 25, color: 'green', label: 'Moonshot'},
|
||||||
{key: 19, text: '360 智脑', value: 19, color: 'blue', label: '360 智脑'},
|
{key: 19, text: '360 智脑', value: 19, color: 'blue', label: '360 智脑'},
|
||||||
{key: 23, text: '腾讯混元', value: 23, color: 'teal', label: '腾讯混元'},
|
{key: 23, text: '腾讯混元', value: 23, color: 'teal', label: '腾讯混元'},
|
||||||
|
{key: 31, text: '零一万物', value: 31, color: 'green', label: '零一万物'},
|
||||||
{key: 8, text: '自定义渠道', value: 8, color: 'pink', label: '自定义渠道'},
|
{key: 8, text: '自定义渠道', value: 8, color: 'pink', label: '自定义渠道'},
|
||||||
{key: 22, text: '知识库:FastGPT', value: 22, color: 'blue', label: '知识库:FastGPT'},
|
{key: 22, text: '知识库:FastGPT', value: 22, color: 'blue', label: '知识库:FastGPT'},
|
||||||
{key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple', label: '知识库:AI Proxy'},
|
{key: 21, text: '知识库:AI Proxy', value: 21, color: 'purple', label: '知识库:AI Proxy'},
|
||||||
|
@ -95,6 +95,9 @@ const EditChannel = (props) => {
|
|||||||
case 26:
|
case 26:
|
||||||
localModels = ['glm-4', 'glm-4v', 'glm-3-turbo'];
|
localModels = ['glm-4', 'glm-4v', 'glm-3-turbo'];
|
||||||
break;
|
break;
|
||||||
|
case 31:
|
||||||
|
localModels = ['yi-34b-chat-0205', 'yi-34b-chat-200k', 'yi-vl-plus'];
|
||||||
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
localModels = ['mj_imagine', 'mj_variation', 'mj_reroll', 'mj_blend', 'mj_upscale', 'mj_describe'];
|
localModels = ['mj_imagine', 'mj_variation', 'mj_reroll', 'mj_blend', 'mj_upscale', 'mj_describe'];
|
||||||
break;
|
break;
|
||||||
|
Loading…
Reference in New Issue
Block a user