VIBN Frontend for Coolify deployment
This commit is contained in:
43
lib/types/extraction-output.ts
Normal file
43
lib/types/extraction-output.ts
Normal file
@@ -0,0 +1,43 @@
|
||||
/**
|
||||
* Backend Extraction Output Types
|
||||
*
|
||||
* These types define the structured JSON returned by the backend extractor.
|
||||
* Used ONLY by backend extraction, not by chat.
|
||||
*/
|
||||
|
||||
// Structured item returned by Gemini for each category
|
||||
export interface StructuredExtractedItem {
|
||||
id?: string;
|
||||
sourceText: string;
|
||||
label?: string;
|
||||
description?: string;
|
||||
confidence: number;
|
||||
importance: "primary" | "supporting";
|
||||
}
|
||||
|
||||
export interface ExtractedInsight {
|
||||
id: string;
|
||||
type: "problem" | "user" | "feature" | "constraint" | "opportunity" | "other";
|
||||
title: string;
|
||||
description: string;
|
||||
sourceText: string;
|
||||
sourceKnowledgeItemId: string;
|
||||
importance: "primary" | "supporting";
|
||||
confidence: number;
|
||||
}
|
||||
|
||||
export interface ExtractionOutput {
|
||||
// Gemini returns rich objects, not just strings
|
||||
problems: StructuredExtractedItem[];
|
||||
targetUsers: StructuredExtractedItem[];
|
||||
features: StructuredExtractedItem[];
|
||||
constraints: StructuredExtractedItem[];
|
||||
opportunities: StructuredExtractedItem[];
|
||||
|
||||
// These can remain as arrays (empty arrays OK)
|
||||
insights: ExtractedInsight[];
|
||||
uncertainties: string[];
|
||||
missingInformation: string[];
|
||||
overallConfidence: number;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user