From e7e105642355cbe52006bb0df49b6d2117ebd578 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 12:47:28 -0800 Subject: [PATCH 1/8] proper[major]: Cleaned up deps in langchain --- langchain/package.json | 239 ------------------ langchain/src/load/import_type.d.ts | 2 - .../src/llms/tests/replicate.int.test.ts | 0 .../src/retrievers/tests/metal.int.test.ts | 0 .../storage/tests/upstash_redis.int.test.ts | 0 .../src/stores/tests/cassandra.int.test.ts | 2 +- .../vectorstores/memory.cjs | 1 + .../vectorstores/memory.d.ts | 1 + .../vectorstores/memory.js | 1 + yarn.lock | 200 --------------- 10 files changed, 4 insertions(+), 442 deletions(-) rename {langchain => libs/langchain-community}/src/llms/tests/replicate.int.test.ts (100%) rename {langchain => libs/langchain-community}/src/retrievers/tests/metal.int.test.ts (100%) rename {langchain => libs/langchain-community}/src/storage/tests/upstash_redis.int.test.ts (100%) rename {langchain => libs/langchain-community}/src/stores/tests/cassandra.int.test.ts (98%) create mode 100644 libs/langchain-community/vectorstores/memory.cjs create mode 100644 libs/langchain-community/vectorstores/memory.d.ts create mode 100644 libs/langchain-community/vectorstores/memory.js diff --git a/langchain/package.json b/langchain/package.json index fdd088660169..3bc28589e197 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -888,72 +888,36 @@ "@aws-sdk/credential-provider-node": "^3.388.0", "@aws-sdk/types": "^3.357.0", "@azure/storage-blob": "^12.15.0", - "@clickhouse/client": "^0.2.5", - "@cloudflare/ai": "^1.0.12", "@cloudflare/workers-types": "^4.20230922.0", - "@elastic/elasticsearch": "^8.4.0", "@faker-js/faker": "^7.6.0", - "@getmetal/metal-sdk": "^4.0.0", - "@getzep/zep-js": "^0.9.0", "@gomomento/sdk": "^1.51.1", "@gomomento/sdk-core": "^1.51.1", "@google-ai/generativelanguage": "^0.2.1", "@google-cloud/storage": "^6.10.1", - "@gradientai/nodejs-sdk": "^1.2.0", - "@huggingface/inference": "^2.6.4", "@jest/globals": "^29.5.0", - "@mozilla/readability": "^0.4.4", "@notionhq/client": "^2.2.10", - "@opensearch-project/opensearch": "^2.2.0", "@pinecone-database/pinecone": "^1.1.0", - "@planetscale/database": "^1.8.0", - "@qdrant/js-client-rest": "^1.2.0", - "@raycast/api": "^1.55.2", - "@rockset/client": "^0.9.1", - "@smithy/eventstream-codec": "^2.0.5", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^2.0.10", - "@smithy/util-utf8": "^2.0.0", - "@supabase/postgrest-js": "^1.1.1", "@supabase/supabase-js": "^2.10.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", - "@tensorflow-models/universal-sentence-encoder": "^1.3.3", "@tensorflow/tfjs-backend-cpu": "^3", - "@tensorflow/tfjs-converter": "^3.6.0", - "@tensorflow/tfjs-core": "^3.6.0", "@tsconfig/recommended": "^1.0.2", "@types/d3-dsv": "^2", - "@types/decamelize": "^1.2.0", "@types/html-to-text": "^9", "@types/js-yaml": "^4", "@types/jsdom": "^21.1.1", - "@types/lodash": "^4", - "@types/mozilla-readability": "^0.2.1", "@types/pdf-parse": "^1.1.1", - "@types/pg": "^8", - "@types/pg-copy-streams": "^1.2.2", "@types/uuid": "^9", "@types/ws": "^8", "@typescript-eslint/eslint-plugin": "^5.58.0", "@typescript-eslint/parser": "^5.58.0", - "@upstash/redis": "^1.20.6", "@vercel/kv": "^0.2.3", - "@vercel/postgres": "^0.5.0", - "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", - "@xenova/transformers": "^2.5.4", - "@zilliz/milvus2-sdk-node": ">=2.2.11", "apify-client": "^2.7.1", "assemblyai": "^2.0.2", "axios": "^0.26.0", - "cassandra-driver": "^4.7.2", "cheerio": "^1.0.0-rc.12", "chromadb": "^1.5.3", - "closevector-common": "0.1.0-alpha.1", - "closevector-node": "0.1.0-alpha.10", - "closevector-web": "0.1.0-alpha.15", - "cohere-ai": ">=6.0.0", "convex": "^1.3.1", "d3-dsv": "^2.0.0", "dotenv": "^16.0.3", @@ -966,53 +930,35 @@ "eslint-plugin-jest": "^27.6.0", "eslint-plugin-no-instanceof": "^1.0.1", "eslint-plugin-prettier": "^4.2.1", - "faiss-node": "^0.5.1", "fast-xml-parser": "^4.2.7", - "firebase-admin": "^11.9.0", "google-auth-library": "^8.9.0", "googleapis": "^126.0.1", - "graphql": "^16.6.0", - "hnswlib-node": "^1.4.2", "html-to-text": "^9.0.5", "ignore": "^5.2.0", "ioredis": "^5.3.2", "jest": "^29.5.0", "jest-environment-node": "^29.6.4", "jsdom": "^22.1.0", - "llmonitor": "^0.5.9", - "lodash": "^4.17.21", "mammoth": "^1.5.1", "mongodb": "^5.2.0", - "mysql2": "^3.3.3", - "neo4j-driver": "^5.12.0", - "node-llama-cpp": "2.7.3", "notion-to-md": "^3.1.0", "officeparser": "^4.0.4", "pdf-parse": "1.1.1", "peggy": "^3.0.2", - "pg": "^8.11.0", - "pg-copy-streams": "^6.0.5", - "pickleparser": "^0.2.1", "playwright": "^1.32.1", - "portkey-ai": "^0.1.11", "prettier": "^2.8.3", "puppeteer": "^19.7.2", "pyodide": "^0.24.1", "redis": "^4.6.6", "release-it": "^15.10.1", - "replicate": "^0.18.0", "rimraf": "^5.0.1", "rollup": "^3.19.1", "sonix-speech-recognition": "^2.1.1", - "sqlite3": "^5.1.4", "srt-parser-2": "^1.2.2", "ts-jest": "^29.1.0", "typeorm": "^0.3.12", "typescript": "~5.1.6", - "typesense": "^1.5.3", - "usearch": "^1.1.1", "vectordb": "^0.1.4", - "voy-search": "0.6.2", "weaviate-ts-client": "^1.4.0", "web-auth-library": "^1.0.3", "youtube-transcript": "^1.0.6", @@ -1024,92 +970,45 @@ "@aws-sdk/client-sfn": "^3.310.0", "@aws-sdk/credential-provider-node": "^3.388.0", "@azure/storage-blob": "^12.15.0", - "@clickhouse/client": "^0.2.5", - "@cloudflare/ai": "^1.0.12", - "@elastic/elasticsearch": "^8.4.0", - "@getmetal/metal-sdk": "*", - "@getzep/zep-js": "^0.9.0", "@gomomento/sdk": "^1.51.1", "@gomomento/sdk-core": "^1.51.1", "@gomomento/sdk-web": "^1.51.1", "@google-ai/generativelanguage": "^0.2.1", "@google-cloud/storage": "^6.10.1", - "@gradientai/nodejs-sdk": "^1.2.0", - "@huggingface/inference": "^2.6.4", - "@mozilla/readability": "*", "@notionhq/client": "^2.2.10", - "@opensearch-project/opensearch": "*", "@pinecone-database/pinecone": "^1.1.0", - "@planetscale/database": "^1.8.0", - "@qdrant/js-client-rest": "^1.2.0", - "@raycast/api": "^1.55.2", - "@rockset/client": "^0.9.1", - "@smithy/eventstream-codec": "^2.0.5", - "@smithy/protocol-http": "^3.0.6", - "@smithy/signature-v4": "^2.0.10", - "@smithy/util-utf8": "^2.0.0", - "@supabase/postgrest-js": "^1.1.1", "@supabase/supabase-js": "^2.10.0", - "@tensorflow-models/universal-sentence-encoder": "*", - "@tensorflow/tfjs-converter": "*", - "@tensorflow/tfjs-core": "*", - "@upstash/redis": "^1.20.6", "@vercel/kv": "^0.2.3", - "@vercel/postgres": "^0.5.0", - "@writerai/writer-sdk": "^0.40.2", "@xata.io/client": "^0.28.0", - "@xenova/transformers": "^2.5.4", - "@zilliz/milvus2-sdk-node": ">=2.2.7", "apify-client": "^2.7.1", "assemblyai": "^2.0.2", "axios": "*", - "cassandra-driver": "^4.7.2", "cheerio": "^1.0.0-rc.12", "chromadb": "*", - "closevector-common": "0.1.0-alpha.1", - "closevector-node": "0.1.0-alpha.10", - "closevector-web": "0.1.0-alpha.16", - "cohere-ai": ">=6.0.0", "convex": "^1.3.1", "d3-dsv": "^2.0.0", "epub2": "^3.0.1", - "faiss-node": "^0.5.1", "fast-xml-parser": "^4.2.7", - "firebase-admin": "^11.9.0", "google-auth-library": "^8.9.0", "googleapis": "^126.0.1", - "hnswlib-node": "^1.4.2", "html-to-text": "^9.0.5", "ignore": "^5.2.0", "ioredis": "^5.3.2", "jsdom": "*", - "llmonitor": "^0.5.9", - "lodash": "^4.17.21", "mammoth": "*", "mongodb": "^5.2.0", - "mysql2": "^3.3.3", - "neo4j-driver": "*", - "node-llama-cpp": "*", "notion-to-md": "^3.1.0", "officeparser": "^4.0.4", "pdf-parse": "1.1.1", "peggy": "^3.0.2", - "pg": "^8.11.0", - "pg-copy-streams": "^6.0.5", - "pickleparser": "^0.2.1", "playwright": "^1.32.1", - "portkey-ai": "^0.1.11", "puppeteer": "^19.7.2", "pyodide": "^0.24.1", "redis": "^4.6.4", - "replicate": "^0.18.0", "sonix-speech-recognition": "^2.1.1", "srt-parser-2": "^1.2.2", "typeorm": "^0.3.12", - "typesense": "^1.5.3", - "usearch": "^1.1.1", "vectordb": "^0.1.4", - "voy-search": "0.6.2", "weaviate-ts-client": "^1.4.0", "web-auth-library": "^1.0.3", "ws": "^8.14.2", @@ -1132,21 +1031,6 @@ "@azure/storage-blob": { "optional": true }, - "@clickhouse/client": { - "optional": true - }, - "@cloudflare/ai": { - "optional": true - }, - "@elastic/elasticsearch": { - "optional": true - }, - "@getmetal/metal-sdk": { - "optional": true - }, - "@getzep/zep-js": { - "optional": true - }, "@gomomento/sdk": { "optional": true }, @@ -1162,84 +1046,21 @@ "@google-cloud/storage": { "optional": true }, - "@gradientai/nodejs-sdk": { - "optional": true - }, - "@huggingface/inference": { - "optional": true - }, - "@mozilla/readability": { - "optional": true - }, "@notionhq/client": { "optional": true }, - "@opensearch-project/opensearch": { - "optional": true - }, "@pinecone-database/pinecone": { "optional": true }, - "@planetscale/database": { - "optional": true - }, - "@qdrant/js-client-rest": { - "optional": true - }, - "@raycast/api": { - "optional": true - }, - "@rockset/client": { - "optional": true - }, - "@smithy/eventstream-codec": { - "optional": true - }, - "@smithy/protocol-http": { - "optional": true - }, - "@smithy/signature-v4": { - "optional": true - }, - "@smithy/util-utf8": { - "optional": true - }, - "@supabase/postgrest-js": { - "optional": true - }, "@supabase/supabase-js": { "optional": true }, - "@tensorflow-models/universal-sentence-encoder": { - "optional": true - }, - "@tensorflow/tfjs-converter": { - "optional": true - }, - "@tensorflow/tfjs-core": { - "optional": true - }, - "@upstash/redis": { - "optional": true - }, "@vercel/kv": { "optional": true }, - "@vercel/postgres": { - "optional": true - }, - "@writerai/writer-sdk": { - "optional": true - }, "@xata.io/client": { "optional": true }, - "@xenova/transformers": { - "optional": true - }, - "@zilliz/milvus2-sdk-node": { - "optional": true - }, "apify-client": { "optional": true }, @@ -1249,27 +1070,12 @@ "axios": { "optional": true }, - "cassandra-driver": { - "optional": true - }, "cheerio": { "optional": true }, "chromadb": { "optional": true }, - "closevector-common": { - "optional": true - }, - "closevector-node": { - "optional": true - }, - "closevector-web": { - "optional": true - }, - "cohere-ai": { - "optional": true - }, "convex": { "optional": true }, @@ -1285,18 +1091,12 @@ "fast-xml-parser": { "optional": true }, - "firebase-admin": { - "optional": true - }, "google-auth-library": { "optional": true }, "googleapis": { "optional": true }, - "hnswlib-node": { - "optional": true - }, "html-to-text": { "optional": true }, @@ -1309,27 +1109,12 @@ "jsdom": { "optional": true }, - "llmonitor": { - "optional": true - }, - "lodash": { - "optional": true - }, "mammoth": { "optional": true }, "mongodb": { "optional": true }, - "mysql2": { - "optional": true - }, - "neo4j-driver": { - "optional": true - }, - "node-llama-cpp": { - "optional": true - }, "notion-to-md": { "optional": true }, @@ -1342,21 +1127,9 @@ "peggy": { "optional": true }, - "pg": { - "optional": true - }, - "pg-copy-streams": { - "optional": true - }, - "pickleparser": { - "optional": true - }, "playwright": { "optional": true }, - "portkey-ai": { - "optional": true - }, "puppeteer": { "optional": true }, @@ -1366,9 +1139,6 @@ "redis": { "optional": true }, - "replicate": { - "optional": true - }, "sonix-speech-recognition": { "optional": true }, @@ -1378,18 +1148,9 @@ "typeorm": { "optional": true }, - "typesense": { - "optional": true - }, - "usearch": { - "optional": true - }, "vectordb": { "optional": true }, - "voy-search": { - "optional": true - }, "weaviate-ts-client": { "optional": true }, diff --git a/langchain/src/load/import_type.d.ts b/langchain/src/load/import_type.d.ts index 5add518536fb..050171f77ecd 100644 --- a/langchain/src/load/import_type.d.ts +++ b/langchain/src/load/import_type.d.ts @@ -521,8 +521,6 @@ export interface OptionalImportMap { export interface SecretMap { ANTHROPIC_API_KEY?: string; - AWS_ACCESS_KEY_ID?: string; - AWS_SECRET_ACCESS_KEY?: string; OPENAI_API_KEY?: string; PROMPTLAYER_API_KEY?: string; REMOTE_RETRIEVER_AUTH_BEARER?: string; diff --git a/langchain/src/llms/tests/replicate.int.test.ts b/libs/langchain-community/src/llms/tests/replicate.int.test.ts similarity index 100% rename from langchain/src/llms/tests/replicate.int.test.ts rename to libs/langchain-community/src/llms/tests/replicate.int.test.ts diff --git a/langchain/src/retrievers/tests/metal.int.test.ts b/libs/langchain-community/src/retrievers/tests/metal.int.test.ts similarity index 100% rename from langchain/src/retrievers/tests/metal.int.test.ts rename to libs/langchain-community/src/retrievers/tests/metal.int.test.ts diff --git a/langchain/src/storage/tests/upstash_redis.int.test.ts b/libs/langchain-community/src/storage/tests/upstash_redis.int.test.ts similarity index 100% rename from langchain/src/storage/tests/upstash_redis.int.test.ts rename to libs/langchain-community/src/storage/tests/upstash_redis.int.test.ts diff --git a/langchain/src/stores/tests/cassandra.int.test.ts b/libs/langchain-community/src/stores/tests/cassandra.int.test.ts similarity index 98% rename from langchain/src/stores/tests/cassandra.int.test.ts rename to libs/langchain-community/src/stores/tests/cassandra.int.test.ts index 2f3073ae90eb..7eaa9807b4da 100644 --- a/langchain/src/stores/tests/cassandra.int.test.ts +++ b/libs/langchain-community/src/stores/tests/cassandra.int.test.ts @@ -2,7 +2,7 @@ import { test, expect, describe } from "@jest/globals"; import { Client } from "cassandra-driver"; import { CassandraChatMessageHistory } from "../message/cassandra.js"; -import { HumanMessage, AIMessage } from "../../schema/index.js"; +import { AIMessage, HumanMessage } from "@langchain/core/messages"; const cassandraConfig = { cloud: { diff --git a/libs/langchain-community/vectorstores/memory.cjs b/libs/langchain-community/vectorstores/memory.cjs new file mode 100644 index 000000000000..1c916f1c6f16 --- /dev/null +++ b/libs/langchain-community/vectorstores/memory.cjs @@ -0,0 +1 @@ +module.exports = require('../dist/vectorstores/memory.cjs'); \ No newline at end of file diff --git a/libs/langchain-community/vectorstores/memory.d.ts b/libs/langchain-community/vectorstores/memory.d.ts new file mode 100644 index 000000000000..ca5793359e65 --- /dev/null +++ b/libs/langchain-community/vectorstores/memory.d.ts @@ -0,0 +1 @@ +export * from '../dist/vectorstores/memory.js' \ No newline at end of file diff --git a/libs/langchain-community/vectorstores/memory.js b/libs/langchain-community/vectorstores/memory.js new file mode 100644 index 000000000000..ca5793359e65 --- /dev/null +++ b/libs/langchain-community/vectorstores/memory.js @@ -0,0 +1 @@ +export * from '../dist/vectorstores/memory.js' \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 38bcf65b79d7..d475843879f7 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11546,13 +11546,6 @@ __metadata: languageName: node linkType: hard -"@types/decamelize@npm:^1.2.0": - version: 1.2.0 - resolution: "@types/decamelize@npm:1.2.0" - checksum: cff4e926bf771f8ad6423ab8c5119d6b8679c09aaf9f0b26a4a1dbcf324c0b1df183c2bfe688b90b6f880d8e864684a2806a22529b4ee404fd9160f9c123853d - languageName: node - linkType: hard - "@types/eslint-scope@npm:^3.7.3": version: 3.7.5 resolution: "@types/eslint-scope@npm:3.7.5" @@ -23022,76 +23015,40 @@ __metadata: "@aws-sdk/credential-provider-node": ^3.388.0 "@aws-sdk/types": ^3.357.0 "@azure/storage-blob": ^12.15.0 - "@clickhouse/client": ^0.2.5 - "@cloudflare/ai": ^1.0.12 "@cloudflare/workers-types": ^4.20230922.0 - "@elastic/elasticsearch": ^8.4.0 "@faker-js/faker": ^7.6.0 - "@getmetal/metal-sdk": ^4.0.0 - "@getzep/zep-js": ^0.9.0 "@gomomento/sdk": ^1.51.1 "@gomomento/sdk-core": ^1.51.1 "@google-ai/generativelanguage": ^0.2.1 "@google-cloud/storage": ^6.10.1 - "@gradientai/nodejs-sdk": ^1.2.0 - "@huggingface/inference": ^2.6.4 "@jest/globals": ^29.5.0 "@langchain/community": ~0.0.0 "@langchain/core": ~0.0.11-rc.1 "@langchain/openai": ~0.0.2-rc.0 - "@mozilla/readability": ^0.4.4 "@notionhq/client": ^2.2.10 - "@opensearch-project/opensearch": ^2.2.0 "@pinecone-database/pinecone": ^1.1.0 - "@planetscale/database": ^1.8.0 - "@qdrant/js-client-rest": ^1.2.0 - "@raycast/api": ^1.55.2 - "@rockset/client": ^0.9.1 - "@smithy/eventstream-codec": ^2.0.5 - "@smithy/protocol-http": ^3.0.6 - "@smithy/signature-v4": ^2.0.10 - "@smithy/util-utf8": ^2.0.0 - "@supabase/postgrest-js": ^1.1.1 "@supabase/supabase-js": ^2.10.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 - "@tensorflow-models/universal-sentence-encoder": ^1.3.3 "@tensorflow/tfjs-backend-cpu": ^3 - "@tensorflow/tfjs-converter": ^3.6.0 - "@tensorflow/tfjs-core": ^3.6.0 "@tsconfig/recommended": ^1.0.2 "@types/d3-dsv": ^2 - "@types/decamelize": ^1.2.0 "@types/html-to-text": ^9 "@types/js-yaml": ^4 "@types/jsdom": ^21.1.1 - "@types/lodash": ^4 - "@types/mozilla-readability": ^0.2.1 "@types/pdf-parse": ^1.1.1 - "@types/pg": ^8 - "@types/pg-copy-streams": ^1.2.2 "@types/uuid": ^9 "@types/ws": ^8 "@typescript-eslint/eslint-plugin": ^5.58.0 "@typescript-eslint/parser": ^5.58.0 - "@upstash/redis": ^1.20.6 "@vercel/kv": ^0.2.3 - "@vercel/postgres": ^0.5.0 - "@writerai/writer-sdk": ^0.40.2 "@xata.io/client": ^0.28.0 - "@xenova/transformers": ^2.5.4 - "@zilliz/milvus2-sdk-node": ">=2.2.11" apify-client: ^2.7.1 assemblyai: ^2.0.2 axios: ^0.26.0 binary-extensions: ^2.2.0 - cassandra-driver: ^4.7.2 cheerio: ^1.0.0-rc.12 chromadb: ^1.5.3 - closevector-common: 0.1.0-alpha.1 - closevector-node: 0.1.0-alpha.10 - closevector-web: 0.1.0-alpha.15 - cohere-ai: ">=6.0.0" convex: ^1.3.1 d3-dsv: ^2.0.0 dotenv: ^16.0.3 @@ -23105,13 +23062,9 @@ __metadata: eslint-plugin-no-instanceof: ^1.0.1 eslint-plugin-prettier: ^4.2.1 expr-eval: ^2.0.2 - faiss-node: ^0.5.1 fast-xml-parser: ^4.2.7 - firebase-admin: ^11.9.0 google-auth-library: ^8.9.0 googleapis: ^126.0.1 - graphql: ^16.6.0 - hnswlib-node: ^1.4.2 html-to-text: ^9.0.5 ignore: ^5.2.0 ioredis: ^5.3.2 @@ -23123,44 +23076,30 @@ __metadata: jsonpointer: ^5.0.1 langchainhub: ~0.0.6 langsmith: ~0.0.48 - llmonitor: ^0.5.9 - lodash: ^4.17.21 mammoth: ^1.5.1 ml-distance: ^4.0.0 mongodb: ^5.2.0 - mysql2: ^3.3.3 - neo4j-driver: ^5.12.0 - node-llama-cpp: 2.7.3 notion-to-md: ^3.1.0 officeparser: ^4.0.4 openapi-types: ^12.1.3 p-retry: 4 pdf-parse: 1.1.1 peggy: ^3.0.2 - pg: ^8.11.0 - pg-copy-streams: ^6.0.5 - pickleparser: ^0.2.1 playwright: ^1.32.1 - portkey-ai: ^0.1.11 prettier: ^2.8.3 puppeteer: ^19.7.2 pyodide: ^0.24.1 redis: ^4.6.6 release-it: ^15.10.1 - replicate: ^0.18.0 rimraf: ^5.0.1 rollup: ^3.19.1 sonix-speech-recognition: ^2.1.1 - sqlite3: ^5.1.4 srt-parser-2: ^1.2.2 ts-jest: ^29.1.0 typeorm: ^0.3.12 typescript: ~5.1.6 - typesense: ^1.5.3 - usearch: ^1.1.1 uuid: ^9.0.0 vectordb: ^0.1.4 - voy-search: 0.6.2 weaviate-ts-client: ^1.4.0 web-auth-library: ^1.0.3 yaml: ^2.2.1 @@ -23174,92 +23113,45 @@ __metadata: "@aws-sdk/client-sfn": ^3.310.0 "@aws-sdk/credential-provider-node": ^3.388.0 "@azure/storage-blob": ^12.15.0 - "@clickhouse/client": ^0.2.5 - "@cloudflare/ai": ^1.0.12 - "@elastic/elasticsearch": ^8.4.0 - "@getmetal/metal-sdk": "*" - "@getzep/zep-js": ^0.9.0 "@gomomento/sdk": ^1.51.1 "@gomomento/sdk-core": ^1.51.1 "@gomomento/sdk-web": ^1.51.1 "@google-ai/generativelanguage": ^0.2.1 "@google-cloud/storage": ^6.10.1 - "@gradientai/nodejs-sdk": ^1.2.0 - "@huggingface/inference": ^2.6.4 - "@mozilla/readability": "*" "@notionhq/client": ^2.2.10 - "@opensearch-project/opensearch": "*" "@pinecone-database/pinecone": ^1.1.0 - "@planetscale/database": ^1.8.0 - "@qdrant/js-client-rest": ^1.2.0 - "@raycast/api": ^1.55.2 - "@rockset/client": ^0.9.1 - "@smithy/eventstream-codec": ^2.0.5 - "@smithy/protocol-http": ^3.0.6 - "@smithy/signature-v4": ^2.0.10 - "@smithy/util-utf8": ^2.0.0 - "@supabase/postgrest-js": ^1.1.1 "@supabase/supabase-js": ^2.10.0 - "@tensorflow-models/universal-sentence-encoder": "*" - "@tensorflow/tfjs-converter": "*" - "@tensorflow/tfjs-core": "*" - "@upstash/redis": ^1.20.6 "@vercel/kv": ^0.2.3 - "@vercel/postgres": ^0.5.0 - "@writerai/writer-sdk": ^0.40.2 "@xata.io/client": ^0.28.0 - "@xenova/transformers": ^2.5.4 - "@zilliz/milvus2-sdk-node": ">=2.2.7" apify-client: ^2.7.1 assemblyai: ^2.0.2 axios: "*" - cassandra-driver: ^4.7.2 cheerio: ^1.0.0-rc.12 chromadb: "*" - closevector-common: 0.1.0-alpha.1 - closevector-node: 0.1.0-alpha.10 - closevector-web: 0.1.0-alpha.16 - cohere-ai: ">=6.0.0" convex: ^1.3.1 d3-dsv: ^2.0.0 epub2: ^3.0.1 - faiss-node: ^0.5.1 fast-xml-parser: ^4.2.7 - firebase-admin: ^11.9.0 google-auth-library: ^8.9.0 googleapis: ^126.0.1 - hnswlib-node: ^1.4.2 html-to-text: ^9.0.5 ignore: ^5.2.0 ioredis: ^5.3.2 jsdom: "*" - llmonitor: ^0.5.9 - lodash: ^4.17.21 mammoth: "*" mongodb: ^5.2.0 - mysql2: ^3.3.3 - neo4j-driver: "*" - node-llama-cpp: "*" notion-to-md: ^3.1.0 officeparser: ^4.0.4 pdf-parse: 1.1.1 peggy: ^3.0.2 - pg: ^8.11.0 - pg-copy-streams: ^6.0.5 - pickleparser: ^0.2.1 playwright: ^1.32.1 - portkey-ai: ^0.1.11 puppeteer: ^19.7.2 pyodide: ^0.24.1 redis: ^4.6.4 - replicate: ^0.18.0 sonix-speech-recognition: ^2.1.1 srt-parser-2: ^1.2.2 typeorm: ^0.3.12 - typesense: ^1.5.3 - usearch: ^1.1.1 vectordb: ^0.1.4 - voy-search: 0.6.2 weaviate-ts-client: ^1.4.0 web-auth-library: ^1.0.3 ws: ^8.14.2 @@ -23276,16 +23168,6 @@ __metadata: optional: true "@azure/storage-blob": optional: true - "@clickhouse/client": - optional: true - "@cloudflare/ai": - optional: true - "@elastic/elasticsearch": - optional: true - "@getmetal/metal-sdk": - optional: true - "@getzep/zep-js": - optional: true "@gomomento/sdk": optional: true "@gomomento/sdk-core": @@ -23296,78 +23178,26 @@ __metadata: optional: true "@google-cloud/storage": optional: true - "@gradientai/nodejs-sdk": - optional: true - "@huggingface/inference": - optional: true - "@mozilla/readability": - optional: true "@notionhq/client": optional: true - "@opensearch-project/opensearch": - optional: true "@pinecone-database/pinecone": optional: true - "@planetscale/database": - optional: true - "@qdrant/js-client-rest": - optional: true - "@raycast/api": - optional: true - "@rockset/client": - optional: true - "@smithy/eventstream-codec": - optional: true - "@smithy/protocol-http": - optional: true - "@smithy/signature-v4": - optional: true - "@smithy/util-utf8": - optional: true - "@supabase/postgrest-js": - optional: true "@supabase/supabase-js": optional: true - "@tensorflow-models/universal-sentence-encoder": - optional: true - "@tensorflow/tfjs-converter": - optional: true - "@tensorflow/tfjs-core": - optional: true - "@upstash/redis": - optional: true "@vercel/kv": optional: true - "@vercel/postgres": - optional: true - "@writerai/writer-sdk": - optional: true "@xata.io/client": optional: true - "@xenova/transformers": - optional: true - "@zilliz/milvus2-sdk-node": - optional: true apify-client: optional: true assemblyai: optional: true axios: optional: true - cassandra-driver: - optional: true cheerio: optional: true chromadb: optional: true - closevector-common: - optional: true - closevector-node: - optional: true - closevector-web: - optional: true - cohere-ai: - optional: true convex: optional: true d3-dsv: @@ -23378,14 +23208,10 @@ __metadata: optional: true fast-xml-parser: optional: true - firebase-admin: - optional: true google-auth-library: optional: true googleapis: optional: true - hnswlib-node: - optional: true html-to-text: optional: true ignore: @@ -23394,20 +23220,10 @@ __metadata: optional: true jsdom: optional: true - llmonitor: - optional: true - lodash: - optional: true mammoth: optional: true mongodb: optional: true - mysql2: - optional: true - neo4j-driver: - optional: true - node-llama-cpp: - optional: true notion-to-md: optional: true officeparser: @@ -23416,38 +23232,22 @@ __metadata: optional: true peggy: optional: true - pg: - optional: true - pg-copy-streams: - optional: true - pickleparser: - optional: true playwright: optional: true - portkey-ai: - optional: true puppeteer: optional: true pyodide: optional: true redis: optional: true - replicate: - optional: true sonix-speech-recognition: optional: true srt-parser-2: optional: true typeorm: optional: true - typesense: - optional: true - usearch: - optional: true vectordb: optional: true - voy-search: - optional: true weaviate-ts-client: optional: true web-auth-library: From b64b64dd031426df070323be00cc886ea848ed9e Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 12:53:30 -0800 Subject: [PATCH 2/8] cr --- langchain/package.json | 5 +++++ yarn.lock | 4 ++++ 2 files changed, 9 insertions(+) diff --git a/langchain/package.json b/langchain/package.json index 3bc28589e197..88b55898d198 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -941,6 +941,7 @@ "jsdom": "^22.1.0", "mammoth": "^1.5.1", "mongodb": "^5.2.0", + "node-llama-cpp": "2.7.3", "notion-to-md": "^3.1.0", "officeparser": "^4.0.4", "pdf-parse": "1.1.1", @@ -997,6 +998,7 @@ "jsdom": "*", "mammoth": "*", "mongodb": "^5.2.0", + "node-llama-cpp": "*", "notion-to-md": "^3.1.0", "officeparser": "^4.0.4", "pdf-parse": "1.1.1", @@ -1115,6 +1117,9 @@ "mongodb": { "optional": true }, + "node-llama-cpp": { + "optional": true + }, "notion-to-md": { "optional": true }, diff --git a/yarn.lock b/yarn.lock index d475843879f7..436963494a37 100644 --- a/yarn.lock +++ b/yarn.lock @@ -23079,6 +23079,7 @@ __metadata: mammoth: ^1.5.1 ml-distance: ^4.0.0 mongodb: ^5.2.0 + node-llama-cpp: 2.7.3 notion-to-md: ^3.1.0 officeparser: ^4.0.4 openapi-types: ^12.1.3 @@ -23140,6 +23141,7 @@ __metadata: jsdom: "*" mammoth: "*" mongodb: ^5.2.0 + node-llama-cpp: "*" notion-to-md: ^3.1.0 officeparser: ^4.0.4 pdf-parse: 1.1.1 @@ -23224,6 +23226,8 @@ __metadata: optional: true mongodb: optional: true + node-llama-cpp: + optional: true notion-to-md: optional: true officeparser: From 6ed425b073c41216e568dcf7dcea782d81ba4eed Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 13:37:52 -0800 Subject: [PATCH 3/8] cr --- examples/src/guides/expression_language/runnable_history.ts | 2 +- .../expression_language/runnable_history_constructor_config.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/src/guides/expression_language/runnable_history.ts b/examples/src/guides/expression_language/runnable_history.ts index afcd7aade6c2..0d3130e07ff2 100644 --- a/examples/src/guides/expression_language/runnable_history.ts +++ b/examples/src/guides/expression_language/runnable_history.ts @@ -1,5 +1,5 @@ import { ChatOpenAI } from "langchain/chat_models/openai"; -import { ChatMessageHistory } from "langchain/stores/message/in_memory"; +import { ChatMessageHistory } from "langchain/memory"; import { ChatPromptTemplate, MessagesPlaceholder } from "langchain/prompts"; import { RunnableConfig, diff --git a/examples/src/guides/expression_language/runnable_history_constructor_config.ts b/examples/src/guides/expression_language/runnable_history_constructor_config.ts index 55405ccd95c5..b04f614ec22e 100644 --- a/examples/src/guides/expression_language/runnable_history_constructor_config.ts +++ b/examples/src/guides/expression_language/runnable_history_constructor_config.ts @@ -1,5 +1,5 @@ import { ChatOpenAI } from "langchain/chat_models/openai"; -import { ChatMessageHistory } from "langchain/stores/message/in_memory"; +import { ChatMessageHistory } from "langchain/memory"; import { ChatPromptTemplate, MessagesPlaceholder } from "langchain/prompts"; import { RunnableConfig, From ecaedd5895e3aa1629beaa53a1edfcbb95f03b28 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 13:40:01 -0800 Subject: [PATCH 4/8] cr --- libs/langchain-community/src/stores/tests/cassandra.int.test.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/langchain-community/src/stores/tests/cassandra.int.test.ts b/libs/langchain-community/src/stores/tests/cassandra.int.test.ts index 7eaa9807b4da..27d9b174a759 100644 --- a/libs/langchain-community/src/stores/tests/cassandra.int.test.ts +++ b/libs/langchain-community/src/stores/tests/cassandra.int.test.ts @@ -1,8 +1,8 @@ /* eslint-disable no-process-env */ import { test, expect, describe } from "@jest/globals"; import { Client } from "cassandra-driver"; -import { CassandraChatMessageHistory } from "../message/cassandra.js"; import { AIMessage, HumanMessage } from "@langchain/core/messages"; +import { CassandraChatMessageHistory } from "../message/cassandra.js"; const cassandraConfig = { cloud: { From 91f4ebfe22fa5173a2aba787d207b9ad21ba9d81 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 13:49:51 -0800 Subject: [PATCH 5/8] cr --- langchain-core/package.json | 1 + yarn.lock | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) diff --git a/langchain-core/package.json b/langchain-core/package.json index fafa426e1b89..37874ce20358 100644 --- a/langchain-core/package.json +++ b/langchain-core/package.json @@ -50,6 +50,7 @@ "@jest/globals": "^29.5.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", + "@types/decamelize": "^3.0.3", "dpdm": "^3.12.0", "eslint": "^8.33.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/yarn.lock b/yarn.lock index 436963494a37..bd78507c6bbf 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8394,6 +8394,7 @@ __metadata: "@jest/globals": ^29.5.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 + "@types/decamelize": ^3.0.3 ansi-styles: ^5.0.0 camelcase: 6 decamelize: 1.2.0 @@ -11546,6 +11547,15 @@ __metadata: languageName: node linkType: hard +"@types/decamelize@npm:^3.0.3": + version: 3.0.3 + resolution: "@types/decamelize@npm:3.0.3" + dependencies: + decamelize: "*" + checksum: a732187923218292bbe72f54fe49532e1e0ad2c121fe455ae598801e823455da9dfd91b333f29e39cb52c58a45e066c75b8ab64c8432aa22cbc83104ba2a81c0 + languageName: node + linkType: hard + "@types/eslint-scope@npm:^3.7.3": version: 3.7.5 resolution: "@types/eslint-scope@npm:3.7.5" @@ -16367,6 +16377,13 @@ __metadata: languageName: node linkType: hard +"decamelize@npm:*": + version: 6.0.0 + resolution: "decamelize@npm:6.0.0" + checksum: 0066bc30798ec11e01adf0c19ad975caef86545d4bb6f70cfb90b7eb8e3cbf7974cf774ac2e6ea2586e4e07b1f654bfecc4e772c42128a79a89f8584fc546753 + languageName: node + linkType: hard + "decamelize@npm:1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" From 52ece777566aa66b4684e8af1482523a360d7974 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 13:53:35 -0800 Subject: [PATCH 6/8] cr --- langchain-core/package.json | 1 - langchain/package.json | 1 + yarn.lock | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/langchain-core/package.json b/langchain-core/package.json index 37874ce20358..fafa426e1b89 100644 --- a/langchain-core/package.json +++ b/langchain-core/package.json @@ -50,7 +50,6 @@ "@jest/globals": "^29.5.0", "@swc/core": "^1.3.90", "@swc/jest": "^0.2.29", - "@types/decamelize": "^3.0.3", "dpdm": "^3.12.0", "eslint": "^8.33.0", "eslint-config-airbnb-base": "^15.0.0", diff --git a/langchain/package.json b/langchain/package.json index 88b55898d198..54ea194dc0f5 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -903,6 +903,7 @@ "@tensorflow/tfjs-backend-cpu": "^3", "@tsconfig/recommended": "^1.0.2", "@types/d3-dsv": "^2", + "@types/decamelize": "^3.0.3", "@types/html-to-text": "^9", "@types/js-yaml": "^4", "@types/jsdom": "^21.1.1", diff --git a/yarn.lock b/yarn.lock index bd78507c6bbf..f108af44095a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8394,7 +8394,6 @@ __metadata: "@jest/globals": ^29.5.0 "@swc/core": ^1.3.90 "@swc/jest": ^0.2.29 - "@types/decamelize": ^3.0.3 ansi-styles: ^5.0.0 camelcase: 6 decamelize: 1.2.0 @@ -23050,6 +23049,7 @@ __metadata: "@tensorflow/tfjs-backend-cpu": ^3 "@tsconfig/recommended": ^1.0.2 "@types/d3-dsv": ^2 + "@types/decamelize": ^3.0.3 "@types/html-to-text": ^9 "@types/js-yaml": ^4 "@types/jsdom": ^21.1.1 From ce7e964d0a827fdcc2f4a88cad928cc00c3b7444 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 14:00:31 -0800 Subject: [PATCH 7/8] cr --- langchain/package.json | 2 +- yarn.lock | 19 +++++-------------- 2 files changed, 6 insertions(+), 15 deletions(-) diff --git a/langchain/package.json b/langchain/package.json index 54ea194dc0f5..de932b6b4670 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -903,7 +903,7 @@ "@tensorflow/tfjs-backend-cpu": "^3", "@tsconfig/recommended": "^1.0.2", "@types/d3-dsv": "^2", - "@types/decamelize": "^3.0.3", + "@types/decamelize": "^1.2.0", "@types/html-to-text": "^9", "@types/js-yaml": "^4", "@types/jsdom": "^21.1.1", diff --git a/yarn.lock b/yarn.lock index f108af44095a..6a69ef1c9c19 100644 --- a/yarn.lock +++ b/yarn.lock @@ -11546,12 +11546,10 @@ __metadata: languageName: node linkType: hard -"@types/decamelize@npm:^3.0.3": - version: 3.0.3 - resolution: "@types/decamelize@npm:3.0.3" - dependencies: - decamelize: "*" - checksum: a732187923218292bbe72f54fe49532e1e0ad2c121fe455ae598801e823455da9dfd91b333f29e39cb52c58a45e066c75b8ab64c8432aa22cbc83104ba2a81c0 +"@types/decamelize@npm:^1.2.0": + version: 1.2.0 + resolution: "@types/decamelize@npm:1.2.0" + checksum: cff4e926bf771f8ad6423ab8c5119d6b8679c09aaf9f0b26a4a1dbcf324c0b1df183c2bfe688b90b6f880d8e864684a2806a22529b4ee404fd9160f9c123853d languageName: node linkType: hard @@ -16376,13 +16374,6 @@ __metadata: languageName: node linkType: hard -"decamelize@npm:*": - version: 6.0.0 - resolution: "decamelize@npm:6.0.0" - checksum: 0066bc30798ec11e01adf0c19ad975caef86545d4bb6f70cfb90b7eb8e3cbf7974cf774ac2e6ea2586e4e07b1f654bfecc4e772c42128a79a89f8584fc546753 - languageName: node - linkType: hard - "decamelize@npm:1.2.0": version: 1.2.0 resolution: "decamelize@npm:1.2.0" @@ -23049,7 +23040,7 @@ __metadata: "@tensorflow/tfjs-backend-cpu": ^3 "@tsconfig/recommended": ^1.0.2 "@types/d3-dsv": ^2 - "@types/decamelize": ^3.0.3 + "@types/decamelize": ^1.2.0 "@types/html-to-text": ^9 "@types/js-yaml": ^4 "@types/jsdom": ^21.1.1 From 2559bf1c5f21219688845d1c48bb95a597116882 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Fri, 8 Dec 2023 16:37:11 -0800 Subject: [PATCH 8/8] cr --- libs/langchain-community/vectorstores/memory.cjs | 1 - libs/langchain-community/vectorstores/memory.d.ts | 1 - libs/langchain-community/vectorstores/memory.js | 1 - 3 files changed, 3 deletions(-) delete mode 100644 libs/langchain-community/vectorstores/memory.cjs delete mode 100644 libs/langchain-community/vectorstores/memory.d.ts delete mode 100644 libs/langchain-community/vectorstores/memory.js diff --git a/libs/langchain-community/vectorstores/memory.cjs b/libs/langchain-community/vectorstores/memory.cjs deleted file mode 100644 index 1c916f1c6f16..000000000000 --- a/libs/langchain-community/vectorstores/memory.cjs +++ /dev/null @@ -1 +0,0 @@ -module.exports = require('../dist/vectorstores/memory.cjs'); \ No newline at end of file diff --git a/libs/langchain-community/vectorstores/memory.d.ts b/libs/langchain-community/vectorstores/memory.d.ts deleted file mode 100644 index ca5793359e65..000000000000 --- a/libs/langchain-community/vectorstores/memory.d.ts +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/vectorstores/memory.js' \ No newline at end of file diff --git a/libs/langchain-community/vectorstores/memory.js b/libs/langchain-community/vectorstores/memory.js deleted file mode 100644 index ca5793359e65..000000000000 --- a/libs/langchain-community/vectorstores/memory.js +++ /dev/null @@ -1 +0,0 @@ -export * from '../dist/vectorstores/memory.js' \ No newline at end of file