@eltjs/vectorizer 0.0.0-stage → 0.13.8

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.
@@ -0,0 +1,2 @@
1
+ import type { Connection, Copy, Destination, Target } from '@eltjs/elt';
2
+ export declare function copiesInto<Into extends Target>(connections: readonly Connection<Into>[], holds: (destination: Destination<Into>) => boolean): readonly Copy<Into>[];
package/dist/copies.js ADDED
@@ -0,0 +1,8 @@
1
+ // The copies of the pipeline that load into the destination that holds a
2
+ // vectorizer's relations, which holds tells by the engine's own test: the
3
+ // same SQLite file, or the same Postgres database.
4
+ export function copiesInto(connections, holds) {
5
+ return connections
6
+ .filter(({ destination }) => holds(destination))
7
+ .flatMap(({ steps }) => steps);
8
+ }
@@ -0,0 +1,18 @@
1
+ import type { Copy, Target } from '@eltjs/elt';
2
+ import { type Loading, type SourceKey } from './options.ts';
3
+ type SourceTable = Target & {
4
+ readonly name: string;
5
+ readonly columns: readonly {
6
+ readonly name: string;
7
+ }[];
8
+ };
9
+ export declare function refuseUndeclaredColumns<Into extends SourceTable>({ vectorizer, from, copies, destination, key, metadata, loading, }: {
10
+ readonly vectorizer: string;
11
+ readonly from: Into;
12
+ readonly copies: readonly Copy<Into>[];
13
+ readonly destination: string;
14
+ readonly key: SourceKey;
15
+ readonly metadata: readonly string[];
16
+ readonly loading: Loading;
17
+ }): void;
18
+ export {};
@@ -0,0 +1,23 @@
1
+ import { keyColumns } from './options.js';
2
+ // Refuses, before any read, a vectorizer whose table no copy into its
3
+ // destination loads, and a key, metadata or loading column that the copy's
4
+ // stream or the table does not declare. copies are the copies into the
5
+ // destination of the vectorizer, which each engine finds by its own test
6
+ // (copiesInto), and destination names that destination in the refusal, such
7
+ // as the path of a SQLite file.
8
+ export function refuseUndeclaredColumns({ vectorizer, from, copies, destination, key, metadata, loading, }) {
9
+ const copy = copies.find(({ to }) => to === from);
10
+ if (copy === undefined)
11
+ throw new TypeError(`Vectorizer ${vectorizer} reads ${from.name}, which no copy of the pipeline loads into ${destination}`);
12
+ const declared = new Set([
13
+ ...Object.keys(copy.from.jsonSchema.properties ?? {}),
14
+ ...from.columns.map(({ name }) => name),
15
+ ]);
16
+ for (const column of [
17
+ ...keyColumns(key),
18
+ ...metadata,
19
+ ...('columns' in loading ? loading.columns : [loading.file]),
20
+ ])
21
+ if (!declared.has(column))
22
+ throw new TypeError(`Vectorizer ${vectorizer} reads the column ${column} of ${from.name}, which the stream ${copy.from.name} does not declare`);
23
+ }
@@ -0,0 +1,28 @@
1
+ import type { EmbeddingModel } from 'ai';
2
+ import type { Tokenizer } from '@eltjs/chunking';
3
+ import type { DocumentParser, FileStorage, PipelineClock } from '@eltjs/elt';
4
+ export type SourceKey = string | readonly [string, string, ...string[]];
5
+ export type Loading = {
6
+ readonly columns: readonly [string, ...string[]];
7
+ } | {
8
+ readonly file: string;
9
+ readonly files: FileStorage;
10
+ readonly parser: () => DocumentParser;
11
+ };
12
+ export type ChunkingOptions = {
13
+ readonly tokenizer: Tokenizer;
14
+ readonly maxTokens: number;
15
+ readonly overlapTokens: number;
16
+ } | 'none';
17
+ export type EmbeddingOptions = {
18
+ readonly model: EmbeddingModel;
19
+ readonly dimensions: number;
20
+ readonly clock: Pick<PipelineClock, 'setTimeout' | 'clearTimeout'>;
21
+ };
22
+ export declare function keyColumns(key: SourceKey): readonly [string, ...string[]];
23
+ export declare function refuseColumns({ vectorizer, key, metadata, contract, }: {
24
+ readonly vectorizer: string;
25
+ readonly key: SourceKey;
26
+ readonly metadata: readonly string[];
27
+ readonly contract: readonly string[];
28
+ }): void;
@@ -0,0 +1,20 @@
1
+ // The columns of the key, in order.
2
+ export function keyColumns(key) {
3
+ return typeof key === 'string' ? [key] : key;
4
+ }
5
+ // Refuses a key column listed twice, a metadata column listed twice, and a
6
+ // metadata column that has the name of a column of the contract, which it
7
+ // would replace. Names compare as the engine compares them: in ASCII case.
8
+ export function refuseColumns({ vectorizer, key, metadata, contract, }) {
9
+ const fold = (name) => name.replaceAll(/[A-Z]/g, (letter) => letter.toLowerCase());
10
+ const repeated = (names) => names.find((name, index) => names.slice(0, index).some((before) => fold(before) === fold(name)));
11
+ const repeatedKey = repeated(keyColumns(key));
12
+ if (repeatedKey !== undefined)
13
+ throw new TypeError(`Vectorizer ${vectorizer} lists the key column ${repeatedKey} twice`);
14
+ const repeatedMetadata = repeated(metadata);
15
+ if (repeatedMetadata !== undefined)
16
+ throw new TypeError(`Vectorizer ${vectorizer} lists the metadata column ${repeatedMetadata} twice`);
17
+ const taken = metadata.find((name) => contract.some((column) => fold(column) === fold(name)));
18
+ if (taken !== undefined)
19
+ throw new TypeError(`Vectorizer ${vectorizer} cannot give the metadata column ${taken}: the passages have a column of that name (${contract.join(', ')})`);
20
+ }
@@ -0,0 +1,90 @@
1
+ import { Chunking } from '@eltjs/chunking';
2
+ import { type LoadedRow, type RuleValues, TableRule, type TableRuleResult } from '@eltjs/elt';
3
+ import { type ChunkingOptions, type SourceKey } from './options.ts';
4
+ export declare function sourceOf(key: SourceKey): (row: LoadedRow) => string | null;
5
+ type PassageInput = string | {
6
+ readonly source: string;
7
+ readonly text: string;
8
+ };
9
+ export declare function passageRule({ key, fields, chunking, maxIdLength, }: {
10
+ readonly key: SourceKey;
11
+ readonly fields: readonly [string, ...string[]];
12
+ readonly chunking: ChunkingOptions;
13
+ readonly maxIdLength?: number;
14
+ }): PassageChunks | OnePart;
15
+ export declare class PassageChunks extends TableRule<PassageInput, Chunking['output'], Chunking['place']> {
16
+ #private;
17
+ readonly key: {
18
+ name: string;
19
+ description: string;
20
+ };
21
+ readonly output: Chunking['output'];
22
+ readonly place: Chunking['place'];
23
+ readonly batch: number;
24
+ readonly concurrency: number;
25
+ constructor({ key, fields, chunking, maxIdLength, }: {
26
+ key: SourceKey;
27
+ fields: readonly [string, ...string[]];
28
+ chunking: Exclude<ChunkingOptions, 'none'>;
29
+ maxIdLength: number | undefined;
30
+ });
31
+ read(row: LoadedRow): {
32
+ readonly key: string;
33
+ readonly input: PassageInput;
34
+ } | null;
35
+ identity(): Promise<string>;
36
+ compute(inputs: readonly PassageInput[]): Promise<readonly TableRuleResult<RuleValues<Chunking['output']> & RuleValues<Chunking['place']>>[]>;
37
+ }
38
+ declare const whole: {
39
+ readonly text: {
40
+ readonly type: 'text';
41
+ readonly description: 'The text of the passage: the whole text of its row.';
42
+ };
43
+ };
44
+ declare const span: {
45
+ readonly start: {
46
+ readonly type: 'integer';
47
+ readonly description: 'The offset of the first code point of the passage: 0.';
48
+ };
49
+ readonly end: {
50
+ readonly type: 'integer';
51
+ readonly description: 'The offset after the last code point of the passage: the count of code points of the text.';
52
+ };
53
+ };
54
+ export declare class OnePart extends TableRule<PassageInput, typeof whole, typeof span> {
55
+ #private;
56
+ readonly key: {
57
+ name: string;
58
+ description: string;
59
+ };
60
+ readonly output: {
61
+ readonly text: {
62
+ readonly type: 'text';
63
+ readonly description: 'The text of the passage: the whole text of its row.';
64
+ };
65
+ };
66
+ readonly place: {
67
+ readonly start: {
68
+ readonly type: 'integer';
69
+ readonly description: 'The offset of the first code point of the passage: 0.';
70
+ };
71
+ readonly end: {
72
+ readonly type: 'integer';
73
+ readonly description: 'The offset after the last code point of the passage: the count of code points of the text.';
74
+ };
75
+ };
76
+ readonly batch = 32;
77
+ readonly concurrency = 1;
78
+ constructor({ key, fields, maxIdLength, }: {
79
+ key: SourceKey;
80
+ fields: readonly [string, ...string[]];
81
+ maxIdLength: number | undefined;
82
+ });
83
+ read(row: LoadedRow): {
84
+ readonly key: string;
85
+ readonly input: PassageInput;
86
+ } | null;
87
+ identity(): Promise<string>;
88
+ compute(inputs: readonly PassageInput[]): Promise<readonly TableRuleResult<RuleValues<typeof whole> & RuleValues<typeof span>>[]>;
89
+ }
90
+ export {};
@@ -0,0 +1,156 @@
1
+ import { Chunking } from '@eltjs/chunking';
2
+ import { TableRule, rowText, } from '@eltjs/elt';
3
+ import manifest from '../package.json' with { type: 'json' };
4
+ import { keyColumns } from './options.js';
5
+ // The key column of the chunks of a vectorizer, which Passage.source reads.
6
+ const source = {
7
+ name: 'source',
8
+ description: 'The key of the source row that the passage is cut from: the value of its key column, or the JSON array of the values of its key columns.',
9
+ };
10
+ // Passage.source of a loaded row, or null when the row has no key: the
11
+ // plain value of a key of one column, or the JSON array of the values of a
12
+ // key of several columns, as the destination reads them back (ADR 0001).
13
+ export function sourceOf(key) {
14
+ if (typeof key === 'string')
15
+ return (row) => {
16
+ const value = row[key];
17
+ return typeof value === 'string' || typeof value === 'number'
18
+ ? String(value)
19
+ : null;
20
+ };
21
+ const columns = keyColumns(key);
22
+ return (row) => {
23
+ const values = columns.map((column) => row[column]);
24
+ return values.some((value) => value === null || value === undefined)
25
+ ? null
26
+ : JSON.stringify(values);
27
+ };
28
+ }
29
+ // The rule that cuts the text of the fields of each source row: the chunks of
30
+ // @eltjs/chunking, or one passage for each row. maxIdLength: the most UTF-16
31
+ // units of a passage id <source>:<seq> that the destination holds, such as
32
+ // 450 on SQL Server; none when absent.
33
+ export function passageRule({ key, fields, chunking, maxIdLength, }) {
34
+ return chunking === 'none'
35
+ ? new OnePart({ key, fields, maxIdLength })
36
+ : new PassageChunks({ key, fields, chunking, maxIdLength });
37
+ }
38
+ // The chunks of Chunking, keyed by the source of each row (a Decorator):
39
+ // Chunking cuts and names what made the chunks; the vectorizer reads the key,
40
+ // which may span several columns.
41
+ export class PassageChunks extends TableRule {
42
+ key = source;
43
+ output;
44
+ place;
45
+ batch;
46
+ concurrency;
47
+ #chunking;
48
+ #source;
49
+ #fields;
50
+ #maxIdLength;
51
+ constructor({ key, fields, chunking, maxIdLength, }) {
52
+ super();
53
+ this.#chunking = new Chunking({ ...chunking, key: source.name, fields });
54
+ this.output = this.#chunking.output;
55
+ this.place = this.#chunking.place;
56
+ this.batch = this.#chunking.batch;
57
+ this.concurrency = this.#chunking.concurrency;
58
+ this.#source = sourceOf(key);
59
+ this.#fields = Object.freeze([...fields]);
60
+ this.#maxIdLength = maxIdLength;
61
+ Object.freeze(this);
62
+ }
63
+ read(row) {
64
+ return readPassage(row, this.#source, this.#fields, this.#maxIdLength);
65
+ }
66
+ identity() {
67
+ return this.#chunking.identity();
68
+ }
69
+ async compute(inputs) {
70
+ const results = await this.#chunking.compute(inputs.map(textOf));
71
+ return results.map((result, index) => fitIds(inputs[index], result, this.#maxIdLength));
72
+ }
73
+ }
74
+ const whole = {
75
+ text: {
76
+ type: 'text',
77
+ description: 'The text of the passage: the whole text of its row.',
78
+ },
79
+ };
80
+ const span = {
81
+ start: {
82
+ type: 'integer',
83
+ description: 'The offset of the first code point of the passage: 0.',
84
+ },
85
+ end: {
86
+ type: 'integer',
87
+ description: 'The offset after the last code point of the passage: the count of code points of the text.',
88
+ },
89
+ };
90
+ // One passage for each row, its whole text, so the passages of every chunking
91
+ // are rows of one parts table and one SQL reads them (pgai chunking_none).
92
+ // Offsets count code points, as ContextWindow of @zukhruf/retrieval merges
93
+ // by them.
94
+ export class OnePart extends TableRule {
95
+ key = source;
96
+ output = whole;
97
+ place = span;
98
+ // Taking the text is synchronous work, as cutting it is.
99
+ batch = 32;
100
+ concurrency = 1;
101
+ #source;
102
+ #fields;
103
+ #maxIdLength;
104
+ constructor({ key, fields, maxIdLength, }) {
105
+ super();
106
+ this.#source = sourceOf(key);
107
+ this.#fields = Object.freeze([...fields]);
108
+ this.#maxIdLength = maxIdLength;
109
+ Object.freeze(this);
110
+ }
111
+ read(row) {
112
+ return readPassage(row, this.#source, this.#fields, this.#maxIdLength);
113
+ }
114
+ // The code makes every passage, so its version names them (elt ADR 0005).
115
+ async identity() {
116
+ return `${manifest.name}@${manifest.version} none`;
117
+ }
118
+ async compute(inputs) {
119
+ return inputs.map((input) => {
120
+ const text = textOf(input);
121
+ return fitIds(input, { parts: [{ text, start: 0, end: [...text].length }] }, this.#maxIdLength);
122
+ });
123
+ }
124
+ }
125
+ // The source and the text of a row as the input of a passage rule: the text
126
+ // alone when the ids have no most length, so the input hash of a host with no
127
+ // limit stays the hash of its text.
128
+ function readPassage(row, source, fields, maxIdLength) {
129
+ const key = source(row);
130
+ if (key === null)
131
+ return null;
132
+ const text = rowText(row, fields);
133
+ if (text === null)
134
+ return null;
135
+ return {
136
+ key,
137
+ input: maxIdLength === undefined ? text : { source: key, text },
138
+ };
139
+ }
140
+ const textOf = (input) => typeof input === 'object' ? input.text : String(input);
141
+ // The result of an input, or a rule failure of the input when the id of its
142
+ // last passage, <source>:<seq>, has more UTF-16 units than maxIdLength, the
143
+ // unit that NVARCHAR(n) of SQL Server counts. The other inputs go on, and no
144
+ // part of the input reaches the keyword index.
145
+ function fitIds(input, result, maxIdLength) {
146
+ if (maxIdLength === undefined ||
147
+ typeof input !== 'object' ||
148
+ !('parts' in result))
149
+ return result;
150
+ const length = `${input.source}:${result.parts.length - 1}`.length;
151
+ return length > maxIdLength
152
+ ? {
153
+ error: `The passage ids of this source row have up to ${length} characters, more than ${maxIdLength}, the most that the passage ids of the destination hold: give the vectorizer a shorter source key.`,
154
+ }
155
+ : result;
156
+ }
@@ -0,0 +1,18 @@
1
+ import { type Connection, DerivedDataset, type PipelineClock } from '@eltjs/elt';
2
+ import { PostgresDestination, type PostgresTable } from '@eltjs/elt-postgresql';
3
+ export declare class KeywordIndex extends DerivedDataset<PostgresTable> {
4
+ #private;
5
+ readonly name: string;
6
+ readonly qualifiedName: string;
7
+ constructor({ into, name, parts, configuration, }: {
8
+ into: PostgresDestination;
9
+ name: string;
10
+ parts: string;
11
+ configuration: string;
12
+ });
13
+ validate(connections: readonly Connection<PostgresTable>[]): void;
14
+ refresh({ clock, signal, }: {
15
+ readonly clock: PipelineClock;
16
+ readonly signal?: AbortSignal;
17
+ }): Promise<void>;
18
+ }
@@ -0,0 +1,106 @@
1
+ import { hash } from 'node:crypto';
2
+ import postgres from 'postgres';
3
+ import { DerivedDataset, errorMessage, } from '@eltjs/elt';
4
+ import { PostgresDerivedStatus, PostgresDestination, inWarehouse, quote, rawTable, warehouse, } from '@eltjs/elt-postgresql';
5
+ import { copiesInto } from '../copies.js';
6
+ // The keyword index of the passages of a vectorizer: the table
7
+ // _warehouse.raw_<name> keeps the id, source, seq and text of each passage,
8
+ // and its keywords column, the tsvector that Postgres generates from the text
9
+ // with the text search configuration, which a GIN index indexes, as
10
+ // @zukhruf/retrieval's PgvectorKeywordRetriever reads it (its ADR 0004). The
11
+ // table and its index are one declaration, whose hash the table keeps as its
12
+ // comment: a change of the declaration, such as another configuration, drops
13
+ // the table, and each view over it, and makes it again, and the refill gives
14
+ // each passage its keywords in the new configuration (ADR 0002). A refresh
15
+ // writes the passages that changed and removes the ones that are gone in one
16
+ // transaction, so a reader sees the index of one refresh or of the next,
17
+ // never a part of one.
18
+ export class KeywordIndex extends DerivedDataset {
19
+ name;
20
+ // The table of the index, which the passages view reads, and which a view
21
+ // after it waits for while the index waits.
22
+ qualifiedName;
23
+ #into;
24
+ #table;
25
+ #parts;
26
+ #partsTable;
27
+ #declaration;
28
+ #declared;
29
+ // name: the name of the index, whose table is raw_<name>. parts: the raw
30
+ // parts table of the chunks, which keeps source, seq and text, in
31
+ // _warehouse. configuration: the text search configuration of the
32
+ // keywords.
33
+ constructor({ into, name, parts, configuration, }) {
34
+ super();
35
+ this.name = name;
36
+ this.#into = into;
37
+ const raw = rawTable(name);
38
+ this.#table = raw;
39
+ this.qualifiedName = `${warehouse}.${raw}`;
40
+ this.#parts = inWarehouse(parts);
41
+ this.#partsTable = `${warehouse}.${parts}`;
42
+ const table = inWarehouse(raw);
43
+ this.#declaration = Object.freeze([
44
+ `CREATE TABLE ${table} ("id" text COLLATE "C" PRIMARY KEY, "source" text NOT NULL, "seq" integer NOT NULL, "text" text NOT NULL, "keywords" tsvector GENERATED ALWAYS AS (to_tsvector('${configuration.replaceAll("'", "''")}'::regconfig, "text")) STORED, UNIQUE ("source", "seq"))`,
45
+ `CREATE INDEX ${quote(`${raw}_gin`)} ON ${table} USING gin ("keywords")`,
46
+ ]);
47
+ this.#declared = hash('sha256', this.#declaration.join(';\n'));
48
+ Object.freeze(this);
49
+ }
50
+ validate(connections) {
51
+ const made = copiesInto(connections, (destination) => destination instanceof PostgresDestination &&
52
+ destination.url === this.#into.url).map(({ to }) => to.raw);
53
+ if (made.includes(this.#table))
54
+ throw new TypeError(`Keyword index ${this.name} needs ${this.qualifiedName}, which a copy of the pipeline makes`);
55
+ }
56
+ async refresh({ clock, signal, }) {
57
+ await using stack = new AsyncDisposableStack();
58
+ const sql = postgres(this.#into.url, {
59
+ max: 1,
60
+ onnotice: () => { },
61
+ connection: { application_name: 'elt-derived' },
62
+ });
63
+ stack.defer(() => sql.end({ timeout: 5 }));
64
+ const status = new PostgresDerivedStatus(sql, this.qualifiedName, 'computed', clock);
65
+ const table = inWarehouse(this.#table);
66
+ const parts = this.#parts;
67
+ let counts;
68
+ try {
69
+ counts = await sql.begin(async (transaction) => {
70
+ // Two refreshes of one index take turns, so neither makes the table
71
+ // while the other makes it.
72
+ await transaction `SELECT pg_advisory_xact_lock(hashtextextended(${`elt:${this.qualifiedName}`}, 0))`;
73
+ const [stored] = await transaction `
74
+ SELECT obj_description(to_regclass(${this.qualifiedName}), 'pg_class') AS "declared"`;
75
+ if (stored?.declared !== this.#declared) {
76
+ await transaction.unsafe(`DROP TABLE IF EXISTS ${table} CASCADE`);
77
+ for (const statement of this.#declaration)
78
+ await transaction.unsafe(statement);
79
+ await transaction.unsafe(`COMMENT ON TABLE ${table} IS '${this.#declared}'`);
80
+ }
81
+ await transaction.unsafe(`INSERT INTO ${table} ("id", "source", "seq", "text") SELECT p."source" || ':' || p."seq", p."source", p."seq", p."text" FROM ${parts} AS p ON CONFLICT ("id") DO UPDATE SET "text" = excluded."text" WHERE ${table}."text" IS DISTINCT FROM excluded."text"`);
82
+ await transaction.unsafe(`DELETE FROM ${table} AS k WHERE NOT EXISTS (SELECT 1 FROM ${parts} AS p WHERE p."source" = k."source" AND p."seq" = k."seq")`);
83
+ const [row] = await transaction.unsafe(`SELECT (SELECT count(*) FROM ${parts})::int AS "inputs", (SELECT count(*) FROM ${table})::int AS "computed"`);
84
+ return { inputs: Number(row?.inputs), computed: Number(row?.computed) };
85
+ });
86
+ }
87
+ catch (error) {
88
+ // The chunks have no parts table yet while they wait for their input,
89
+ // so the index waits with them.
90
+ if (this.#missingParts(error)) {
91
+ await status.waiting();
92
+ return;
93
+ }
94
+ // A stop is not the dataset's failure.
95
+ if (signal?.aborted !== true)
96
+ await status.failed(errorMessage(error));
97
+ throw error;
98
+ }
99
+ await status.current({ ...counts, empty: 0, failed: 0, pending: 0 });
100
+ }
101
+ #missingParts(error) {
102
+ return (error instanceof postgres.PostgresError &&
103
+ error.code === '42P01' &&
104
+ error.message === `relation "${this.#partsTable}" does not exist`);
105
+ }
106
+ }
@@ -0,0 +1,45 @@
1
+ import { CompositeDataset, type Connection, type DerivedDataset } from '@eltjs/elt';
2
+ import { type Hnsw, PostgresDestination, PostgresTable, View } from '@eltjs/elt-postgresql';
3
+ import { type ChunkingOptions, type EmbeddingOptions, type Loading, type SourceKey } from '../options.ts';
4
+ type Origin = {
5
+ readonly into: PostgresDestination;
6
+ readonly from: PostgresTable;
7
+ } | {
8
+ readonly from: View;
9
+ };
10
+ export type PostgresContract = {
11
+ readonly schema: string;
12
+ readonly passages: string;
13
+ readonly vectors: string;
14
+ readonly index: {
15
+ readonly column: string;
16
+ readonly configuration: string;
17
+ };
18
+ };
19
+ export declare class Vectorizer extends CompositeDataset<PostgresTable> {
20
+ #private;
21
+ readonly name: string;
22
+ readonly members: readonly [
23
+ DerivedDataset<PostgresTable>,
24
+ ...DerivedDataset<PostgresTable>[]
25
+ ];
26
+ readonly contract: PostgresContract;
27
+ readonly into: PostgresDestination;
28
+ constructor(options: Origin & {
29
+ readonly name: string;
30
+ readonly description: string;
31
+ readonly key: SourceKey;
32
+ readonly loading: Loading;
33
+ readonly chunking: ChunkingOptions;
34
+ readonly embedding: EmbeddingOptions;
35
+ readonly metadata?: readonly string[];
36
+ readonly keywords?: {
37
+ readonly configuration?: string;
38
+ };
39
+ readonly indexing?: {
40
+ readonly vectors: Hnsw | 'none';
41
+ };
42
+ });
43
+ validate(connections: readonly Connection<PostgresTable>[]): void;
44
+ }
45
+ export {};