no message

This commit is contained in:
kuaifan 2025-02-26 11:58:53 +08:00
parent dd0770a93f
commit ff41f5c041

View File

@ -443,8 +443,13 @@ class BotReceiveMsgTask extends AbstractTask
if ($type === 'wenxin') {
$extras['api_key'] .= ':' . $setting['wenxin_secret'];
}
if ($type === 'ollama' && empty($extras['api_key'])) {
$extras['api_key'] = Base::strRandom(6);
if ($type === 'ollama') {
if (empty($extras['base_url'])) {
$errorContent = '机器人未启用。';
}
if (empty($extras['api_key'])) {
$extras['api_key'] = Base::strRandom(6);
}
}
if (empty($extras['api_key'])) {
$errorContent = '机器人未启用。';