-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathtypes.ts
More file actions
34 lines (31 loc) · 766 Bytes
/
Copy pathtypes.ts
File metadata and controls
34 lines (31 loc) · 766 Bytes
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
export interface Document {
path: string;
content: string;
metadata: {
source: string;
score?: number;
[key: string]: any;
};
}
export interface VectorStore {
initialize(): Promise<void>;
addDocuments(docs: Document[]): Promise<void>;
similaritySearch(query: string, k: number): Promise<Document[]>;
removeDocument(path: string): Promise<void>;
removeAllDocuments(): Promise<void>;
listDocumentPaths(): Promise<string[]>;
}
// Add new type definitions for embedding API
export interface EmbeddingResponse {
data?: Array<{
embedding: number[];
[key: string]: any;
}>;
embedding?: number[];
[key: string]: any;
}
export interface EmbeddingErrorResponse {
error?: string;
message?: string;
[key: string]: any;
}