langchain 0.0.154 → 0.0.156
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/chat_models/bedrock.cjs +1 -0
- package/chat_models/bedrock.d.ts +1 -0
- package/chat_models/bedrock.js +1 -0
- package/dist/callbacks/base.d.ts +42 -28
- package/dist/callbacks/handlers/log_stream.cjs +283 -0
- package/dist/callbacks/handlers/log_stream.d.ts +99 -0
- package/dist/callbacks/handlers/log_stream.js +277 -0
- package/dist/callbacks/handlers/tracer.cjs +34 -18
- package/dist/callbacks/handlers/tracer.d.ts +18 -16
- package/dist/callbacks/handlers/tracer.js +34 -18
- package/dist/chat_models/bedrock.cjs +260 -0
- package/dist/chat_models/bedrock.d.ts +58 -0
- package/dist/chat_models/bedrock.js +254 -0
- package/dist/document_loaders/web/notionapi.cjs +8 -4
- package/dist/document_loaders/web/notionapi.js +8 -4
- package/dist/document_loaders/web/searchapi.cjs +134 -0
- package/dist/document_loaders/web/searchapi.d.ts +65 -0
- package/dist/document_loaders/web/searchapi.js +130 -0
- package/dist/embeddings/cloudflare_workersai.cjs +69 -0
- package/dist/embeddings/cloudflare_workersai.d.ts +28 -0
- package/dist/embeddings/cloudflare_workersai.js +65 -0
- package/dist/llms/bedrock.cjs +57 -67
- package/dist/llms/bedrock.d.ts +8 -35
- package/dist/llms/bedrock.js +57 -67
- package/dist/load/import_constants.cjs +4 -0
- package/dist/load/import_constants.js +4 -0
- package/dist/load/import_map.cjs +3 -2
- package/dist/load/import_map.d.ts +1 -0
- package/dist/load/import_map.js +1 -0
- package/dist/schema/runnable/base.cjs +64 -5
- package/dist/schema/runnable/base.d.ts +13 -0
- package/dist/schema/runnable/base.js +64 -5
- package/dist/tools/index.cjs +3 -1
- package/dist/tools/index.d.ts +1 -0
- package/dist/tools/index.js +1 -0
- package/dist/tools/searchapi.cjs +139 -0
- package/dist/tools/searchapi.d.ts +64 -0
- package/dist/tools/searchapi.js +135 -0
- package/dist/util/bedrock.cjs +54 -0
- package/dist/util/bedrock.d.ts +59 -0
- package/dist/util/bedrock.js +50 -0
- package/dist/util/fast-json-patch/index.cjs +48 -0
- package/dist/util/fast-json-patch/index.d.ts +21 -0
- package/dist/util/fast-json-patch/index.js +15 -0
- package/dist/util/fast-json-patch/src/core.cjs +469 -0
- package/dist/util/fast-json-patch/src/core.d.ts +111 -0
- package/dist/util/fast-json-patch/src/core.js +459 -0
- package/dist/util/fast-json-patch/src/helpers.cjs +194 -0
- package/dist/util/fast-json-patch/src/helpers.d.ts +36 -0
- package/dist/util/fast-json-patch/src/helpers.js +181 -0
- package/dist/util/googlevertexai-webauth.cjs +6 -2
- package/dist/util/googlevertexai-webauth.d.ts +1 -0
- package/dist/util/googlevertexai-webauth.js +6 -2
- package/dist/util/stream.cjs +2 -40
- package/dist/util/stream.d.ts +1 -2
- package/dist/util/stream.js +1 -38
- package/dist/vectorstores/cloudflare_vectorize.cjs +200 -0
- package/dist/vectorstores/cloudflare_vectorize.d.ts +90 -0
- package/dist/vectorstores/cloudflare_vectorize.js +173 -0
- package/dist/vectorstores/pgvector.cjs +1 -1
- package/dist/vectorstores/pgvector.js +1 -1
- package/dist/vectorstores/supabase.d.ts +1 -1
- package/dist/vectorstores/vercel_postgres.cjs +300 -0
- package/dist/vectorstores/vercel_postgres.d.ts +145 -0
- package/dist/vectorstores/vercel_postgres.js +296 -0
- package/document_loaders/web/searchapi.cjs +1 -0
- package/document_loaders/web/searchapi.d.ts +1 -0
- package/document_loaders/web/searchapi.js +1 -0
- package/embeddings/cloudflare_workersai.cjs +1 -0
- package/embeddings/cloudflare_workersai.d.ts +1 -0
- package/embeddings/cloudflare_workersai.js +1 -0
- package/package.json +60 -14
- package/vectorstores/cloudflare_vectorize.cjs +1 -0
- package/vectorstores/cloudflare_vectorize.d.ts +1 -0
- package/vectorstores/cloudflare_vectorize.js +1 -0
- package/vectorstores/vercel_postgres.cjs +1 -0
- package/vectorstores/vercel_postgres.d.ts +1 -0
- package/vectorstores/vercel_postgres.js +1 -0
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
import { createPool, } from "@vercel/postgres";
|
|
2
|
+
import { VectorStore } from "./base.js";
|
|
3
|
+
import { Document } from "../document.js";
|
|
4
|
+
import { getEnvironmentVariable } from "../util/env.js";
|
|
5
|
+
/**
|
|
6
|
+
* Class that provides an interface to a Vercel Postgres vector database. It
|
|
7
|
+
* extends the `VectorStore` base class and implements methods for adding
|
|
8
|
+
* documents and vectors and performing similarity searches.
|
|
9
|
+
*/
|
|
10
|
+
export class VercelPostgres extends VectorStore {
|
|
11
|
+
_vectorstoreType() {
|
|
12
|
+
return "vercel";
|
|
13
|
+
}
|
|
14
|
+
constructor(embeddings, config) {
|
|
15
|
+
super(embeddings, config);
|
|
16
|
+
Object.defineProperty(this, "tableName", {
|
|
17
|
+
enumerable: true,
|
|
18
|
+
configurable: true,
|
|
19
|
+
writable: true,
|
|
20
|
+
value: void 0
|
|
21
|
+
});
|
|
22
|
+
Object.defineProperty(this, "idColumnName", {
|
|
23
|
+
enumerable: true,
|
|
24
|
+
configurable: true,
|
|
25
|
+
writable: true,
|
|
26
|
+
value: void 0
|
|
27
|
+
});
|
|
28
|
+
Object.defineProperty(this, "vectorColumnName", {
|
|
29
|
+
enumerable: true,
|
|
30
|
+
configurable: true,
|
|
31
|
+
writable: true,
|
|
32
|
+
value: void 0
|
|
33
|
+
});
|
|
34
|
+
Object.defineProperty(this, "contentColumnName", {
|
|
35
|
+
enumerable: true,
|
|
36
|
+
configurable: true,
|
|
37
|
+
writable: true,
|
|
38
|
+
value: void 0
|
|
39
|
+
});
|
|
40
|
+
Object.defineProperty(this, "metadataColumnName", {
|
|
41
|
+
enumerable: true,
|
|
42
|
+
configurable: true,
|
|
43
|
+
writable: true,
|
|
44
|
+
value: void 0
|
|
45
|
+
});
|
|
46
|
+
Object.defineProperty(this, "filter", {
|
|
47
|
+
enumerable: true,
|
|
48
|
+
configurable: true,
|
|
49
|
+
writable: true,
|
|
50
|
+
value: void 0
|
|
51
|
+
});
|
|
52
|
+
Object.defineProperty(this, "_verbose", {
|
|
53
|
+
enumerable: true,
|
|
54
|
+
configurable: true,
|
|
55
|
+
writable: true,
|
|
56
|
+
value: void 0
|
|
57
|
+
});
|
|
58
|
+
Object.defineProperty(this, "pool", {
|
|
59
|
+
enumerable: true,
|
|
60
|
+
configurable: true,
|
|
61
|
+
writable: true,
|
|
62
|
+
value: void 0
|
|
63
|
+
});
|
|
64
|
+
Object.defineProperty(this, "client", {
|
|
65
|
+
enumerable: true,
|
|
66
|
+
configurable: true,
|
|
67
|
+
writable: true,
|
|
68
|
+
value: void 0
|
|
69
|
+
});
|
|
70
|
+
this.tableName = config.tableName ?? "langchain_vectors";
|
|
71
|
+
this.filter = config.filter;
|
|
72
|
+
this.vectorColumnName = config.columns?.vectorColumnName ?? "embedding";
|
|
73
|
+
this.contentColumnName = config.columns?.contentColumnName ?? "text";
|
|
74
|
+
this.idColumnName = config.columns?.idColumnName ?? "id";
|
|
75
|
+
this.metadataColumnName = config.columns?.metadataColumnName ?? "metadata";
|
|
76
|
+
this.pool = config.pool;
|
|
77
|
+
this.client = config.client;
|
|
78
|
+
this._verbose =
|
|
79
|
+
getEnvironmentVariable("LANGCHAIN_VERBOSE") === "true" ??
|
|
80
|
+
!!config.verbose;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Static method to create a new `VercelPostgres` instance from a
|
|
84
|
+
* connection. It creates a table if one does not exist, and calls
|
|
85
|
+
* `connect` to return a new instance of `VercelPostgres`.
|
|
86
|
+
*
|
|
87
|
+
* @param embeddings - Embeddings instance.
|
|
88
|
+
* @param fields - `VercelPostgres` configuration options.
|
|
89
|
+
* @returns A new instance of `VercelPostgres`.
|
|
90
|
+
*/
|
|
91
|
+
static async initialize(embeddings, config) {
|
|
92
|
+
// Default maxUses to 1 for edge environments:
|
|
93
|
+
// https://github.com/vercel/storage/tree/main/packages/postgres#a-note-on-edge-environments
|
|
94
|
+
const pool = config?.pool ??
|
|
95
|
+
createPool({ maxUses: 1, ...config?.postgresConnectionOptions });
|
|
96
|
+
const client = config?.client ?? (await pool.connect());
|
|
97
|
+
const postgresqlVectorStore = new VercelPostgres(embeddings, {
|
|
98
|
+
...config,
|
|
99
|
+
pool,
|
|
100
|
+
client,
|
|
101
|
+
});
|
|
102
|
+
await postgresqlVectorStore.ensureTableInDatabase();
|
|
103
|
+
return postgresqlVectorStore;
|
|
104
|
+
}
|
|
105
|
+
/**
|
|
106
|
+
* Method to add documents to the vector store. It converts the documents into
|
|
107
|
+
* vectors, and adds them to the store.
|
|
108
|
+
*
|
|
109
|
+
* @param documents - Array of `Document` instances.
|
|
110
|
+
* @returns Promise that resolves when the documents have been added.
|
|
111
|
+
*/
|
|
112
|
+
async addDocuments(documents, options) {
|
|
113
|
+
const texts = documents.map(({ pageContent }) => pageContent);
|
|
114
|
+
return this.addVectors(await this.embeddings.embedDocuments(texts), documents, options);
|
|
115
|
+
}
|
|
116
|
+
/**
|
|
117
|
+
* Generates the SQL placeholders for a specific row at the provided index.
|
|
118
|
+
*
|
|
119
|
+
* @param index - The index of the row for which placeholders need to be generated.
|
|
120
|
+
* @returns The SQL placeholders for the row values.
|
|
121
|
+
*/
|
|
122
|
+
generatePlaceholderForRowAt(
|
|
123
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
124
|
+
row, index) {
|
|
125
|
+
const base = index * row.length;
|
|
126
|
+
return `(${row.map((_, j) => `$${base + 1 + j}`)})`;
|
|
127
|
+
}
|
|
128
|
+
/**
|
|
129
|
+
* Constructs the SQL query for inserting rows into the specified table.
|
|
130
|
+
*
|
|
131
|
+
* @param rows - The rows of data to be inserted, consisting of values and records.
|
|
132
|
+
* @param chunkIndex - The starting index for generating query placeholders based on chunk positioning.
|
|
133
|
+
* @returns The complete SQL INSERT INTO query string.
|
|
134
|
+
*/
|
|
135
|
+
async runInsertQuery(
|
|
136
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
137
|
+
rows, useIdColumn) {
|
|
138
|
+
const values = rows.map((row, j) => this.generatePlaceholderForRowAt(row, j));
|
|
139
|
+
const flatValues = rows.flat();
|
|
140
|
+
return this.client.query(`
|
|
141
|
+
INSERT INTO ${this.tableName} (
|
|
142
|
+
${useIdColumn ? `${this.idColumnName},` : ""}
|
|
143
|
+
${this.contentColumnName},
|
|
144
|
+
${this.vectorColumnName},
|
|
145
|
+
${this.metadataColumnName}
|
|
146
|
+
) VALUES ${values.join(", ")}
|
|
147
|
+
ON CONFLICT (${this.idColumnName})
|
|
148
|
+
DO UPDATE
|
|
149
|
+
SET
|
|
150
|
+
${this.contentColumnName} = EXCLUDED.${this.contentColumnName},
|
|
151
|
+
${this.vectorColumnName} = EXCLUDED.${this.vectorColumnName},
|
|
152
|
+
${this.metadataColumnName} = EXCLUDED.${this.metadataColumnName}
|
|
153
|
+
RETURNING ${this.idColumnName}`, flatValues);
|
|
154
|
+
}
|
|
155
|
+
/**
|
|
156
|
+
* Method to add vectors to the vector store. It converts the vectors into
|
|
157
|
+
* rows and inserts them into the database.
|
|
158
|
+
*
|
|
159
|
+
* @param vectors - Array of vectors.
|
|
160
|
+
* @param documents - Array of `Document` instances.
|
|
161
|
+
* @returns Promise that resolves when the vectors have been added.
|
|
162
|
+
*/
|
|
163
|
+
async addVectors(vectors, documents, options) {
|
|
164
|
+
if (options?.ids !== undefined && options?.ids.length !== vectors.length) {
|
|
165
|
+
throw new Error(`If provided, the length of "ids" must be the same as the number of vectors.`);
|
|
166
|
+
}
|
|
167
|
+
const rows = vectors.map((embedding, idx) => {
|
|
168
|
+
const embeddingString = `[${embedding.join(",")}]`;
|
|
169
|
+
const row = [
|
|
170
|
+
documents[idx].pageContent,
|
|
171
|
+
embeddingString,
|
|
172
|
+
documents[idx].metadata,
|
|
173
|
+
];
|
|
174
|
+
if (options?.ids) {
|
|
175
|
+
return [options.ids[idx], ...row];
|
|
176
|
+
}
|
|
177
|
+
return row;
|
|
178
|
+
});
|
|
179
|
+
const chunkSize = 500;
|
|
180
|
+
const ids = [];
|
|
181
|
+
for (let i = 0; i < rows.length; i += chunkSize) {
|
|
182
|
+
const chunk = rows.slice(i, i + chunkSize);
|
|
183
|
+
try {
|
|
184
|
+
const result = await this.runInsertQuery(chunk, options?.ids !== undefined);
|
|
185
|
+
ids.push(...result.rows.map((row) => row[this.idColumnName]));
|
|
186
|
+
}
|
|
187
|
+
catch (e) {
|
|
188
|
+
console.error(e);
|
|
189
|
+
throw new Error(`Error inserting: ${e.message}`);
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return ids;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Method to perform a similarity search in the vector store. It returns
|
|
196
|
+
* the `k` most similar documents to the query vector, along with their
|
|
197
|
+
* similarity scores.
|
|
198
|
+
*
|
|
199
|
+
* @param query - Query vector.
|
|
200
|
+
* @param k - Number of most similar documents to return.
|
|
201
|
+
* @param filter - Optional filter to apply to the search.
|
|
202
|
+
* @returns Promise that resolves with an array of tuples, each containing a `Document` and its similarity score.
|
|
203
|
+
*/
|
|
204
|
+
async similaritySearchVectorWithScore(query, k, filter) {
|
|
205
|
+
const embeddingString = `[${query.join(",")}]`;
|
|
206
|
+
const _filter = filter ?? "{}";
|
|
207
|
+
const queryString = `
|
|
208
|
+
SELECT *, ${this.vectorColumnName} <=> $1 as "_distance"
|
|
209
|
+
FROM ${this.tableName}
|
|
210
|
+
WHERE ${this.metadataColumnName} @> $2
|
|
211
|
+
ORDER BY "_distance" ASC
|
|
212
|
+
LIMIT $3;`;
|
|
213
|
+
const documents = (await this.client.query(queryString, [embeddingString, _filter, k])).rows;
|
|
214
|
+
const results = [];
|
|
215
|
+
for (const doc of documents) {
|
|
216
|
+
if (doc._distance != null && doc[this.contentColumnName] != null) {
|
|
217
|
+
const document = new Document({
|
|
218
|
+
pageContent: doc[this.contentColumnName],
|
|
219
|
+
metadata: doc[this.metadataColumnName],
|
|
220
|
+
});
|
|
221
|
+
results.push([document, doc._distance]);
|
|
222
|
+
}
|
|
223
|
+
}
|
|
224
|
+
return results;
|
|
225
|
+
}
|
|
226
|
+
async delete(params) {
|
|
227
|
+
if (params.ids !== undefined) {
|
|
228
|
+
await this.client.query(`DELETE FROM ${this.tableName} WHERE ${this.idColumnName} IN (${params.ids.map((_, idx) => `$${idx + 1}`)})`, params.ids);
|
|
229
|
+
}
|
|
230
|
+
else if (params.deleteAll) {
|
|
231
|
+
await this.client.query(`TRUNCATE TABLE ${this.tableName}`);
|
|
232
|
+
}
|
|
233
|
+
}
|
|
234
|
+
/**
|
|
235
|
+
* Method to ensure the existence of the table in the database. It creates
|
|
236
|
+
* the table if it does not already exist.
|
|
237
|
+
*
|
|
238
|
+
* @returns Promise that resolves when the table has been ensured.
|
|
239
|
+
*/
|
|
240
|
+
async ensureTableInDatabase() {
|
|
241
|
+
await this.client.query(`CREATE EXTENSION IF NOT EXISTS vector;`);
|
|
242
|
+
await this.client.query(`CREATE EXTENSION IF NOT EXISTS "uuid-ossp";`);
|
|
243
|
+
await this.client.query(`CREATE TABLE IF NOT EXISTS "${this.tableName}" (
|
|
244
|
+
"${this.idColumnName}" uuid NOT NULL DEFAULT uuid_generate_v4() PRIMARY KEY,
|
|
245
|
+
"${this.contentColumnName}" text,
|
|
246
|
+
"${this.metadataColumnName}" jsonb,
|
|
247
|
+
"${this.vectorColumnName}" vector
|
|
248
|
+
);`);
|
|
249
|
+
}
|
|
250
|
+
/**
|
|
251
|
+
* Static method to create a new `VercelPostgres` instance from an
|
|
252
|
+
* array of texts and their metadata. It converts the texts into
|
|
253
|
+
* `Document` instances and adds them to the store.
|
|
254
|
+
*
|
|
255
|
+
* @param texts - Array of texts.
|
|
256
|
+
* @param metadatas - Array of metadata objects or a single metadata object.
|
|
257
|
+
* @param embeddings - Embeddings instance.
|
|
258
|
+
* @param fields - `VercelPostgres` configuration options.
|
|
259
|
+
* @returns Promise that resolves with a new instance of `VercelPostgres`.
|
|
260
|
+
*/
|
|
261
|
+
static async fromTexts(texts, metadatas, embeddings, dbConfig) {
|
|
262
|
+
const docs = [];
|
|
263
|
+
for (let i = 0; i < texts.length; i += 1) {
|
|
264
|
+
const metadata = Array.isArray(metadatas) ? metadatas[i] : metadatas;
|
|
265
|
+
const newDoc = new Document({
|
|
266
|
+
pageContent: texts[i],
|
|
267
|
+
metadata,
|
|
268
|
+
});
|
|
269
|
+
docs.push(newDoc);
|
|
270
|
+
}
|
|
271
|
+
return this.fromDocuments(docs, embeddings, dbConfig);
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Static method to create a new `VercelPostgres` instance from an
|
|
275
|
+
* array of `Document` instances. It adds the documents to the store.
|
|
276
|
+
*
|
|
277
|
+
* @param docs - Array of `Document` instances.
|
|
278
|
+
* @param embeddings - Embeddings instance.
|
|
279
|
+
* @param fields - `VercelPostgres` configuration options.
|
|
280
|
+
* @returns Promise that resolves with a new instance of `VercelPostgres`.
|
|
281
|
+
*/
|
|
282
|
+
static async fromDocuments(docs, embeddings, dbConfig) {
|
|
283
|
+
const instance = await this.initialize(embeddings, dbConfig);
|
|
284
|
+
await instance.addDocuments(docs);
|
|
285
|
+
return instance;
|
|
286
|
+
}
|
|
287
|
+
/**
|
|
288
|
+
* Closes all the clients in the pool and terminates the pool.
|
|
289
|
+
*
|
|
290
|
+
* @returns Promise that resolves when all clients are closed and the pool is terminated.
|
|
291
|
+
*/
|
|
292
|
+
async end() {
|
|
293
|
+
await this.client?.release();
|
|
294
|
+
return this.pool.end();
|
|
295
|
+
}
|
|
296
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../../dist/document_loaders/web/searchapi.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/document_loaders/web/searchapi.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../../dist/document_loaders/web/searchapi.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/embeddings/cloudflare_workersai.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/embeddings/cloudflare_workersai.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/embeddings/cloudflare_workersai.js'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "langchain",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.156",
|
|
4
4
|
"description": "Typescript bindings for langchain",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -76,6 +76,9 @@
|
|
|
76
76
|
"embeddings/cache_backed.cjs",
|
|
77
77
|
"embeddings/cache_backed.js",
|
|
78
78
|
"embeddings/cache_backed.d.ts",
|
|
79
|
+
"embeddings/cloudflare_workersai.cjs",
|
|
80
|
+
"embeddings/cloudflare_workersai.js",
|
|
81
|
+
"embeddings/cloudflare_workersai.d.ts",
|
|
79
82
|
"embeddings/fake.cjs",
|
|
80
83
|
"embeddings/fake.js",
|
|
81
84
|
"embeddings/fake.d.ts",
|
|
@@ -178,6 +181,9 @@
|
|
|
178
181
|
"vectorstores/memory.cjs",
|
|
179
182
|
"vectorstores/memory.js",
|
|
180
183
|
"vectorstores/memory.d.ts",
|
|
184
|
+
"vectorstores/cloudflare_vectorize.cjs",
|
|
185
|
+
"vectorstores/cloudflare_vectorize.js",
|
|
186
|
+
"vectorstores/cloudflare_vectorize.d.ts",
|
|
181
187
|
"vectorstores/chroma.cjs",
|
|
182
188
|
"vectorstores/chroma.js",
|
|
183
189
|
"vectorstores/chroma.d.ts",
|
|
@@ -247,6 +253,9 @@
|
|
|
247
253
|
"vectorstores/vectara.cjs",
|
|
248
254
|
"vectorstores/vectara.js",
|
|
249
255
|
"vectorstores/vectara.d.ts",
|
|
256
|
+
"vectorstores/vercel_postgres.cjs",
|
|
257
|
+
"vectorstores/vercel_postgres.js",
|
|
258
|
+
"vectorstores/vercel_postgres.d.ts",
|
|
250
259
|
"vectorstores/voy.cjs",
|
|
251
260
|
"vectorstores/voy.js",
|
|
252
261
|
"vectorstores/voy.d.ts",
|
|
@@ -331,6 +340,9 @@
|
|
|
331
340
|
"document_loaders/web/confluence.cjs",
|
|
332
341
|
"document_loaders/web/confluence.js",
|
|
333
342
|
"document_loaders/web/confluence.d.ts",
|
|
343
|
+
"document_loaders/web/searchapi.cjs",
|
|
344
|
+
"document_loaders/web/searchapi.js",
|
|
345
|
+
"document_loaders/web/searchapi.d.ts",
|
|
334
346
|
"document_loaders/web/serpapi.cjs",
|
|
335
347
|
"document_loaders/web/serpapi.js",
|
|
336
348
|
"document_loaders/web/serpapi.d.ts",
|
|
@@ -394,6 +406,9 @@
|
|
|
394
406
|
"chat_models/anthropic.cjs",
|
|
395
407
|
"chat_models/anthropic.js",
|
|
396
408
|
"chat_models/anthropic.d.ts",
|
|
409
|
+
"chat_models/bedrock.cjs",
|
|
410
|
+
"chat_models/bedrock.js",
|
|
411
|
+
"chat_models/bedrock.d.ts",
|
|
397
412
|
"chat_models/googlevertexai.cjs",
|
|
398
413
|
"chat_models/googlevertexai.js",
|
|
399
414
|
"chat_models/googlevertexai.d.ts",
|
|
@@ -656,12 +671,11 @@
|
|
|
656
671
|
"@aws-sdk/client-sagemaker-runtime": "^3.310.0",
|
|
657
672
|
"@aws-sdk/client-sfn": "^3.362.0",
|
|
658
673
|
"@aws-sdk/credential-provider-node": "^3.388.0",
|
|
659
|
-
"@aws-sdk/protocol-http": "^3.374.0",
|
|
660
|
-
"@aws-sdk/signature-v4": "^3.374.0",
|
|
661
674
|
"@aws-sdk/types": "^3.357.0",
|
|
662
675
|
"@azure/storage-blob": "^12.15.0",
|
|
663
676
|
"@clickhouse/client": "^0.0.14",
|
|
664
|
-
"@cloudflare/
|
|
677
|
+
"@cloudflare/ai": "^1.0.12",
|
|
678
|
+
"@cloudflare/workers-types": "^4.20230922.0",
|
|
665
679
|
"@elastic/elasticsearch": "^8.4.0",
|
|
666
680
|
"@faker-js/faker": "^7.6.0",
|
|
667
681
|
"@getmetal/metal-sdk": "^4.0.0",
|
|
@@ -679,6 +693,8 @@
|
|
|
679
693
|
"@qdrant/js-client-rest": "^1.2.0",
|
|
680
694
|
"@raycast/api": "^1.55.2",
|
|
681
695
|
"@smithy/eventstream-codec": "^2.0.5",
|
|
696
|
+
"@smithy/protocol-http": "^3.0.6",
|
|
697
|
+
"@smithy/signature-v4": "^2.0.10",
|
|
682
698
|
"@smithy/util-utf8": "^2.0.0",
|
|
683
699
|
"@supabase/postgrest-js": "^1.1.1",
|
|
684
700
|
"@supabase/supabase-js": "^2.10.0",
|
|
@@ -702,6 +718,7 @@
|
|
|
702
718
|
"@typescript-eslint/eslint-plugin": "^5.58.0",
|
|
703
719
|
"@typescript-eslint/parser": "^5.58.0",
|
|
704
720
|
"@upstash/redis": "^1.20.6",
|
|
721
|
+
"@vercel/postgres": "^0.5.0",
|
|
705
722
|
"@writerai/writer-sdk": "^0.40.2",
|
|
706
723
|
"@xata.io/client": "^0.25.1",
|
|
707
724
|
"@xenova/transformers": "^2.5.4",
|
|
@@ -777,11 +794,9 @@
|
|
|
777
794
|
"@aws-sdk/client-sagemaker-runtime": "^3.310.0",
|
|
778
795
|
"@aws-sdk/client-sfn": "^3.310.0",
|
|
779
796
|
"@aws-sdk/credential-provider-node": "^3.388.0",
|
|
780
|
-
"@aws-sdk/protocol-http": "^3.374.0",
|
|
781
|
-
"@aws-sdk/signature-v4": "^3.374.0",
|
|
782
797
|
"@azure/storage-blob": "^12.15.0",
|
|
783
798
|
"@clickhouse/client": "^0.0.14",
|
|
784
|
-
"@cloudflare/
|
|
799
|
+
"@cloudflare/ai": "^1.0.12",
|
|
785
800
|
"@elastic/elasticsearch": "^8.4.0",
|
|
786
801
|
"@getmetal/metal-sdk": "*",
|
|
787
802
|
"@getzep/zep-js": "^0.7.0",
|
|
@@ -797,6 +812,8 @@
|
|
|
797
812
|
"@qdrant/js-client-rest": "^1.2.0",
|
|
798
813
|
"@raycast/api": "^1.55.2",
|
|
799
814
|
"@smithy/eventstream-codec": "^2.0.5",
|
|
815
|
+
"@smithy/protocol-http": "^3.0.6",
|
|
816
|
+
"@smithy/signature-v4": "^2.0.10",
|
|
800
817
|
"@smithy/util-utf8": "^2.0.0",
|
|
801
818
|
"@supabase/postgrest-js": "^1.1.1",
|
|
802
819
|
"@supabase/supabase-js": "^2.10.0",
|
|
@@ -804,6 +821,7 @@
|
|
|
804
821
|
"@tensorflow/tfjs-converter": "*",
|
|
805
822
|
"@tensorflow/tfjs-core": "*",
|
|
806
823
|
"@upstash/redis": "^1.20.6",
|
|
824
|
+
"@vercel/postgres": "^0.5.0",
|
|
807
825
|
"@writerai/writer-sdk": "^0.40.2",
|
|
808
826
|
"@xata.io/client": "^0.25.1",
|
|
809
827
|
"@xenova/transformers": "^2.5.4",
|
|
@@ -876,19 +894,13 @@
|
|
|
876
894
|
"@aws-sdk/credential-provider-node": {
|
|
877
895
|
"optional": true
|
|
878
896
|
},
|
|
879
|
-
"@aws-sdk/protocol-http": {
|
|
880
|
-
"optional": true
|
|
881
|
-
},
|
|
882
|
-
"@aws-sdk/signature-v4": {
|
|
883
|
-
"optional": true
|
|
884
|
-
},
|
|
885
897
|
"@azure/storage-blob": {
|
|
886
898
|
"optional": true
|
|
887
899
|
},
|
|
888
900
|
"@clickhouse/client": {
|
|
889
901
|
"optional": true
|
|
890
902
|
},
|
|
891
|
-
"@cloudflare/
|
|
903
|
+
"@cloudflare/ai": {
|
|
892
904
|
"optional": true
|
|
893
905
|
},
|
|
894
906
|
"@elastic/elasticsearch": {
|
|
@@ -936,6 +948,12 @@
|
|
|
936
948
|
"@smithy/eventstream-codec": {
|
|
937
949
|
"optional": true
|
|
938
950
|
},
|
|
951
|
+
"@smithy/protocol-http": {
|
|
952
|
+
"optional": true
|
|
953
|
+
},
|
|
954
|
+
"@smithy/signature-v4": {
|
|
955
|
+
"optional": true
|
|
956
|
+
},
|
|
939
957
|
"@smithy/util-utf8": {
|
|
940
958
|
"optional": true
|
|
941
959
|
},
|
|
@@ -957,6 +975,9 @@
|
|
|
957
975
|
"@upstash/redis": {
|
|
958
976
|
"optional": true
|
|
959
977
|
},
|
|
978
|
+
"@vercel/postgres": {
|
|
979
|
+
"optional": true
|
|
980
|
+
},
|
|
960
981
|
"@writerai/writer-sdk": {
|
|
961
982
|
"optional": true
|
|
962
983
|
},
|
|
@@ -1248,6 +1269,11 @@
|
|
|
1248
1269
|
"import": "./embeddings/cache_backed.js",
|
|
1249
1270
|
"require": "./embeddings/cache_backed.cjs"
|
|
1250
1271
|
},
|
|
1272
|
+
"./embeddings/cloudflare_workersai": {
|
|
1273
|
+
"types": "./embeddings/cloudflare_workersai.d.ts",
|
|
1274
|
+
"import": "./embeddings/cloudflare_workersai.js",
|
|
1275
|
+
"require": "./embeddings/cloudflare_workersai.cjs"
|
|
1276
|
+
},
|
|
1251
1277
|
"./embeddings/fake": {
|
|
1252
1278
|
"types": "./embeddings/fake.d.ts",
|
|
1253
1279
|
"import": "./embeddings/fake.js",
|
|
@@ -1418,6 +1444,11 @@
|
|
|
1418
1444
|
"import": "./vectorstores/memory.js",
|
|
1419
1445
|
"require": "./vectorstores/memory.cjs"
|
|
1420
1446
|
},
|
|
1447
|
+
"./vectorstores/cloudflare_vectorize": {
|
|
1448
|
+
"types": "./vectorstores/cloudflare_vectorize.d.ts",
|
|
1449
|
+
"import": "./vectorstores/cloudflare_vectorize.js",
|
|
1450
|
+
"require": "./vectorstores/cloudflare_vectorize.cjs"
|
|
1451
|
+
},
|
|
1421
1452
|
"./vectorstores/chroma": {
|
|
1422
1453
|
"types": "./vectorstores/chroma.d.ts",
|
|
1423
1454
|
"import": "./vectorstores/chroma.js",
|
|
@@ -1533,6 +1564,11 @@
|
|
|
1533
1564
|
"import": "./vectorstores/vectara.js",
|
|
1534
1565
|
"require": "./vectorstores/vectara.cjs"
|
|
1535
1566
|
},
|
|
1567
|
+
"./vectorstores/vercel_postgres": {
|
|
1568
|
+
"types": "./vectorstores/vercel_postgres.d.ts",
|
|
1569
|
+
"import": "./vectorstores/vercel_postgres.js",
|
|
1570
|
+
"require": "./vectorstores/vercel_postgres.cjs"
|
|
1571
|
+
},
|
|
1536
1572
|
"./vectorstores/voy": {
|
|
1537
1573
|
"types": "./vectorstores/voy.d.ts",
|
|
1538
1574
|
"import": "./vectorstores/voy.js",
|
|
@@ -1673,6 +1709,11 @@
|
|
|
1673
1709
|
"import": "./document_loaders/web/confluence.js",
|
|
1674
1710
|
"require": "./document_loaders/web/confluence.cjs"
|
|
1675
1711
|
},
|
|
1712
|
+
"./document_loaders/web/searchapi": {
|
|
1713
|
+
"types": "./document_loaders/web/searchapi.d.ts",
|
|
1714
|
+
"import": "./document_loaders/web/searchapi.js",
|
|
1715
|
+
"require": "./document_loaders/web/searchapi.cjs"
|
|
1716
|
+
},
|
|
1676
1717
|
"./document_loaders/web/serpapi": {
|
|
1677
1718
|
"types": "./document_loaders/web/serpapi.d.ts",
|
|
1678
1719
|
"import": "./document_loaders/web/serpapi.js",
|
|
@@ -1778,6 +1819,11 @@
|
|
|
1778
1819
|
"import": "./chat_models/anthropic.js",
|
|
1779
1820
|
"require": "./chat_models/anthropic.cjs"
|
|
1780
1821
|
},
|
|
1822
|
+
"./chat_models/bedrock": {
|
|
1823
|
+
"types": "./chat_models/bedrock.d.ts",
|
|
1824
|
+
"import": "./chat_models/bedrock.js",
|
|
1825
|
+
"require": "./chat_models/bedrock.cjs"
|
|
1826
|
+
},
|
|
1781
1827
|
"./chat_models/googlevertexai": {
|
|
1782
1828
|
"types": "./chat_models/googlevertexai.d.ts",
|
|
1783
1829
|
"import": "./chat_models/googlevertexai.js",
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/vectorstores/cloudflare_vectorize.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/vectorstores/cloudflare_vectorize.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/vectorstores/cloudflare_vectorize.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require('../dist/vectorstores/vercel_postgres.cjs');
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/vectorstores/vercel_postgres.js'
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from '../dist/vectorstores/vercel_postgres.js'
|