mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-13 12:02:51 +00:00
perf: ChatGPT 支持自定义 Base URL
This commit is contained in:
parent
5c564524a3
commit
80313f613e
@ -66,7 +66,7 @@ class Setting extends AbstractModel
|
||||
}
|
||||
$array = [];
|
||||
$aiList = ['openai', 'claude', 'gemini', 'zhipu', 'qianwen', 'wenxin'];
|
||||
$fieldList = ['key', 'model', 'agency', 'system', 'secret'];
|
||||
$fieldList = ['key', 'model', 'base_url', 'agency', 'system', 'secret'];
|
||||
foreach ($aiList as $aiName) {
|
||||
foreach ($fieldList as $fieldName) {
|
||||
$key = $aiName . '_' . $fieldName;
|
||||
|
||||
@ -427,6 +427,7 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
'model_name' => $setting[$type . '_model'],
|
||||
'system_message' => $setting[$type . '_system'],
|
||||
'api_key' => $setting[$type . '_key'],
|
||||
'base_url' => $setting[$type . '_base_url'],
|
||||
'agency' => $setting[$type . '_agency'],
|
||||
'server_url' => $serverUrl,
|
||||
];
|
||||
|
||||
@ -104,6 +104,13 @@ export default {
|
||||
tipPrefix: '查看说明',
|
||||
link: 'https://platform.openai.com/docs/models'
|
||||
},
|
||||
{
|
||||
label: 'Base URL',
|
||||
prop: 'openai_base_url',
|
||||
type: 'input',
|
||||
placeholder: 'Enter base URL...',
|
||||
tip: 'API请求的基础URL路径,如果没有请留空'
|
||||
},
|
||||
{
|
||||
label: '使用代理',
|
||||
prop: 'openai_agency',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user