60 lines
1.8 KiB
JavaScript
60 lines
1.8 KiB
JavaScript
let apiUrl = [
|
||
{
|
||
label: 'LAI API',
|
||
value: 'b44c6f24-59e4-4a71-b2c7-3df0c4e35e65',
|
||
gpt_url: 'https://laitool.net/v1/chat/completions',
|
||
mj_url: {
|
||
imagine: 'https://laitool.net/mj/submit/imagine',
|
||
describe: 'https://laitool.net/mj/submit/describe',
|
||
update_file: 'https://laitool.net/mj/submit/upload-discord-images',
|
||
once_get_task: 'https://laitool.net/mj/task/${id}/fetch'
|
||
},
|
||
d3_url: {
|
||
image: 'https://laitool.net/v1/images/generations'
|
||
},
|
||
buy_url: 'https://laitool.net/register?aff=Zmdu'
|
||
},
|
||
{
|
||
label: 'openai-hk',
|
||
value: '3d64e50e-79c0-49ec-a72d-7dfdf508dd04',
|
||
gpt_url: 'https://api.openai-hk.com/v1/chat/completions',
|
||
mj_url: null,
|
||
buy_url: 'https://openai-hk.com/?i=10196'
|
||
},
|
||
{
|
||
label: '通义千问',
|
||
value: 'b630c69a-99e9-46bc-8d88-39a00bcc3d2a',
|
||
gpt_url: 'https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation',
|
||
mj_url: null,
|
||
buy_url: null
|
||
},
|
||
{
|
||
label: 'KIMI',
|
||
value: 'b5c8c8c5-f3c4-4c88-b25c-7f5a3d5f9d1f',
|
||
gpt_url: 'https://api.moonshot.cn/v1/chat/completions',
|
||
mj_url: null,
|
||
d3_url: null,
|
||
buy_url: 'https://platform.moonshot.cn/console/account'
|
||
},
|
||
{
|
||
label: 'DouBao',
|
||
value: 'd3f6a2a9-2d17-4c3b-8d7f-28356cfa676e',
|
||
gpt_url: 'https://ark.cn-beijing.volces.com/api/v3/chat/completions',
|
||
mj_url: null,
|
||
d3_url: null,
|
||
buy_url: 'https://www.volcengine.com/product/doubao'
|
||
}
|
||
]
|
||
|
||
/**
|
||
* 通过ID获取指定的数据(value)
|
||
* @param {*} id
|
||
*/
|
||
function getApiMessageByID(id) {
|
||
let mj_api_url_index = apiUrl.findIndex((item) => item.value == id)
|
||
if (mj_api_url_index == -1) {
|
||
throw new Error('没有找到对应的MJ API的配置,请先检查配置')
|
||
}
|
||
}
|
||
export { apiUrl, getApiMessageByID }
|