MCPcopy
hub / github.com/RedPlanetHQ/core / IVectorProvider

Interface IVectorProvider

packages/providers/src/vector/interface.ts:8–110  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import type { Embedding, VectorSearchResult, SearchParams, VectorItem, VectorCapabilities } from "../types";
7
8export interface IVectorProvider {
9 /**
10 * Insert or update a single vector
11 */
12 upsert(params: {
13 id: string;
14 vector: Embedding;
15 content: string;
16 metadata?: Record<string, any>;
17 namespace?: string;
18 }): Promise<void>;
19
20 /**
21 * Insert or update multiple vectors in batch
22 */
23 batchUpsert(items: VectorItem[], namespace?: string): Promise<void>;
24
25 /**
26 * Search for similar vectors
27 */
28 search(params: SearchParams): Promise<VectorSearchResult[]>;
29
30 /**
31 * Score specific vectors by ID (critical for BFS)
32 */
33 batchScore(params: {
34 vector: Embedding;
35 ids: string[];
36 namespace?: string;
37 }): Promise<Map<string, number>>;
38
39 /**
40 * Delete vectors by ID
41 */
42 delete(params: {
43 ids: string[];
44 namespace?: string;
45 }): Promise<void>;
46
47 /**
48 * Get a single vector by ID
49 */
50 get(params: {
51 id: string;
52 namespace?: string;
53 }): Promise<Embedding | null>;
54
55 /**
56 * Get multiple vectors by IDs in batch
57 */
58 batchGet(params: {
59 ids: string[];
60 namespace?: string;
61 }): Promise<Map<string, Embedding>>;
62
63 addLabelsToEpisodes(
64 episodeUuids: string[],
65 labelIds: string[],

Callers 43

addToQueueFunction · 0.65
processLabelAssignmentFunction · 0.65
savePersonaDocumentFunction · 0.65
addToQueueFunction · 0.65
createIntegrationAccountFunction · 0.65
findOrCreateDailyPageFunction · 0.65
saveVoiceAspectsFunction · 0.65
handleMemorySearchFunction · 0.65

Implementers 1

PgVectorProviderpackages/providers/src/vector/pgvector

Calls

no outgoing calls

Tested by

no test coverage detected