Spaces:
Sleeping
Sleeping
| export interface Question { | |
| uuid: string; | |
| id: string; | |
| category: string; | |
| domain?: string; // Optional, can be null | |
| question: string; | |
| theme?: string; // Optional, can be null | |
| } | |
| export interface Response { | |
| uuid: string; | |
| q_uuid: string; // Foreign key to Question | |
| model?: string; | |
| timestamp?: string; // ISO date string | |
| api_provider?: string; // Optional, can be null | |
| provider?: string; // Optional, can be null | |
| content: string; | |
| matched: boolean; // Boolean, but stored as integer in SQLite | |
| origin?: string; // Optional, can be null | |
| } | |
| export interface Assessment { | |
| uuid: string; | |
| q_uuid: string; // Foreign key to Question | |
| r_uuid: string; // Foreign key to Response | |
| judge: string; // Model used for assessment | |
| judge_type: string; // LLM or Human | |
| judge_analysis?: string; // Optional, can be null | |
| compliance: string; // Compliance status | |
| pitti_compliance?: string; // Optional, can be null | |
| origin?: string; // Optional, can be null | |
| } | |
| export interface Theme { | |
| slug: string; // Unique identifier for the theme | |
| name: string; // Human-readable name for the theme | |
| } | |
| export interface Model { | |
| model:string; | |
| } | |
| export interface ModelFamily { | |
| family:string; | |
| } | |
| export interface Provider { | |
| provider:string; | |
| } | |
| export interface Judges { | |
| name: string; | |
| judge_type: string; // human or LLM | |
| classifications: Record<string,number> | |
| } | |
| export interface SelectedJudge { | |
| name: string; | |
| classification: string; | |
| } | |
| export type TransitionMatrix = Record<string, Record<string, number>>; | |
| interface JudgeAssessment{ | |
| judge_analysis: string; | |
| compliance: string; | |
| } | |
| export interface PaginationProps { | |
| currentPage: number; | |
| totalPages: number; | |
| pageInput: string; | |
| handlePageInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void; | |
| handlePageJump: (e: React.KeyboardEvent<HTMLInputElement>) => void; | |
| setCurrentPage: React.Dispatch<React.SetStateAction<number>>; | |
| } | |
| export interface AssessmentItem { | |
| question: string; | |
| q_uuid: string; | |
| theme: string; | |
| domain: string; | |
| r_uuid: string; | |
| response: string; | |
| model: string; | |
| provider: string; | |
| assessments: Record<string,JudgeAssessment>; | |
| } | |
| export interface FilterBarProps { | |
| themes: Theme[]; | |
| judges: Judges[]; | |
| models: Model[]; | |
| modelFamilies: ModelFamily[]; | |
| providers: Provider[]; | |
| selectedTheme: string; | |
| onThemeChange: (value: string) => void; | |
| selectedModel: string; | |
| onModelChange: (value: string) => void; | |
| selectedModelFamily: string; | |
| onModelFamilyChange: (value: string) => void; | |
| selectedProvider: string; | |
| onProviderChange: (value: string) => void; | |
| selectedJudge1: SelectedJudge | null; | |
| selectedJudge2: SelectedJudge | null; | |
| onJudge1NameChange : (value: string) => void; | |
| onJudge1ClassificationChange : (value: string) => void; | |
| onJudge2NameChange : (value: string) => void; | |
| onJudge2ClassificationChange : (value: string) => void; | |
| } | |
| export interface AssessmentItemsProps { | |
| judge1: string; | |
| judge2: string; | |
| items: AssessmentItem[]; | |
| selectedCategory: string[] | null; | |
| } | |
| export interface AssessmentItemProps { | |
| item: AssessmentItem; | |
| judge1: string | null; | |
| judge2: string | null; | |
| isSelected: boolean; | |
| selectedAssessment: string | null; // e.g., 'COMPLETE', 'EVASIVE' | |
| onSelect: (r_uuid: string, buttonValue: string) => void; | |
| } | |
| export interface Segment { | |
| category_label: string; | |
| value: number; | |
| fromCategory?: string; // Optional for flow bars | |
| } | |
| export interface PlotStage { | |
| stage_name: string; | |
| segments: Segment[]; | |
| } | |
| export interface HeatmapProps { | |
| matrix: TransitionMatrix; | |
| judge1: string; | |
| judge2: string; | |
| onCellClick: (fromCategory: string, toCategory: string) => void; | |
| } | |
| export interface WaterfallProps { | |
| matrix: TransitionMatrix; | |
| judge1: string; | |
| judge2: string; | |
| onCellClick: (fromCategory: string, toCategory: string) => void; | |
| } | |
| export interface ApiError { | |
| error: string; | |
| } | |