Spaces:
Sleeping
Sleeping
File size: 953 Bytes
1257299 a01cf9a 1257299 a01cf9a 1257299 a01cf9a 1257299 a01cf9a 1257299 a01cf9a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
// 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;
}
|