@venturekit/ai 0.0.0-dev.20260307234057
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +191 -0
- package/dist/agents/agent.d.ts +22 -0
- package/dist/agents/agent.d.ts.map +1 -0
- package/dist/agents/agent.js +138 -0
- package/dist/agents/agent.js.map +1 -0
- package/dist/agents/config.d.ts +13 -0
- package/dist/agents/config.d.ts.map +1 -0
- package/dist/agents/config.js +24 -0
- package/dist/agents/config.js.map +1 -0
- package/dist/agents/index.d.ts +10 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +9 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/tools.d.ts +14 -0
- package/dist/agents/tools.d.ts.map +1 -0
- package/dist/agents/tools.js +15 -0
- package/dist/agents/tools.js.map +1 -0
- package/dist/embeddings/config.d.ts +13 -0
- package/dist/embeddings/config.d.ts.map +1 -0
- package/dist/embeddings/config.js +25 -0
- package/dist/embeddings/config.js.map +1 -0
- package/dist/embeddings/embedder.d.ts +20 -0
- package/dist/embeddings/embedder.d.ts.map +1 -0
- package/dist/embeddings/embedder.js +100 -0
- package/dist/embeddings/embedder.js.map +1 -0
- package/dist/embeddings/index.d.ts +9 -0
- package/dist/embeddings/index.d.ts.map +1 -0
- package/dist/embeddings/index.js +8 -0
- package/dist/embeddings/index.js.map +1 -0
- package/dist/index.d.ts +16 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +17 -0
- package/dist/index.js.map +1 -0
- package/dist/rag/chunker.d.ts +11 -0
- package/dist/rag/chunker.d.ts.map +1 -0
- package/dist/rag/chunker.js +109 -0
- package/dist/rag/chunker.js.map +1 -0
- package/dist/rag/config.d.ts +13 -0
- package/dist/rag/config.d.ts.map +1 -0
- package/dist/rag/config.js +35 -0
- package/dist/rag/config.js.map +1 -0
- package/dist/rag/index.d.ts +10 -0
- package/dist/rag/index.d.ts.map +1 -0
- package/dist/rag/index.js +9 -0
- package/dist/rag/index.js.map +1 -0
- package/dist/rag/pipeline.d.ts +26 -0
- package/dist/rag/pipeline.d.ts.map +1 -0
- package/dist/rag/pipeline.js +79 -0
- package/dist/rag/pipeline.js.map +1 -0
- package/dist/types/agents.d.ts +118 -0
- package/dist/types/agents.d.ts.map +1 -0
- package/dist/types/agents.js +5 -0
- package/dist/types/agents.js.map +1 -0
- package/dist/types/embeddings.d.ts +69 -0
- package/dist/types/embeddings.d.ts.map +1 -0
- package/dist/types/embeddings.js +5 -0
- package/dist/types/embeddings.js.map +1 -0
- package/dist/types/index.d.ts +8 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +8 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/rag.d.ts +92 -0
- package/dist/types/rag.d.ts.map +1 -0
- package/dist/types/rag.js +5 -0
- package/dist/types/rag.js.map +1 -0
- package/dist/types/vectors.d.ts +98 -0
- package/dist/types/vectors.d.ts.map +1 -0
- package/dist/types/vectors.js +5 -0
- package/dist/types/vectors.js.map +1 -0
- package/dist/vectors/config.d.ts +13 -0
- package/dist/vectors/config.d.ts.map +1 -0
- package/dist/vectors/config.js +24 -0
- package/dist/vectors/config.js.map +1 -0
- package/dist/vectors/index.d.ts +9 -0
- package/dist/vectors/index.d.ts.map +1 -0
- package/dist/vectors/index.js +8 -0
- package/dist/vectors/index.js.map +1 -0
- package/dist/vectors/store.d.ts +24 -0
- package/dist/vectors/store.d.ts.map +1 -0
- package/dist/vectors/store.js +156 -0
- package/dist/vectors/store.js.map +1 -0
- package/package.json +63 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,WAAW,CAAC;AAC1B,cAAc,OAAO,CAAC;AACtB,cAAc,UAAU,CAAC"}
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* RAG (Retrieval-Augmented Generation) Types
|
|
3
|
+
*/
|
|
4
|
+
import type { EmbeddingConfig } from './embeddings';
|
|
5
|
+
import type { VectorStoreConfig } from './vectors';
|
|
6
|
+
/**
|
|
7
|
+
* Document chunk for indexing
|
|
8
|
+
*/
|
|
9
|
+
export interface DocumentChunk {
|
|
10
|
+
/** Unique identifier */
|
|
11
|
+
id: string;
|
|
12
|
+
/** Text content */
|
|
13
|
+
content: string;
|
|
14
|
+
/** Source document ID */
|
|
15
|
+
sourceId?: string;
|
|
16
|
+
/** Chunk index within source */
|
|
17
|
+
chunkIndex?: number;
|
|
18
|
+
/** Additional metadata */
|
|
19
|
+
metadata?: Record<string, unknown>;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Chunking strategy
|
|
23
|
+
*/
|
|
24
|
+
export type ChunkingStrategy = 'fixed' | 'sentence' | 'paragraph' | 'semantic';
|
|
25
|
+
/**
|
|
26
|
+
* Text chunking configuration
|
|
27
|
+
*/
|
|
28
|
+
export interface ChunkingConfig {
|
|
29
|
+
/** Chunking strategy */
|
|
30
|
+
strategy: ChunkingStrategy;
|
|
31
|
+
/** Target chunk size (characters) */
|
|
32
|
+
chunkSize: number;
|
|
33
|
+
/** Overlap between chunks (characters) */
|
|
34
|
+
chunkOverlap: number;
|
|
35
|
+
/** Separator for fixed chunking */
|
|
36
|
+
separator?: string;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* RAG configuration
|
|
40
|
+
*/
|
|
41
|
+
export interface RagConfig {
|
|
42
|
+
/** Embedding configuration */
|
|
43
|
+
embedding: EmbeddingConfig;
|
|
44
|
+
/** Vector store configuration */
|
|
45
|
+
vectorStore: VectorStoreConfig;
|
|
46
|
+
/** Chunking configuration */
|
|
47
|
+
chunking: ChunkingConfig;
|
|
48
|
+
/** Number of chunks to retrieve */
|
|
49
|
+
topK: number;
|
|
50
|
+
/** Minimum similarity score */
|
|
51
|
+
minScore?: number;
|
|
52
|
+
/** Reranking enabled */
|
|
53
|
+
rerank?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* RAG config input (partial for overrides)
|
|
57
|
+
*/
|
|
58
|
+
export interface RagConfigInput {
|
|
59
|
+
embedding?: Partial<EmbeddingConfig>;
|
|
60
|
+
vectorStore?: Partial<VectorStoreConfig>;
|
|
61
|
+
chunking?: Partial<ChunkingConfig>;
|
|
62
|
+
topK?: number;
|
|
63
|
+
minScore?: number;
|
|
64
|
+
rerank?: boolean;
|
|
65
|
+
}
|
|
66
|
+
/**
|
|
67
|
+
* Retrieved context for generation
|
|
68
|
+
*/
|
|
69
|
+
export interface RetrievedContext {
|
|
70
|
+
/** Retrieved chunks */
|
|
71
|
+
chunks: Array<{
|
|
72
|
+
content: string;
|
|
73
|
+
score: number;
|
|
74
|
+
metadata?: Record<string, unknown>;
|
|
75
|
+
}>;
|
|
76
|
+
/** Combined context string */
|
|
77
|
+
context: string;
|
|
78
|
+
/** Total chunks retrieved */
|
|
79
|
+
totalChunks: number;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* RAG query options
|
|
83
|
+
*/
|
|
84
|
+
export interface RagQueryOptions {
|
|
85
|
+
/** Override topK for this query */
|
|
86
|
+
topK?: number;
|
|
87
|
+
/** Metadata filter */
|
|
88
|
+
filter?: Record<string, unknown>;
|
|
89
|
+
/** Include source metadata */
|
|
90
|
+
includeMetadata?: boolean;
|
|
91
|
+
}
|
|
92
|
+
//# sourceMappingURL=rag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag.d.ts","sourceRoot":"","sources":["../../src/types/rag.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AACpD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AAEnD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,wBAAwB;IACxB,EAAE,EAAE,MAAM,C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H,MAAM,WAAW,gBAAgB;IAC/B,uBAAuB;IACvB,MAAM,EAAE,KAAK,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;QAChB,KAAK,EAAE,MAAM,CAAC;QACd,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACpC,CAAC,CAAC;IAEH,8BAA8B;IAC9B,OAAO,EAAE,MAAM,CAAC;IAEhB,6BAA6B;IAC7B,WAAW,EAAE,MAAM,CAAC;CACrB;AAED;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd,sBAAsB;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEjC,8BAA8B;IAC9B,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"rag.js","sourceRoot":"","sources":["../../src/types/rag.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store Types
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Vector store provider
|
|
6
|
+
*/
|
|
7
|
+
export type VectorStoreProvider = 'pinecone' | 'pgvector' | 'qdrant' | 'weaviate' | 'memory';
|
|
8
|
+
/**
|
|
9
|
+
* Vector with metadata
|
|
10
|
+
*/
|
|
11
|
+
export interface Vector {
|
|
12
|
+
/** Unique identifier */
|
|
13
|
+
id: string;
|
|
14
|
+
/** The embedding vector */
|
|
15
|
+
values: number[];
|
|
16
|
+
/** Associated metadata */
|
|
17
|
+
metadata?: Record<string, unknown>;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Vector store configuration
|
|
21
|
+
*/
|
|
22
|
+
export interface VectorStoreConfig {
|
|
23
|
+
/** Provider to use */
|
|
24
|
+
provider: VectorStoreProvider;
|
|
25
|
+
/** Index/collection name */
|
|
26
|
+
indexName: string;
|
|
27
|
+
/** Vector dimensions */
|
|
28
|
+
dimensions: number;
|
|
29
|
+
/** Distance metric */
|
|
30
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
31
|
+
/** Pinecone-specific */
|
|
32
|
+
pinecone?: {
|
|
33
|
+
apiKey: string;
|
|
34
|
+
environment?: string;
|
|
35
|
+
};
|
|
36
|
+
/** pgvector-specific */
|
|
37
|
+
pgvector?: {
|
|
38
|
+
connectionString: string;
|
|
39
|
+
tableName?: string;
|
|
40
|
+
};
|
|
41
|
+
/** Qdrant-specific */
|
|
42
|
+
qdrant?: {
|
|
43
|
+
url: string;
|
|
44
|
+
apiKey?: string;
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Vector store config input (partial for overrides)
|
|
49
|
+
*/
|
|
50
|
+
export interface VectorStoreConfigInput {
|
|
51
|
+
provider?: VectorStoreProvider;
|
|
52
|
+
indexName?: string;
|
|
53
|
+
dimensions?: number;
|
|
54
|
+
metric?: 'cosine' | 'euclidean' | 'dotproduct';
|
|
55
|
+
pinecone?: {
|
|
56
|
+
apiKey: string;
|
|
57
|
+
environment?: string;
|
|
58
|
+
};
|
|
59
|
+
pgvector?: {
|
|
60
|
+
connectionString: string;
|
|
61
|
+
tableName?: string;
|
|
62
|
+
};
|
|
63
|
+
qdrant?: {
|
|
64
|
+
url: string;
|
|
65
|
+
apiKey?: string;
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Vector search query
|
|
70
|
+
*/
|
|
71
|
+
export interface VectorQuery {
|
|
72
|
+
/** Query vector */
|
|
73
|
+
vector: number[];
|
|
74
|
+
/** Number of results to return */
|
|
75
|
+
topK: number;
|
|
76
|
+
/** Metadata filter */
|
|
77
|
+
filter?: Record<string, unknown>;
|
|
78
|
+
/** Include metadata in results */
|
|
79
|
+
includeMetadata?: boolean;
|
|
80
|
+
/** Include vectors in results */
|
|
81
|
+
includeValues?: boolean;
|
|
82
|
+
/** Minimum similarity score (0-1) */
|
|
83
|
+
minScore?: number;
|
|
84
|
+
}
|
|
85
|
+
/**
|
|
86
|
+
* Vector search result
|
|
87
|
+
*/
|
|
88
|
+
export interface VectorSearchResult {
|
|
89
|
+
/** Vector ID */
|
|
90
|
+
id: string;
|
|
91
|
+
/** Similarity score */
|
|
92
|
+
score: number;
|
|
93
|
+
/** Metadata if requested */
|
|
94
|
+
metadata?: Record<string, unknown>;
|
|
95
|
+
/** Vector values if requested */
|
|
96
|
+
values?: number[];
|
|
97
|
+
}
|
|
98
|
+
//# sourceMappingURL=vectors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectors.d.ts","sourceRoot":"","sources":["../../src/types/vectors.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,UAAU,GAAG,UAAU,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,CAAC;AAE7F;;GAEG;AACH,MAAM,WAAW,MAAM;IACrB,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IAEX,2BAA2B;IAC3B,MAAM,EAAE,MAAM,EAAE,CAAC;IAEjB,0BAA0B;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,sBAAsB;IACtB,QAAQ,EAAE,mBAAmB,CAAC;IAE9B,4BAA4B;IAC5B,SAAS,EAAE,MAAM,CAAC;IAElB,wBAAwB;IACxB,UAAU,EAAE,MAAM,CAAC;IAEnB,sBAAsB;IACtB,MAAM,CAAC,EAAE,QAAQ,GAAG,WAAW,GAAG,YAAY,CAAC;IAE/C,wBAAwB;IACxB,QAAQ,CAAC,EAAE;QACT,MAAM,EAAE,MAAM,CAAC;QACf,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,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AAuB;IACvB,KAAK,EAAE,MAAM,CAAC;IAEd,4BAA4B;IAC5B,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAEnC,iCAAiC;IACjC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"vectors.js","sourceRoot":"","sources":["../../src/types/vectors.ts"],"names":[],"mappings":"AAAA;;GAEG"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store Configuration
|
|
3
|
+
*/
|
|
4
|
+
import type { VectorStoreConfig, VectorStoreConfigInput } from '../types';
|
|
5
|
+
/**
|
|
6
|
+
* Default vector store configuration (in-memory for dev)
|
|
7
|
+
*/
|
|
8
|
+
export declare const DEFAULT_VECTOR_STORE_CONFIG: VectorStoreConfig;
|
|
9
|
+
/**
|
|
10
|
+
* Create vector store configuration from input
|
|
11
|
+
*/
|
|
12
|
+
export declare function createVectorStoreConfig(input?: VectorStoreConfigInput): VectorStoreConfig;
|
|
13
|
+
//# sourceMappingURL=config.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/vectors/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,iBAKzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,uBAAuB,CAAC,KAAK,CAAC,EAAE,sBAAsB,GAAG,iBAAiB,CAOzF"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store Configuration
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Default vector store configuration (in-memory for dev)
|
|
6
|
+
*/
|
|
7
|
+
export const DEFAULT_VECTOR_STORE_CONFIG = {
|
|
8
|
+
provider: 'memory',
|
|
9
|
+
indexName: 'default',
|
|
10
|
+
dimensions: 1536,
|
|
11
|
+
metric: 'cosine',
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Create vector store configuration from input
|
|
15
|
+
*/
|
|
16
|
+
export function createVectorStoreConfig(input) {
|
|
17
|
+
if (!input)
|
|
18
|
+
return DEFAULT_VECTOR_STORE_CONFIG;
|
|
19
|
+
return {
|
|
20
|
+
...DEFAULT_VECTOR_STORE_CONFIG,
|
|
21
|
+
...input,
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=config.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/vectors/config.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAsB;IAC5D,QAAQ,EAAE,QAAQ;IAClB,SAAS,EAAE,SAAS;IACpB,UAAU,EAAE,IAAI;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAC;AAEF;;GAEG;AACH,MAAM,UAAU,uBAAuB,CAAC,KAA8B;IACpE,IAAI,CAAC,KAAK;QAAE,OAAO,2BAA2B,CAAC;IAE/C,OAAO;QACL,GAAG,2BAA2B;QAC9B,GAAG,KAAK;KACT,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store
|
|
3
|
+
*
|
|
4
|
+
* Utilities for vector storage and similarity search.
|
|
5
|
+
*/
|
|
6
|
+
export { createVectorStoreConfig, DEFAULT_VECTOR_STORE_CONFIG } from './config';
|
|
7
|
+
export { createVectorStore } from './store';
|
|
8
|
+
export type { VectorStore } from './store';
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vectors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAC5C,YAAY,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vectors/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,uBAAuB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAC;AAChF,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store
|
|
3
|
+
*
|
|
4
|
+
* Unified interface for vector storage across providers.
|
|
5
|
+
*/
|
|
6
|
+
import type { VectorStoreConfig, Vector, VectorQuery, VectorSearchResult } from '../types';
|
|
7
|
+
/**
|
|
8
|
+
* Vector store interface
|
|
9
|
+
*/
|
|
10
|
+
export interface VectorStore {
|
|
11
|
+
/** Upsert vectors */
|
|
12
|
+
upsert(vectors: Vector[]): Promise<void>;
|
|
13
|
+
/** Search for similar vectors */
|
|
14
|
+
search(query: VectorQuery): Promise<VectorSearchResult[]>;
|
|
15
|
+
/** Delete vectors by ID */
|
|
16
|
+
delete(ids: string[]): Promise<void>;
|
|
17
|
+
/** Get vectors by ID */
|
|
18
|
+
fetch(ids: string[]): Promise<Vector[]>;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Create a vector store for the configured provider
|
|
22
|
+
*/
|
|
23
|
+
export declare function createVectorStore(config: VectorStoreConfig): VectorStore;
|
|
24
|
+
//# sourceMappingURL=store.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../src/vectors/store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,UAAU,CAAC;AAE3F;;GAEG;AACH,MAAM,WAAW,WAAW;IAC1B,qBAAqB;IACrB,MAAM,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAEzC,iCAAiC;IACjC,MAAM,CAAC,KAAK,EAAE,WAAW,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAE1D,2BAA2B;IAC3B,MAAM,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAErC,wBAAwB;IACxB,KAAK,CAAC,GAAG,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;CACzC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,MAAM,EAAE,iBAAiB,GAAG,WAAW,CAWxE"}
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Vector Store
|
|
3
|
+
*
|
|
4
|
+
* Unified interface for vector storage across providers.
|
|
5
|
+
*/
|
|
6
|
+
/**
|
|
7
|
+
* Create a vector store for the configured provider
|
|
8
|
+
*/
|
|
9
|
+
export function createVectorStore(config) {
|
|
10
|
+
switch (config.provider) {
|
|
11
|
+
case 'memory':
|
|
12
|
+
return createMemoryStore(config);
|
|
13
|
+
case 'pinecone':
|
|
14
|
+
return createPineconeStore(config);
|
|
15
|
+
case 'pgvector':
|
|
16
|
+
return createPgVectorStore(config);
|
|
17
|
+
default:
|
|
18
|
+
throw new Error(`Unsupported vector store provider: ${config.provider}`);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* In-memory vector store (for development/testing)
|
|
23
|
+
*/
|
|
24
|
+
function createMemoryStore(config) {
|
|
25
|
+
const vectors = new Map();
|
|
26
|
+
return {
|
|
27
|
+
async upsert(newVectors) {
|
|
28
|
+
for (const v of newVectors) {
|
|
29
|
+
vectors.set(v.id, v);
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
async search(query) {
|
|
33
|
+
const results = [];
|
|
34
|
+
for (const [id, vector] of vectors) {
|
|
35
|
+
const score = cosineSimilarity(query.vector, vector.values);
|
|
36
|
+
if (query.minScore && score < query.minScore)
|
|
37
|
+
continue;
|
|
38
|
+
results.push({
|
|
39
|
+
id,
|
|
40
|
+
score,
|
|
41
|
+
metadata: query.includeMetadata ? vector.metadata : undefined,
|
|
42
|
+
values: query.includeValues ? vector.values : undefined,
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
return results
|
|
46
|
+
.sort((a, b) => b.score - a.score)
|
|
47
|
+
.slice(0, query.topK);
|
|
48
|
+
},
|
|
49
|
+
async delete(ids) {
|
|
50
|
+
for (const id of ids) {
|
|
51
|
+
vectors.delete(id);
|
|
52
|
+
}
|
|
53
|
+
},
|
|
54
|
+
async fetch(ids) {
|
|
55
|
+
return ids
|
|
56
|
+
.map(id => vectors.get(id))
|
|
57
|
+
.filter((v) => v !== undefined);
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* Pinecone vector store
|
|
63
|
+
*/
|
|
64
|
+
function createPineconeStore(config) {
|
|
65
|
+
if (!config.pinecone?.apiKey) {
|
|
66
|
+
throw new Error('Pinecone API key is required');
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
async upsert(vectors) {
|
|
70
|
+
const { Pinecone } = await import('@pinecone-database/pinecone');
|
|
71
|
+
const client = new Pinecone({ apiKey: config.pinecone.apiKey });
|
|
72
|
+
const index = client.index(config.indexName);
|
|
73
|
+
await index.upsert(vectors.map(v => ({
|
|
74
|
+
id: v.id,
|
|
75
|
+
values: v.values,
|
|
76
|
+
metadata: v.metadata,
|
|
77
|
+
})));
|
|
78
|
+
},
|
|
79
|
+
async search(query) {
|
|
80
|
+
const { Pinecone } = await import('@pinecone-database/pinecone');
|
|
81
|
+
const client = new Pinecone({ apiKey: config.pinecone.apiKey });
|
|
82
|
+
const index = client.index(config.indexName);
|
|
83
|
+
const results = await index.query({
|
|
84
|
+
vector: query.vector,
|
|
85
|
+
topK: query.topK,
|
|
86
|
+
includeMetadata: query.includeMetadata,
|
|
87
|
+
includeValues: query.includeValues,
|
|
88
|
+
filter: query.filter,
|
|
89
|
+
});
|
|
90
|
+
return (results.matches || [])
|
|
91
|
+
.filter(m => !query.minScore || (m.score && m.score >= query.minScore))
|
|
92
|
+
.map(m => ({
|
|
93
|
+
id: m.id,
|
|
94
|
+
score: m.score || 0,
|
|
95
|
+
metadata: m.metadata,
|
|
96
|
+
values: m.values,
|
|
97
|
+
}));
|
|
98
|
+
},
|
|
99
|
+
async delete(ids) {
|
|
100
|
+
const { Pinecone } = await import('@pinecone-database/pinecone');
|
|
101
|
+
const client = new Pinecone({ apiKey: config.pinecone.apiKey });
|
|
102
|
+
const index = client.index(config.indexName);
|
|
103
|
+
await index.deleteMany(ids);
|
|
104
|
+
},
|
|
105
|
+
async fetch(ids) {
|
|
106
|
+
const { Pinecone } = await import('@pinecone-database/pinecone');
|
|
107
|
+
const client = new Pinecone({ apiKey: config.pinecone.apiKey });
|
|
108
|
+
const index = client.index(config.indexName);
|
|
109
|
+
const results = await index.fetch(ids);
|
|
110
|
+
return Object.entries(results.records || {}).map(([id, record]) => ({
|
|
111
|
+
id,
|
|
112
|
+
values: record.values,
|
|
113
|
+
metadata: record.metadata,
|
|
114
|
+
}));
|
|
115
|
+
},
|
|
116
|
+
};
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* pgvector store (PostgreSQL)
|
|
120
|
+
*/
|
|
121
|
+
function createPgVectorStore(config) {
|
|
122
|
+
if (!config.pgvector?.connectionString) {
|
|
123
|
+
throw new Error('pgvector connection string is required');
|
|
124
|
+
}
|
|
125
|
+
const tableName = config.pgvector.tableName || 'vectors';
|
|
126
|
+
return {
|
|
127
|
+
async upsert(_vectors) {
|
|
128
|
+
// Implementation requires pg client
|
|
129
|
+
throw new Error('pgvector upsert requires pg client - use with your database connection');
|
|
130
|
+
},
|
|
131
|
+
async search(_query) {
|
|
132
|
+
throw new Error('pgvector search requires pg client - use with your database connection');
|
|
133
|
+
},
|
|
134
|
+
async delete(_ids) {
|
|
135
|
+
throw new Error('pgvector delete requires pg client - use with your database connection');
|
|
136
|
+
},
|
|
137
|
+
async fetch(_ids) {
|
|
138
|
+
throw new Error('pgvector fetch requires pg client - use with your database connection');
|
|
139
|
+
},
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Calculate cosine similarity between two vectors
|
|
144
|
+
*/
|
|
145
|
+
function cosineSimilarity(a, b) {
|
|
146
|
+
let dotProduct = 0;
|
|
147
|
+
let normA = 0;
|
|
148
|
+
let normB = 0;
|
|
149
|
+
for (let i = 0; i < a.length; i++) {
|
|
150
|
+
dotProduct += a[i] * b[i];
|
|
151
|
+
normA += a[i] * a[i];
|
|
152
|
+
normB += b[i] * b[i];
|
|
153
|
+
}
|
|
154
|
+
return dotProduct / (Math.sqrt(normA) * Math.sqrt(normB));
|
|
155
|
+
}
|
|
156
|
+
//# sourceMappingURL=store.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"store.js","sourceRoot":"","sources":["../../src/vectors/store.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAqBH;;GAEG;AACH,MAAM,UAAU,iBAAiB,CAAC,MAAyB;IACzD,QAAQ,MAAM,CAAC,QAAQ,EAAE,CAAC;QACxB,KAAK,QAAQ;YACX,OAAO,iBAAiB,CAAC,MAAM,CAAC,CAAC;QACnC,KAAK,UAAU;YACb,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACrC,KAAK,UAAU;YACb,OAAO,mBAAmB,CAAC,MAAM,CAAC,CAAC;QACrC;YACE,MAAM,IAAI,KAAK,CAAC,sCAAsC,MAAM,CAAC,QAAQ,E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AAK,CAAC,IAAc;YACxB,MAAM,IAAI,KAAK,CAAC,uEAAuE,CAAC,CAAC;QAC3F,CAAC;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB,CAAC,CAAW,EAAE,CAAW;IAChD,IAAI,UAAU,GAAG,CAAC,CAAC;IACnB,IAAI,KAAK,GAAG,CAAC,CAAC;IACd,IAAI,KAAK,GAAG,CAAC,CAAC;IAEd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QAClC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QAC1B,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;QACrB,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;IACvB,CAAC;IAED,OAAO,UAAU,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG,IAAI,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC;AAC5D,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@venturekit/ai",
|
|
3
|
+
"version": "0.0.0-dev.20260307234057",
|
|
4
|
+
"description": "AI utilities for VentureKit - embeddings, RAG, and agents",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
|
+
"types": "./dist/index.d.ts",
|
|
8
|
+
"files": [
|
|
9
|
+
"dist"
|
|
10
|
+
],
|
|
11
|
+
"repository": {
|
|
12
|
+
"type": "git",
|
|
13
|
+
"url": "https://github.com/venturekit-dev/venturekit.private.git",
|
|
14
|
+
"directory": "packages/ai"
|
|
15
|
+
},
|
|
16
|
+
"publishConfig": {
|
|
17
|
+
"registry": "https://registry.npmjs.org",
|
|
18
|
+
"access": "public"
|
|
19
|
+
},
|
|
20
|
+
"license": "Apache-2.0",
|
|
21
|
+
"exports": {
|
|
22
|
+
".": {
|
|
23
|
+
"import": "./dist/index.js",
|
|
24
|
+
"types": "./dist/index.d.ts"
|
|
25
|
+
}
|
|
26
|
+
},
|
|
27
|
+
"keywords": [
|
|
28
|
+
"venturekit",
|
|
29
|
+
"saas",
|
|
30
|
+
"ai",
|
|
31
|
+
"embeddings",
|
|
32
|
+
"rag"
|
|
33
|
+
],
|
|
34
|
+
"dependencies": {
|
|
35
|
+
"@venturekit/core": "0.0.0-dev.20260307234057"
|
|
36
|
+
},
|
|
37
|
+
"peerDependencies": {
|
|
38
|
+
"@aws-sdk/client-bedrock-runtime": "^3.0.0",
|
|
39
|
+
"@pinecone-database/pinecone": "^4.0.0",
|
|
40
|
+
"openai": "^4.0.0"
|
|
41
|
+
},
|
|
42
|
+
"peerDependenciesMeta": {
|
|
43
|
+
"@aws-sdk/client-bedrock-runtime": {
|
|
44
|
+
"optional": true
|
|
45
|
+
},
|
|
46
|
+
"@pinecone-database/pinecone": {
|
|
47
|
+
"optional": true
|
|
48
|
+
},
|
|
49
|
+
"openai": {
|
|
50
|
+
"optional": true
|
|
51
|
+
}
|
|
52
|
+
},
|
|
53
|
+
"devDependencies": {
|
|
54
|
+
"@pinecone-database/pinecone": "^4.0.0",
|
|
55
|
+
"@types/node": "^20.10.0",
|
|
56
|
+
"typescript": "^5.3.0"
|
|
57
|
+
},
|
|
58
|
+
"scripts": {
|
|
59
|
+
"build": "tsc",
|
|
60
|
+
"dev": "tsc --watch",
|
|
61
|
+
"clean": "rm -rf dist"
|
|
62
|
+
}
|
|
63
|
+
}
|