@lov3kaizen/agentsea-embeddings 1.0.1 → 1.1.1
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/dist/caching/index.js +7 -1
- package/dist/caching/index.mjs +1 -1
- package/dist/chunk-2TCNSTX3.mjs +12 -0
- package/dist/{chunk-NBHIRTJT.mjs → chunk-5GTQFVEI.mjs} +41 -1
- package/dist/chunk-JHWMXQ56.mjs +1650 -0
- package/dist/{chunk-VPSMDBHH.mjs → chunk-MNJPAUDC.mjs} +7 -1
- package/dist/{chunk-DJAURHAS.mjs → chunk-U6EYWYUD.mjs} +31 -1
- package/dist/chunking/index.js +33 -4
- package/dist/chunking/index.mjs +1 -1
- package/dist/{index-DmEEUzJg.d.mts → index-DGzfvyHY.d.mts} +3 -0
- package/dist/{index-G-KgyvZT.d.ts → index-_uJcyK8e.d.ts} +3 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +848 -16
- package/dist/index.mjs +22 -22
- package/dist/providers/index.d.mts +1 -1
- package/dist/providers/index.d.ts +1 -1
- package/dist/providers/index.js +47 -1
- package/dist/providers/index.mjs +2 -1
- package/dist/stores/index.d.mts +255 -1
- package/dist/stores/index.d.ts +255 -1
- package/dist/stores/index.js +794 -7
- package/dist/stores/index.mjs +20 -3
- package/package.json +9 -6
- package/dist/chunk-TER262ST.mjs +0 -877
package/dist/stores/index.d.ts
CHANGED
|
@@ -138,6 +138,8 @@ interface DeleteOptions {
|
|
|
138
138
|
}
|
|
139
139
|
interface DeleteResult {
|
|
140
140
|
deletedCount: number;
|
|
141
|
+
countExact: boolean;
|
|
142
|
+
requestedCount?: number;
|
|
141
143
|
durationMs: number;
|
|
142
144
|
}
|
|
143
145
|
interface StoreQueryOptions extends SearchOptions {
|
|
@@ -293,6 +295,258 @@ declare class QdrantStore extends BaseStore {
|
|
|
293
295
|
}
|
|
294
296
|
declare function createQdrantStore(config: QdrantStoreConfig): QdrantStore;
|
|
295
297
|
|
|
298
|
+
interface PgPoolLike {
|
|
299
|
+
query(text: string, params?: unknown[]): Promise<{
|
|
300
|
+
rows: Array<Record<string, unknown>>;
|
|
301
|
+
rowCount: number | null;
|
|
302
|
+
}>;
|
|
303
|
+
end(): Promise<void>;
|
|
304
|
+
}
|
|
305
|
+
interface PgVectorStoreOptions extends PgVectorStoreConfig {
|
|
306
|
+
pool?: PgPoolLike;
|
|
307
|
+
}
|
|
308
|
+
declare class PgVectorStore extends BaseStore {
|
|
309
|
+
readonly storeType: VectorStoreType;
|
|
310
|
+
private pool?;
|
|
311
|
+
private readonly injectedPool?;
|
|
312
|
+
private readonly table;
|
|
313
|
+
private readonly vectorColumn;
|
|
314
|
+
private readonly contentColumn;
|
|
315
|
+
private readonly metadataColumn;
|
|
316
|
+
private readonly pgConfig;
|
|
317
|
+
private initialized;
|
|
318
|
+
constructor(config: PgVectorStoreOptions);
|
|
319
|
+
private get distanceOperator();
|
|
320
|
+
init(): Promise<void>;
|
|
321
|
+
private ensureInitialized;
|
|
322
|
+
private ident;
|
|
323
|
+
private toVectorLiteral;
|
|
324
|
+
upsert(records: VectorRecord[], options?: UpsertOptions): Promise<UpsertResult>;
|
|
325
|
+
query(vector: EmbeddingVector, options?: StoreQueryOptions): Promise<StoreQueryResult>;
|
|
326
|
+
delete(ids: string[], _options?: DeleteOptions): Promise<DeleteResult>;
|
|
327
|
+
deleteAll(_options?: DeleteOptions): Promise<DeleteResult>;
|
|
328
|
+
getStats(): Promise<StoreStats>;
|
|
329
|
+
checkHealth(): Promise<StoreHealth>;
|
|
330
|
+
close(): Promise<void>;
|
|
331
|
+
}
|
|
332
|
+
declare function createPgVectorStore(config: PgVectorStoreOptions): PgVectorStore;
|
|
333
|
+
|
|
334
|
+
interface WeaviateBackend {
|
|
335
|
+
ensureClass(className: string, dimensions?: number): Promise<void>;
|
|
336
|
+
upsert(className: string, objects: Array<{
|
|
337
|
+
id: string;
|
|
338
|
+
vector: number[];
|
|
339
|
+
properties: Record<string, unknown>;
|
|
340
|
+
}>): Promise<void>;
|
|
341
|
+
nearVector(className: string, vector: number[], limit: number, filter?: Record<string, unknown>): Promise<Array<{
|
|
342
|
+
id: string;
|
|
343
|
+
score: number;
|
|
344
|
+
properties: Record<string, unknown>;
|
|
345
|
+
}>>;
|
|
346
|
+
deleteByIds(className: string, ids: string[]): Promise<number>;
|
|
347
|
+
deleteAll(className: string): Promise<number>;
|
|
348
|
+
count(className: string): Promise<number>;
|
|
349
|
+
ping(): Promise<void>;
|
|
350
|
+
}
|
|
351
|
+
interface WeaviateStoreOptions extends WeaviateStoreConfig {
|
|
352
|
+
backend?: WeaviateBackend;
|
|
353
|
+
}
|
|
354
|
+
declare class WeaviateStore extends BaseStore {
|
|
355
|
+
readonly storeType: VectorStoreType;
|
|
356
|
+
private backend?;
|
|
357
|
+
private readonly injectedBackend?;
|
|
358
|
+
private readonly className;
|
|
359
|
+
private readonly url;
|
|
360
|
+
private readonly apiKey?;
|
|
361
|
+
private initialized;
|
|
362
|
+
constructor(config: WeaviateStoreOptions);
|
|
363
|
+
init(): Promise<void>;
|
|
364
|
+
private ensureInitialized;
|
|
365
|
+
private buildSdkBackend;
|
|
366
|
+
upsert(records: VectorRecord[], options?: UpsertOptions): Promise<UpsertResult>;
|
|
367
|
+
query(vector: EmbeddingVector, options?: StoreQueryOptions): Promise<StoreQueryResult>;
|
|
368
|
+
delete(ids: string[], _options?: DeleteOptions): Promise<DeleteResult>;
|
|
369
|
+
deleteAll(_options?: DeleteOptions): Promise<DeleteResult>;
|
|
370
|
+
getStats(): Promise<StoreStats>;
|
|
371
|
+
checkHealth(): Promise<StoreHealth>;
|
|
372
|
+
close(): Promise<void>;
|
|
373
|
+
}
|
|
374
|
+
interface WeaviateSdkClient {
|
|
375
|
+
schema: {
|
|
376
|
+
getter: () => {
|
|
377
|
+
do: () => Promise<{
|
|
378
|
+
classes?: Array<{
|
|
379
|
+
class: string;
|
|
380
|
+
}>;
|
|
381
|
+
}>;
|
|
382
|
+
};
|
|
383
|
+
classCreator: () => {
|
|
384
|
+
withClass: (c: unknown) => {
|
|
385
|
+
do: () => Promise<unknown>;
|
|
386
|
+
};
|
|
387
|
+
};
|
|
388
|
+
};
|
|
389
|
+
batch: {
|
|
390
|
+
objectsBatcher: () => WeaviateBatcher;
|
|
391
|
+
};
|
|
392
|
+
data: {
|
|
393
|
+
deleter: () => {
|
|
394
|
+
withClassName: (c: string) => {
|
|
395
|
+
withId: (id: string) => {
|
|
396
|
+
do: () => Promise<unknown>;
|
|
397
|
+
};
|
|
398
|
+
};
|
|
399
|
+
};
|
|
400
|
+
};
|
|
401
|
+
graphql: {
|
|
402
|
+
get: () => WeaviateGraphQLGet;
|
|
403
|
+
aggregate: () => WeaviateAggregate;
|
|
404
|
+
};
|
|
405
|
+
misc: {
|
|
406
|
+
liveChecker: () => {
|
|
407
|
+
do: () => Promise<unknown>;
|
|
408
|
+
};
|
|
409
|
+
};
|
|
410
|
+
}
|
|
411
|
+
interface WeaviateBatcher {
|
|
412
|
+
withObject: (o: unknown) => WeaviateBatcher;
|
|
413
|
+
do: () => Promise<unknown>;
|
|
414
|
+
}
|
|
415
|
+
interface WeaviateGraphQLGet {
|
|
416
|
+
withClassName: (c: string) => WeaviateGraphQLGet;
|
|
417
|
+
withFields: (f: string) => WeaviateGraphQLGet;
|
|
418
|
+
withNearVector: (v: unknown) => WeaviateGraphQLGet;
|
|
419
|
+
withWhere: (w: unknown) => WeaviateGraphQLGet;
|
|
420
|
+
withLimit: (n: number) => WeaviateGraphQLGet;
|
|
421
|
+
do: () => Promise<{
|
|
422
|
+
data?: Record<string, unknown>;
|
|
423
|
+
}>;
|
|
424
|
+
}
|
|
425
|
+
interface WeaviateAggregate {
|
|
426
|
+
withClassName: (c: string) => WeaviateAggregate;
|
|
427
|
+
withFields: (f: string) => WeaviateAggregate;
|
|
428
|
+
do: () => Promise<{
|
|
429
|
+
data?: Record<string, unknown>;
|
|
430
|
+
}>;
|
|
431
|
+
}
|
|
432
|
+
declare class WeaviateSdkBackend implements WeaviateBackend {
|
|
433
|
+
private readonly client;
|
|
434
|
+
constructor(client: WeaviateSdkClient);
|
|
435
|
+
ensureClass(className: string, _dimensions?: number): Promise<void>;
|
|
436
|
+
upsert(className: string, objects: Array<{
|
|
437
|
+
id: string;
|
|
438
|
+
vector: number[];
|
|
439
|
+
properties: Record<string, unknown>;
|
|
440
|
+
}>): Promise<void>;
|
|
441
|
+
nearVector(className: string, vector: number[], limit: number, filter?: Record<string, unknown>): Promise<Array<{
|
|
442
|
+
id: string;
|
|
443
|
+
score: number;
|
|
444
|
+
properties: Record<string, unknown>;
|
|
445
|
+
}>>;
|
|
446
|
+
deleteByIds(className: string, ids: string[]): Promise<number>;
|
|
447
|
+
deleteAll(className: string): Promise<number>;
|
|
448
|
+
count(className: string): Promise<number>;
|
|
449
|
+
ping(): Promise<void>;
|
|
450
|
+
private toWhere;
|
|
451
|
+
}
|
|
452
|
+
declare function createWeaviateStore(config: WeaviateStoreOptions): WeaviateStore;
|
|
453
|
+
|
|
454
|
+
interface MilvusBackend {
|
|
455
|
+
ensureCollection(collection: string, dimensions: number, metric: string): Promise<void>;
|
|
456
|
+
upsert(collection: string, rows: Array<{
|
|
457
|
+
id: string;
|
|
458
|
+
vector: number[];
|
|
459
|
+
text: string;
|
|
460
|
+
metadata: Record<string, unknown>;
|
|
461
|
+
}>): Promise<void>;
|
|
462
|
+
search(collection: string, vector: number[], limit: number, filter?: string): Promise<Array<{
|
|
463
|
+
id: string;
|
|
464
|
+
score: number;
|
|
465
|
+
text: string;
|
|
466
|
+
metadata: Record<string, unknown>;
|
|
467
|
+
}>>;
|
|
468
|
+
deleteByIds(collection: string, ids: string[]): Promise<number>;
|
|
469
|
+
deleteAll(collection: string): Promise<number>;
|
|
470
|
+
count(collection: string): Promise<number>;
|
|
471
|
+
ping(): Promise<void>;
|
|
472
|
+
}
|
|
473
|
+
interface MilvusStoreOptions extends MilvusStoreConfig {
|
|
474
|
+
backend?: MilvusBackend;
|
|
475
|
+
}
|
|
476
|
+
declare class MilvusStore extends BaseStore {
|
|
477
|
+
readonly storeType: VectorStoreType;
|
|
478
|
+
private backend?;
|
|
479
|
+
private readonly injectedBackend?;
|
|
480
|
+
private readonly collection;
|
|
481
|
+
private readonly milvusConfig;
|
|
482
|
+
private initialized;
|
|
483
|
+
constructor(config: MilvusStoreOptions);
|
|
484
|
+
private get metricType();
|
|
485
|
+
init(): Promise<void>;
|
|
486
|
+
private ensureInitialized;
|
|
487
|
+
private buildSdkBackend;
|
|
488
|
+
upsert(records: VectorRecord[], options?: UpsertOptions): Promise<UpsertResult>;
|
|
489
|
+
query(vector: EmbeddingVector, options?: StoreQueryOptions): Promise<StoreQueryResult>;
|
|
490
|
+
delete(ids: string[], _options?: DeleteOptions): Promise<DeleteResult>;
|
|
491
|
+
deleteAll(_options?: DeleteOptions): Promise<DeleteResult>;
|
|
492
|
+
getStats(): Promise<StoreStats>;
|
|
493
|
+
checkHealth(): Promise<StoreHealth>;
|
|
494
|
+
close(): Promise<void>;
|
|
495
|
+
private toExpr;
|
|
496
|
+
}
|
|
497
|
+
interface MilvusSdkClient {
|
|
498
|
+
hasCollection(p: {
|
|
499
|
+
collection_name: string;
|
|
500
|
+
}): Promise<{
|
|
501
|
+
value: boolean;
|
|
502
|
+
}>;
|
|
503
|
+
createCollection(p: unknown): Promise<unknown>;
|
|
504
|
+
createIndex(p: unknown): Promise<unknown>;
|
|
505
|
+
loadCollectionSync(p: {
|
|
506
|
+
collection_name: string;
|
|
507
|
+
}): Promise<unknown>;
|
|
508
|
+
insert(p: {
|
|
509
|
+
collection_name: string;
|
|
510
|
+
data: unknown[];
|
|
511
|
+
}): Promise<unknown>;
|
|
512
|
+
search(p: unknown): Promise<{
|
|
513
|
+
results: Array<Record<string, unknown>>;
|
|
514
|
+
}>;
|
|
515
|
+
deleteEntities(p: {
|
|
516
|
+
collection_name: string;
|
|
517
|
+
expr: string;
|
|
518
|
+
}): Promise<unknown>;
|
|
519
|
+
getCollectionStatistics(p: {
|
|
520
|
+
collection_name: string;
|
|
521
|
+
}): Promise<{
|
|
522
|
+
data?: {
|
|
523
|
+
row_count?: string | number;
|
|
524
|
+
};
|
|
525
|
+
}>;
|
|
526
|
+
}
|
|
527
|
+
declare class MilvusSdkBackend implements MilvusBackend {
|
|
528
|
+
private readonly client;
|
|
529
|
+
constructor(client: MilvusSdkClient);
|
|
530
|
+
ensureCollection(collection: string, dimensions: number, metric: string): Promise<void>;
|
|
531
|
+
upsert(collection: string, rows: Array<{
|
|
532
|
+
id: string;
|
|
533
|
+
vector: number[];
|
|
534
|
+
text: string;
|
|
535
|
+
metadata: Record<string, unknown>;
|
|
536
|
+
}>): Promise<void>;
|
|
537
|
+
search(collection: string, vector: number[], limit: number, filter?: string): Promise<Array<{
|
|
538
|
+
id: string;
|
|
539
|
+
score: number;
|
|
540
|
+
text: string;
|
|
541
|
+
metadata: Record<string, unknown>;
|
|
542
|
+
}>>;
|
|
543
|
+
deleteByIds(collection: string, ids: string[]): Promise<number>;
|
|
544
|
+
deleteAll(collection: string): Promise<number>;
|
|
545
|
+
count(collection: string): Promise<number>;
|
|
546
|
+
ping(): Promise<void>;
|
|
547
|
+
}
|
|
548
|
+
declare function createMilvusStore(config: MilvusStoreOptions): MilvusStore;
|
|
549
|
+
|
|
296
550
|
declare function createStore(type: VectorStoreType, config: StoreConfig): BaseStore;
|
|
297
551
|
|
|
298
|
-
export { BaseStore, ChromaStore, type ChromaStoreConfig, type CollectionInfo, type DeleteOptions, type DeleteResult, type DistanceMetric, type IndexInfo, MemoryStore, type MemoryStoreConfig, type MilvusStoreConfig, type PgVectorStoreConfig, PineconeStore, type PineconeStoreConfig, QdrantStore, type QdrantStoreConfig, type StoreConfig, type StoreFactoryOptions, type StoreHealth, type StoreQueryOptions, type StoreQueryResult, type StoreStats, type StoredVector, type UpsertOptions, type UpsertResult, type VectorRecord, type VectorStoreType, type WeaviateStoreConfig, createChromaStore, createMemoryStore, createPineconeStore, createQdrantStore, createStore };
|
|
552
|
+
export { BaseStore, ChromaStore, type ChromaStoreConfig, type CollectionInfo, type DeleteOptions, type DeleteResult, type DistanceMetric, type IndexInfo, MemoryStore, type MemoryStoreConfig, type MilvusBackend, MilvusSdkBackend, MilvusStore, type MilvusStoreConfig, type MilvusStoreOptions, type PgPoolLike, PgVectorStore, type PgVectorStoreConfig, type PgVectorStoreOptions, PineconeStore, type PineconeStoreConfig, QdrantStore, type QdrantStoreConfig, type StoreConfig, type StoreFactoryOptions, type StoreHealth, type StoreQueryOptions, type StoreQueryResult, type StoreStats, type StoredVector, type UpsertOptions, type UpsertResult, type VectorRecord, type VectorStoreType, type WeaviateBackend, WeaviateSdkBackend, WeaviateStore, type WeaviateStoreConfig, type WeaviateStoreOptions, createChromaStore, createMemoryStore, createMilvusStore, createPgVectorStore, createPineconeStore, createQdrantStore, createStore, createWeaviateStore };
|