feat(experiments): integrate freeform analysis path
This commit is contained in:
@@ -373,6 +373,9 @@ export async function startCase(body, dependencies = {}) {
|
||||
if (dependencies.generationSchema) {
|
||||
analysisOptions.generationSchema = dependencies.generationSchema;
|
||||
}
|
||||
if (dependencies.freeform) {
|
||||
analysisOptions.freeform = dependencies.freeform;
|
||||
}
|
||||
const analysis = await analyseScenario(scenario, analysisOptions);
|
||||
|
||||
if (!analysis.success) {
|
||||
@@ -394,6 +397,23 @@ export async function startCase(body, dependencies = {}) {
|
||||
};
|
||||
}
|
||||
|
||||
// Condition D freeform + reconstruction-only: skip structured graph pipeline.
|
||||
if (dependencies.reconstructionOnly && dependencies.freeform) {
|
||||
return {
|
||||
success: true,
|
||||
summary: analysis.summary ?? null,
|
||||
reconstruction: analysis.reconstruction, // genuine freeform text
|
||||
situationGraph: null,
|
||||
selectedQuestion: null,
|
||||
diagnostics: buildDiagnostics({
|
||||
analysis,
|
||||
graph: null,
|
||||
graphReferenceValidation: null,
|
||||
}),
|
||||
statusCode: 200,
|
||||
};
|
||||
}
|
||||
|
||||
const initialGraph = buildInitialGraph({
|
||||
reconstruction: analysis.reconstruction,
|
||||
evidence: analysis.evidence,
|
||||
|
||||
Reference in New Issue
Block a user