perf: 更新 AI 支持更多模型和支持提示词

This commit is contained in:
kuaifan
2024-11-30 08:30:08 +08:00
parent 0d4b005f4e
commit 62c50bb4e6
4 changed files with 39 additions and 17 deletions

View File

@@ -426,10 +426,10 @@ class BotReceiveMsgTask extends AbstractTask
if ($type === 'wenxin') {
$extras['api_key'] .= ':' . $setting['wenxin_secret'];
}
if (empty($extras[$type . '_key'])) {
if (empty($extras['api_key'])) {
$errorContent = '机器人未启用。';
} elseif (in_array($this->client['platform'], ['win', 'mac', 'web'])
&& !Base::judgeClientVersion("0.29.11", $this->client['version'])) {
}
if (in_array($this->client['platform'], ['win', 'mac', 'web']) && !Base::judgeClientVersion("0.29.11", $this->client['version'])) {
$errorContent = '当前客户端版本低(所需版本≥v0.29.11)。';
}
$webhookUrl = "{$serverUrl}/ai/chat";