This commit is contained in:
gr
2026-10-30 13:43:29 +08:00
144 changed files with 16467 additions and 2457 deletions
@@ -112,8 +112,10 @@ class DifyChatService
$ancientBookSources = $evidenceOnly || $caseReferences ? [] : ClinicalKnowledgeReference::ancientBookSources($query);
try {
if (!$evidenceOnly) {
$query = $caseReferences ? ClinicalKnowledgeReference::augmentCaseQuery($query, $consultationReferences)
: ClinicalKnowledgeReference::augmentQueryWithAncientBookSources($query, $ancientBookSources);
$query = $consultationReferences && ($options['response_contract'] ?? '') === 'live_consultation'
? ClinicalKnowledgeReference::augmentLiveConsultationQuery($query, (string) ($options['analysis_scope'] ?? 'authorized_case'))
: ($caseReferences ? ClinicalKnowledgeReference::augmentCaseQuery($query, $consultationReferences)
: ClinicalKnowledgeReference::augmentQueryWithAncientBookSources($query, $ancientBookSources));
}
} catch (\RuntimeException $error) {
return self::error('SKILL_UNAVAILABLE', '临床 AI 参考资料不可用');
@@ -318,8 +320,10 @@ class DifyChatService
$ancientBookSources = $evidenceOnly || $caseReferences ? [] : ClinicalKnowledgeReference::ancientBookSources($query);
try {
if (!$evidenceOnly) {
$query = $caseReferences ? ClinicalKnowledgeReference::augmentCaseQuery($query, $consultationReferences)
: ClinicalKnowledgeReference::augmentQueryWithAncientBookSources($query, $ancientBookSources);
$query = $consultationReferences && ($options['response_contract'] ?? '') === 'live_consultation'
? ClinicalKnowledgeReference::augmentLiveConsultationQuery($query, (string) ($options['analysis_scope'] ?? 'authorized_case'))
: ($caseReferences ? ClinicalKnowledgeReference::augmentCaseQuery($query, $consultationReferences)
: ClinicalKnowledgeReference::augmentQueryWithAncientBookSources($query, $ancientBookSources));
}
} catch (\RuntimeException $error) {
return self::error('SKILL_UNAVAILABLE', '临床 AI 参考资料不可用');