This commit is contained in:
Your Name
2026-10-08 15:49:53 +08:00
parent 1c9b093e08
commit 67c374d899
52 changed files with 51959 additions and 75 deletions
@@ -29,6 +29,12 @@ class AiChatService
return ['ok' => false, 'error' => 'AI 密钥未配置'];
}
try {
$messages = NihaixiaClinicalSkill::augmentMessages($messages);
} catch (\RuntimeException $error) {
return ['ok' => false, 'error' => '临床 AI 参考资料不可用'];
}
$baseUrl = rtrim((string) ($cfg['base_url'] ?? 'https://api.deepseek.com'), '/');
$model = (string) ($options['model'] ?? ($cfg['model'] ?? 'deepseek-chat'));
$timeout = (int) ($options['timeout'] ?? ($cfg['timeout'] ?? 60));
@@ -99,6 +105,12 @@ class AiChatService
return ['ok' => false, 'error' => 'AI 密钥未配置'];
}
try {
$messages = NihaixiaClinicalSkill::augmentMessages($messages);
} catch (\RuntimeException $error) {
return ['ok' => false, 'error' => '临床 AI 参考资料不可用'];
}
$baseUrl = rtrim((string) ($cfg['base_url'] ?? 'https://api.deepseek.com'), '/');
$model = (string) ($options['model'] ?? ($cfg['model'] ?? 'deepseek-chat'));
$timeout = (int) ($options['timeout'] ?? ($cfg['timeout'] ?? 60));