mirror of
https://github.com/kuaifan/dootask.git
synced 2025-12-15 13:22:49 +00:00
perf: Openid supports gpt-4 model
This commit is contained in:
parent
3f11451f3c
commit
a24990e06a
@ -254,6 +254,7 @@ class SystemController extends AbstractController
|
||||
$keys = [
|
||||
'openai_key',
|
||||
'openai_agency',
|
||||
'openai_model',
|
||||
'claude_token',
|
||||
'claude_agency',
|
||||
'wenxin_key',
|
||||
@ -302,6 +303,7 @@ class SystemController extends AbstractController
|
||||
}
|
||||
}
|
||||
//
|
||||
$setting['openai_model'] = $setting['openai_model'] ?: 'gpt-3.5-turbo';
|
||||
$setting['wenxin_model'] = $setting['wenxin_model'] ?: 'ERNIE-Bot-turbo';
|
||||
$setting['qianwen_model'] = $setting['qianwen_model'] ?: 'qwen-v1';
|
||||
if (env("SYSTEM_SETTING") == 'disabled') {
|
||||
|
||||
@ -375,6 +375,7 @@ class BotReceiveMsgTask extends AbstractTask
|
||||
$extras = [
|
||||
'openai_key' => $setting['openai_key'],
|
||||
'openai_agency' => $setting['openai_agency'],
|
||||
'openai_model' => $setting['openai_model'],
|
||||
'server_url' => $serverUrl,
|
||||
];
|
||||
if (empty($extras['openai_key'])) {
|
||||
|
||||
@ -168,7 +168,7 @@ services:
|
||||
|
||||
ai:
|
||||
container_name: "dootask-ai-${APP_ID}"
|
||||
image: "kuaifan/dooai:0.0.5"
|
||||
image: "kuaifan/dooai:0.0.6"
|
||||
networks:
|
||||
extnetwork:
|
||||
ipv4_address: "${APP_IPPR}.12"
|
||||
|
||||
@ -8,6 +8,13 @@
|
||||
<Input :maxlength="255" v-model="formData.openai_key" type="password" placeholder="OpenAI API Key"/>
|
||||
<div class="form-tip">{{$L('访问OpenAI网站查看:')}}<a href="https://platform.openai.com/account/api-keys" target="_blank">https://platform.openai.com/account/api-keys</a></div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('模型')" prop="openai_model">
|
||||
<Select v-model="formData.openai_model" placement="top">
|
||||
<Option value="gpt-3.5-turbo">gpt-3.5-turbo</Option>
|
||||
<Option value="gpt-4">gpt-4</Option>
|
||||
</Select>
|
||||
<div class="form-tip">{{$L('查看说明')}} <a href="https://platform.openai.com/docs/models" target="_blank">https://platform.openai.com/docs/models</a></div>
|
||||
</FormItem>
|
||||
<FormItem :label="$L('使用代理')" prop="openai_agency">
|
||||
<Input :maxlength="500" v-model="formData.openai_agency" :placeholder="$L('支持 http 或 socks 代理')"/>
|
||||
<div class="form-tip">{{$L('例如:http://proxy.com 或 socks5://proxy.com')}}</div>
|
||||
@ -38,7 +45,7 @@
|
||||
<Input :maxlength="500" v-model="formData.wenxin_secret" type="password" placeholder="API Secret"/>
|
||||
<div class="form-tip">{{$L('获取方式')}} <a href="https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3#3-%E8%8E%B7%E5%8F%96%E5%AF%86%E9%92%A5" target="_blank">https://ai.baidu.com/ai-doc/REFERENCE/Ck3dwjgn3</a></div>
|
||||
</FormItem>
|
||||
<FormItem label="模型" prop="wenxin_model">
|
||||
<FormItem :label="$L('模型')" prop="wenxin_model">
|
||||
<Select v-model="formData.wenxin_model" placement="top">
|
||||
<Option value="ERNIE-Bot-turbo">ERNIE-Bot-turbo</Option>
|
||||
<Option value="ERNIE-Bot">ERNIE-Bot</Option>
|
||||
@ -54,7 +61,7 @@
|
||||
<Input :maxlength="255" v-model="formData.qianwen_key" type="password" placeholder="API Key"/>
|
||||
<div class="form-tip">{{$L('获取方式')}} <a href="https://help.aliyun.com/document_detail/611472.html" target="_blank">https://help.aliyun.com/document_detail/611472.html</a></div>
|
||||
</FormItem>
|
||||
<FormItem label="模型" prop="qianwen_model">
|
||||
<FormItem :label="$L('模型')" prop="qianwen_model">
|
||||
<Select v-model="formData.qianwen_model" placement="top">
|
||||
<Option value="qwen-v1">qwen-v1</Option>
|
||||
<Option value="qwen-plus-v1">qwen-plus-v1</Option>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user