Spaces:
Sleeping
Sleeping
| // Existing types | |
| export interface ModelInteraction { | |
| id: string; | |
| user_input: string; | |
| model_output: string; | |
| model_name: string; | |
| created_at: string; | |
| } | |
| // More precise: inputs should be text for text-generation | |
| export interface InferenceRequest { | |
| model: string; | |
| inputs: string; | |
| parameters?: Record<string, unknown>; | |
| } | |
| // Model responses are usually structured JSON | |
| export interface InferenceResponse<T = unknown> { | |
| result: T; | |
| data?: ModelInteraction; | |
| } | |
| // NEW: Vector search types | |
| export interface Document { | |
| id: string; | |
| content: string; | |
| title?: string; | |
| embedding?: number[]; | |
| metadata?: Record<string, unknown>; | |
| created_at: string; | |
| updated_at?: string; | |
| } | |
| export interface VectorSearchRequest { | |
| query: string; | |
| match_threshold?: number; | |
| match_count?: number; | |
| } | |
| export interface VectorSearchResult { | |
| id: string; | |
| content: string; | |
| title?: string; | |
| metadata?: Record<string, unknown>; | |
| similarity: number; | |
| } | |