This commit is contained in:
Your Name
2026-10-30 13:41:35 +08:00
parent 28ba9b97f2
commit e2fc30e1f7
69 changed files with 8702 additions and 252 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 参考资料不可用');