更新
This commit is contained in:
@@ -50,7 +50,19 @@ $analysisSource = implode('', array_slice(
|
||||
));
|
||||
analysisContractExpect(
|
||||
substr_count($analysisSource, 'DifyChatService::chat(') === 1,
|
||||
'one analysis request performs exactly one upstream chat call'
|
||||
'analysis retries malformed output through the same bounded upstream call site'
|
||||
);
|
||||
analysisContractExpect(
|
||||
str_contains($analysisSource, '$attempt < 2')
|
||||
&& str_contains($analysisSource, 'buildAnalysisRepairPrompt($prompt)'),
|
||||
'malformed structured output receives at most one format repair attempt'
|
||||
);
|
||||
$repair = $logicReflection->getMethod('buildAnalysisRepairPrompt')->invoke(null, 'ORIGINAL_CASE_PROMPT');
|
||||
analysisContractExpect(
|
||||
str_contains($repair, 'ORIGINAL_CASE_PROMPT')
|
||||
&& str_contains($repair, '仅有 diagnosis_advice、risk_assessment、treatment_advice 三个键')
|
||||
&& str_contains($repair, '资料不足时说明缺口'),
|
||||
'repair keeps the original patient evidence and constrained schema'
|
||||
);
|
||||
foreach ([
|
||||
"'diagnosis_advice'",
|
||||
|
||||
Reference in New Issue
Block a user