diff --git a/README.md b/README.md
index 21a4619ab658..c5bf7bec6d6f 100644
--- a/README.md
+++ b/README.md
@@ -3,7 +3,7 @@
β‘ Building applications with LLMs through composability β‘
[![CI](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml/badge.svg)](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dw/langchain) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS) [![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langchain-ai/langchainjs)
-[](https://codespaces.new/hwchase17/langchainjs)
+[](https://codespaces.new/langchain-ai/langchainjs)
Looking for the Python version? Check out [LangChain](https://github.com/langchain-ai/langchain).
diff --git a/docs/api_refs/package.json b/docs/api_refs/package.json
index b87b7c3a010f..f8f883b22695 100644
--- a/docs/api_refs/package.json
+++ b/docs/api_refs/package.json
@@ -5,8 +5,9 @@
"scripts": {
"dev": "next dev -p 3001",
"typedoc": "npx typedoc --options typedoc.json",
- "build:scripts": "node ./scripts/generate-api-refs.js && node ./scripts/update-typedoc-css.js",
+ "build:scripts": "yarn typedoc && node ./scripts/update-typedoc-css.js",
"build": "yarn run build:deps && yarn build:scripts && next build",
+ "build:vercel": "yarn run build:deps --force && yarn build:scripts && next build",
"build:deps": "yarn run turbo:command build --filter=@langchain/core --filter=@langchain/anthropic --filter=@langchain/openai --filter=@langchain/community --filter=langchain --concurrency=1",
"start": "yarn build && next start -p 3001",
"lint": "next lint"
diff --git a/docs/api_refs/scripts/generate-api-refs.js b/docs/api_refs/scripts/generate-api-refs.js
deleted file mode 100644
index 2532c01ee05b..000000000000
--- a/docs/api_refs/scripts/generate-api-refs.js
+++ /dev/null
@@ -1,104 +0,0 @@
-const { Project, SyntaxKind } = require("ts-morph");
-const { exec } = require("child_process");
-
-async function updateCodeWithIgnoreTags(tsConfigFilePath) {
- const project = new Project({
- tsConfigFilePath,
- });
- const sourceFiles = project.getSourceFiles();
- /**
- * @type {Array>}
- */
- let changes = [];
-
- const syntaxTypes = [
- SyntaxKind.MethodDeclaration,
- SyntaxKind.PropertyDeclaration,
- SyntaxKind.GetAccessor,
- SyntaxKind.SetAccessor,
- SyntaxKind.MethodSignature,
- SyntaxKind.PropertySignature,
- ];
-
- sourceFiles.forEach((sourceFile) => {
- sourceFile.getClasses().forEach((cls) => {
- // Check instance members
- cls.getInstanceMembers().forEach((member) => {
- checkMember(member);
- });
-
- // Check static members
- cls.getStaticMembers().forEach((member) => {
- checkMember(member);
- });
- });
- });
-
- function checkMember(member) {
- if (syntaxTypes.includes(member.getKind())) {
- const name = member.getName();
- if (name.startsWith("_") || name.startsWith("lc_")) {
- const jsDocs = member.getJsDocs();
- const hasIgnoreTag = jsDocs.some((jsDoc) =>
- jsDoc.getTags().some((tag) => tag.getTagName() === "ignore")
- );
- if (!hasIgnoreTag) {
- const jsDocText = `/** @ignore */\n `;
- const start = member.getStart();
- changes.push({
- sourceFile: member.getSourceFile(),
- start,
- jsDocText,
- });
- }
- }
- }
- }
-
- // Sort changes in reverse order by start position so updating
- // the source file doesn't mess up the start position of the next change
- changes.sort((a, b) => b.start - a.start);
- // Apply changes after iterating over the AST
- changes.forEach(({ sourceFile, start, jsDocText }) => {
- sourceFile.insertText(start, jsDocText);
- });
-
- await project.save();
-}
-
-async function copyLangChain(pathToLangChain) {
- try {
- await execAsync(`rm -rf ./langchain`);
- } catch (_) {
- // no-op
- }
- await execAsync(`cp -r ${pathToLangChain} ./langchain`);
- return {
- rootPath: `${process.cwd()}/langchain`,
- tsConfigPath: `${process.cwd()}/langchain/tsconfig.json`,
- };
-}
-
-async function deleteLangChain(pathToLangChain) {
- // delete the langchain dir
- await execAsync(`rm -rf ${pathToLangChain}`);
-}
-
-const execAsync = async (command, options) => new Promise((resolve, reject) => {
- exec(command, options, (err, stdout, stderr) => {
- if (err) {
- reject(err);
- } else {
- resolve(stdout);
- }
- });
-});
-
-async function main() {
- const pathToLangChain = "../../langchain";
- const { rootPath, tsConfigPath } = await copyLangChain(pathToLangChain);
- await updateCodeWithIgnoreTags(tsConfigPath);
- await execAsync("yarn typedoc");
- await deleteLangChain(rootPath);
-}
-main();
diff --git a/docs/api_refs/typedoc.json b/docs/api_refs/typedoc.json
index 378c86f4d173..8fa89bf172a8 100644
--- a/docs/api_refs/typedoc.json
+++ b/docs/api_refs/typedoc.json
@@ -8,7 +8,10 @@
"required-first",
"alphabetical"
],
- "tsconfig": "./langchain/tsconfig.json",
+ "plugin": [
+ "./typedoc_plugins/hide_underscore_lc.js"
+ ],
+ "tsconfig": "../../langchain/tsconfig.json",
"readme": "none",
"excludePrivate": true,
"excludeInternal": true,
@@ -18,285 +21,285 @@
"sourceLinkTemplate": "https://github.com/langchain-ai/langchainjs/blob/{gitRevision}/{path}#L{line}",
"logLevel": "Error",
"entryPoints": [
- "./langchain/src/load/index.ts",
- "./langchain/src/load/serializable.ts",
- "./langchain/src/agents/index.ts",
- "./langchain/src/agents/load.ts",
- "./langchain/src/agents/toolkits/index.ts",
- "./langchain/src/agents/toolkits/aws_sfn.ts",
- "./langchain/src/agents/toolkits/connery/index.ts",
- "./langchain/src/agents/toolkits/sql/index.ts",
- "./langchain/src/agents/format_scratchpad/openai_functions.ts",
- "./langchain/src/agents/format_scratchpad/openai_tools.ts",
- "./langchain/src/agents/format_scratchpad/log.ts",
- "./langchain/src/agents/format_scratchpad/xml.ts",
- "./langchain/src/agents/format_scratchpad/log_to_message.ts",
- "./langchain/src/agents/react/output_parser.ts",
- "./langchain/src/agents/xml/output_parser.ts",
- "./langchain/src/agents/openai/output_parser.ts",
- "./langchain/src/base_language/index.ts",
- "./langchain/src/tools/index.ts",
- "./langchain/src/tools/aws_lambda.ts",
- "./langchain/src/tools/aws_sfn.ts",
- "./langchain/src/tools/calculator.ts",
- "./langchain/src/tools/connery.ts",
- "./langchain/src/tools/render.ts",
- "./langchain/src/tools/sql.ts",
- "./langchain/src/tools/webbrowser.ts",
- "./langchain/src/tools/gmail/index.ts",
- "./langchain/src/tools/google_calendar/index.ts",
- "./langchain/src/tools/google_places.ts",
- "./langchain/src/chains/index.ts",
- "./langchain/src/chains/combine_documents/reduce.ts",
- "./langchain/src/chains/load.ts",
- "./langchain/src/chains/openai_functions/index.ts",
- "./langchain/src/chains/query_constructor/index.ts",
- "./langchain/src/chains/query_constructor/ir.ts",
- "./langchain/src/chains/sql_db/index.ts",
- "./langchain/src/chains/graph_qa/cypher.ts",
- "./langchain/src/embeddings/base.ts",
- "./langchain/src/embeddings/bedrock.ts",
- "./langchain/src/embeddings/cache_backed.ts",
- "./langchain/src/embeddings/cloudflare_workersai.ts",
- "./langchain/src/embeddings/fake.ts",
- "./langchain/src/embeddings/ollama.ts",
- "./langchain/src/embeddings/openai.ts",
- "./langchain/src/embeddings/cohere.ts",
- "./langchain/src/embeddings/tensorflow.ts",
- "./langchain/src/embeddings/hf.ts",
- "./langchain/src/embeddings/hf_transformers.ts",
- "./langchain/src/embeddings/googlevertexai.ts",
- "./langchain/src/embeddings/googlepalm.ts",
- "./langchain/src/embeddings/minimax.ts",
- "./langchain/src/embeddings/voyage.ts",
- "./langchain/src/embeddings/llama_cpp.ts",
- "./langchain/src/embeddings/gradient_ai.ts",
- "./langchain/src/llms/load.ts",
- "./langchain/src/llms/base.ts",
- "./langchain/src/llms/openai.ts",
- "./langchain/src/llms/ai21.ts",
- "./langchain/src/llms/aleph_alpha.ts",
- "./langchain/src/llms/cloudflare_workersai.ts",
- "./langchain/src/llms/cohere.ts",
- "./langchain/src/llms/hf.ts",
- "./langchain/src/llms/raycast.ts",
- "./langchain/src/llms/ollama.ts",
- "./langchain/src/llms/replicate.ts",
- "./langchain/src/llms/fireworks.ts",
- "./langchain/src/llms/googlevertexai/index.ts",
- "./langchain/src/llms/googlevertexai/web.ts",
- "./langchain/src/llms/googlepalm.ts",
- "./langchain/src/llms/gradient_ai.ts",
- "./langchain/src/llms/sagemaker_endpoint.ts",
- "./langchain/src/llms/watsonx_ai.ts",
- "./langchain/src/llms/bedrock/index.ts",
- "./langchain/src/llms/bedrock/web.ts",
- "./langchain/src/llms/llama_cpp.ts",
- "./langchain/src/llms/writer.ts",
- "./langchain/src/llms/portkey.ts",
- "./langchain/src/llms/yandex.ts",
- "./langchain/src/llms/fake.ts",
- "./langchain/src/prompts/index.ts",
- "./langchain/src/prompts/load.ts",
- "./langchain/src/vectorstores/clickhouse.ts",
- "./langchain/src/vectorstores/analyticdb.ts",
- "./langchain/src/vectorstores/base.ts",
- "./langchain/src/vectorstores/cassandra.ts",
- "./langchain/src/vectorstores/convex.ts",
- "./langchain/src/vectorstores/elasticsearch.ts",
- "./langchain/src/vectorstores/memory.ts",
- "./langchain/src/vectorstores/cloudflare_vectorize.ts",
- "./langchain/src/vectorstores/closevector/web.ts",
- "./langchain/src/vectorstores/closevector/node.ts",
- "./langchain/src/vectorstores/chroma.ts",
- "./langchain/src/vectorstores/googlevertexai.ts",
- "./langchain/src/vectorstores/hnswlib.ts",
- "./langchain/src/vectorstores/faiss.ts",
- "./langchain/src/vectorstores/weaviate.ts",
- "./langchain/src/vectorstores/lancedb.ts",
- "./langchain/src/vectorstores/momento_vector_index.ts",
- "./langchain/src/vectorstores/mongo.ts",
- "./langchain/src/vectorstores/mongodb_atlas.ts",
- "./langchain/src/vectorstores/pinecone.ts",
- "./langchain/src/vectorstores/qdrant.ts",
- "./langchain/src/vectorstores/supabase.ts",
- "./langchain/src/vectorstores/opensearch.ts",
- "./langchain/src/vectorstores/pgvector.ts",
- "./langchain/src/vectorstores/milvus.ts",
- "./langchain/src/vectorstores/neo4j_vector.ts",
- "./langchain/src/vectorstores/prisma.ts",
- "./langchain/src/vectorstores/typeorm.ts",
- "./langchain/src/vectorstores/myscale.ts",
- "./langchain/src/vectorstores/redis.ts",
- "./langchain/src/vectorstores/rockset.ts",
- "./langchain/src/vectorstores/typesense.ts",
- "./langchain/src/vectorstores/singlestore.ts",
- "./langchain/src/vectorstores/tigris.ts",
- "./langchain/src/vectorstores/usearch.ts",
- "./langchain/src/vectorstores/vectara.ts",
- "./langchain/src/vectorstores/vercel_postgres.ts",
- "./langchain/src/vectorstores/voy.ts",
- "./langchain/src/vectorstores/xata.ts",
- "./langchain/src/vectorstores/zep.ts",
- "./langchain/src/text_splitter.ts",
- "./langchain/src/memory/index.ts",
- "./langchain/src/memory/zep.ts",
- "./langchain/src/document.ts",
- "./langchain/src/document_loaders/base.ts",
- "./langchain/src/document_loaders/web/apify_dataset.ts",
- "./langchain/src/document_loaders/web/assemblyai.ts",
- "./langchain/src/document_loaders/web/azure_blob_storage_container.ts",
- "./langchain/src/document_loaders/web/azure_blob_storage_file.ts",
- "./langchain/src/document_loaders/web/cheerio.ts",
- "./langchain/src/document_loaders/web/puppeteer.ts",
- "./langchain/src/document_loaders/web/playwright.ts",
- "./langchain/src/document_loaders/web/college_confidential.ts",
- "./langchain/src/document_loaders/web/gitbook.ts",
- "./langchain/src/document_loaders/web/hn.ts",
- "./langchain/src/document_loaders/web/imsdb.ts",
- "./langchain/src/document_loaders/web/figma.ts",
- "./langchain/src/document_loaders/web/github.ts",
- "./langchain/src/document_loaders/web/notiondb.ts",
- "./langchain/src/document_loaders/web/notionapi.ts",
- "./langchain/src/document_loaders/web/pdf.ts",
- "./langchain/src/document_loaders/web/recursive_url.ts",
- "./langchain/src/document_loaders/web/s3.ts",
- "./langchain/src/document_loaders/web/sonix_audio.ts",
- "./langchain/src/document_loaders/web/confluence.ts",
- "./langchain/src/document_loaders/web/searchapi.ts",
- "./langchain/src/document_loaders/web/serpapi.ts",
- "./langchain/src/document_loaders/web/sort_xyz_blockchain.ts",
- "./langchain/src/document_loaders/web/youtube.ts",
- "./langchain/src/document_loaders/fs/directory.ts",
- "./langchain/src/document_loaders/fs/buffer.ts",
- "./langchain/src/document_loaders/fs/chatgpt.ts",
- "./langchain/src/document_loaders/fs/text.ts",
- "./langchain/src/document_loaders/fs/json.ts",
- "./langchain/src/document_loaders/fs/srt.ts",
- "./langchain/src/document_loaders/fs/pdf.ts",
- "./langchain/src/document_loaders/fs/docx.ts",
- "./langchain/src/document_loaders/fs/epub.ts",
- "./langchain/src/document_loaders/fs/csv.ts",
- "./langchain/src/document_loaders/fs/notion.ts",
- "./langchain/src/document_loaders/fs/obsidian.ts",
- "./langchain/src/document_loaders/fs/unstructured.ts",
- "./langchain/src/document_loaders/fs/openai_whisper_audio.ts",
- "./langchain/src/document_loaders/fs/pptx.ts",
- "./langchain/src/document_transformers/html_to_text.ts",
- "./langchain/src/document_transformers/mozilla_readability.ts",
- "./langchain/src/document_transformers/openai_functions.ts",
- "./langchain/src/chat_models/base.ts",
- "./langchain/src/chat_models/openai.ts",
- "./langchain/src/chat_models/portkey.ts",
- "./langchain/src/chat_models/anthropic.ts",
- "./langchain/src/chat_models/bedrock/index.ts",
- "./langchain/src/chat_models/bedrock/web.ts",
- "./langchain/src/chat_models/cloudflare_workersai.ts",
- "./langchain/src/chat_models/googlevertexai/index.ts",
- "./langchain/src/chat_models/googlevertexai/web.ts",
- "./langchain/src/chat_models/googlepalm.ts",
- "./langchain/src/chat_models/fireworks.ts",
- "./langchain/src/chat_models/baiduwenxin.ts",
- "./langchain/src/chat_models/iflytek_xinghuo/index.ts",
- "./langchain/src/chat_models/iflytek_xinghuo/web.ts",
- "./langchain/src/chat_models/ollama.ts",
- "./langchain/src/chat_models/minimax.ts",
- "./langchain/src/chat_models/llama_cpp.ts",
- "./langchain/src/chat_models/yandex.ts",
- "./langchain/src/chat_models/fake.ts",
- "./langchain/src/schema/index.ts",
- "./langchain/src/schema/document.ts",
- "./langchain/src/schema/output_parser.ts",
- "./langchain/src/schema/prompt_template.ts",
- "./langchain/src/schema/query_constructor.ts",
- "./langchain/src/schema/retriever.ts",
- "./langchain/src/schema/runnable/index.ts",
- "./langchain/src/schema/storage.ts",
- "./langchain/src/sql_db.ts",
- "./langchain/src/callbacks/index.ts",
- "./langchain/src/callbacks/handlers/llmonitor.ts",
- "./langchain/src/output_parsers/index.ts",
- "./langchain/src/output_parsers/expression.ts",
- "./langchain/src/retrievers/amazon_kendra.ts",
- "./langchain/src/retrievers/remote/index.ts",
- "./langchain/src/retrievers/supabase.ts",
- "./langchain/src/retrievers/zep.ts",
- "./langchain/src/retrievers/metal.ts",
- "./langchain/src/retrievers/chaindesk.ts",
- "./langchain/src/retrievers/databerry.ts",
- "./langchain/src/retrievers/contextual_compression.ts",
- "./langchain/src/retrievers/document_compressors/index.ts",
- "./langchain/src/retrievers/multi_query.ts",
- "./langchain/src/retrievers/multi_vector.ts",
- "./langchain/src/retrievers/parent_document.ts",
- "./langchain/src/retrievers/tavily_search_api.ts",
- "./langchain/src/retrievers/time_weighted.ts",
- "./langchain/src/retrievers/document_compressors/chain_extract.ts",
- "./langchain/src/retrievers/document_compressors/embeddings_filter.ts",
- "./langchain/src/retrievers/hyde.ts",
- "./langchain/src/retrievers/score_threshold.ts",
- "./langchain/src/retrievers/self_query/index.ts",
- "./langchain/src/retrievers/self_query/chroma.ts",
- "./langchain/src/retrievers/self_query/functional.ts",
- "./langchain/src/retrievers/self_query/pinecone.ts",
- "./langchain/src/retrievers/self_query/supabase.ts",
- "./langchain/src/retrievers/self_query/weaviate.ts",
- "./langchain/src/retrievers/self_query/vectara.ts",
- "./langchain/src/retrievers/vespa.ts",
- "./langchain/src/cache/index.ts",
- "./langchain/src/cache/cloudflare_kv.ts",
- "./langchain/src/cache/momento.ts",
- "./langchain/src/cache/redis.ts",
- "./langchain/src/cache/ioredis.ts",
- "./langchain/src/cache/file_system.ts",
- "./langchain/src/cache/upstash_redis.ts",
- "./langchain/src/stores/doc/in_memory.ts",
- "./langchain/src/stores/doc/gcs.ts",
- "./langchain/src/stores/file/in_memory.ts",
- "./langchain/src/stores/file/node.ts",
- "./langchain/src/stores/message/cassandra.ts",
- "./langchain/src/stores/message/convex.ts",
- "./langchain/src/stores/message/cloudflare_d1.ts",
- "./langchain/src/stores/message/in_memory.ts",
- "./langchain/src/stores/message/dynamodb.ts",
- "./langchain/src/stores/message/firestore.ts",
- "./langchain/src/stores/message/momento.ts",
- "./langchain/src/stores/message/mongodb.ts",
- "./langchain/src/stores/message/redis.ts",
- "./langchain/src/stores/message/ioredis.ts",
- "./langchain/src/stores/message/upstash_redis.ts",
- "./langchain/src/stores/message/planetscale.ts",
- "./langchain/src/stores/message/xata.ts",
- "./langchain/src/storage/convex.ts",
- "./langchain/src/storage/encoder_backed.ts",
- "./langchain/src/storage/in_memory.ts",
- "./langchain/src/storage/ioredis.ts",
- "./langchain/src/storage/vercel_kv.ts",
- "./langchain/src/storage/upstash_redis.ts",
- "./langchain/src/storage/file_system.ts",
- "./langchain/src/graphs/neo4j_graph.ts",
- "./langchain/src/hub.ts",
- "./langchain/src/util/convex.ts",
- "./langchain/src/util/document.ts",
- "./langchain/src/util/math.ts",
- "./langchain/src/util/time.ts",
- "./langchain/src/experimental/autogpt/index.ts",
- "./langchain/src/experimental/openai_assistant/index.ts",
- "./langchain/src/experimental/openai_files/index.ts",
- "./langchain/src/experimental/babyagi/index.ts",
- "./langchain/src/experimental/generative_agents/index.ts",
- "./langchain/src/experimental/plan_and_execute/index.ts",
- "./langchain/src/experimental/multimodal_embeddings/googlevertexai.ts",
- "./langchain/src/experimental/chat_models/anthropic_functions.ts",
- "./langchain/src/experimental/chat_models/bittensor.ts",
- "./langchain/src/experimental/chat_models/ollama_functions.ts",
- "./langchain/src/experimental/llms/bittensor.ts",
- "./langchain/src/experimental/hubs/makersuite/googlemakersuitehub.ts",
- "./langchain/src/experimental/chains/violation_of_expectations/index.ts",
- "./langchain/src/experimental/masking/index.ts",
- "./langchain/src/experimental/tools/pyinterpreter.ts",
- "./langchain/src/evaluation/index.ts",
- "./langchain/src/runnables/index.ts",
- "./langchain/src/runnables/remote.ts"
+ "../../langchain/src/load/index.ts",
+ "../../langchain/src/load/serializable.ts",
+ "../../langchain/src/agents/index.ts",
+ "../../langchain/src/agents/load.ts",
+ "../../langchain/src/agents/toolkits/index.ts",
+ "../../langchain/src/agents/toolkits/aws_sfn.ts",
+ "../../langchain/src/agents/toolkits/connery/index.ts",
+ "../../langchain/src/agents/toolkits/sql/index.ts",
+ "../../langchain/src/agents/format_scratchpad/openai_functions.ts",
+ "../../langchain/src/agents/format_scratchpad/openai_tools.ts",
+ "../../langchain/src/agents/format_scratchpad/log.ts",
+ "../../langchain/src/agents/format_scratchpad/xml.ts",
+ "../../langchain/src/agents/format_scratchpad/log_to_message.ts",
+ "../../langchain/src/agents/react/output_parser.ts",
+ "../../langchain/src/agents/xml/output_parser.ts",
+ "../../langchain/src/agents/openai/output_parser.ts",
+ "../../langchain/src/base_language/index.ts",
+ "../../langchain/src/tools/index.ts",
+ "../../langchain/src/tools/aws_lambda.ts",
+ "../../langchain/src/tools/aws_sfn.ts",
+ "../../langchain/src/tools/calculator.ts",
+ "../../langchain/src/tools/connery.ts",
+ "../../langchain/src/tools/render.ts",
+ "../../langchain/src/tools/sql.ts",
+ "../../langchain/src/tools/webbrowser.ts",
+ "../../langchain/src/tools/gmail/index.ts",
+ "../../langchain/src/tools/google_calendar/index.ts",
+ "../../langchain/src/tools/google_places.ts",
+ "../../langchain/src/chains/index.ts",
+ "../../langchain/src/chains/combine_documents/reduce.ts",
+ "../../langchain/src/chains/load.ts",
+ "../../langchain/src/chains/openai_functions/index.ts",
+ "../../langchain/src/chains/query_constructor/index.ts",
+ "../../langchain/src/chains/query_constructor/ir.ts",
+ "../../langchain/src/chains/sql_db/index.ts",
+ "../../langchain/src/chains/graph_qa/cypher.ts",
+ "../../langchain/src/embeddings/base.ts",
+ "../../langchain/src/embeddings/bedrock.ts",
+ "../../langchain/src/embeddings/cache_backed.ts",
+ "../../langchain/src/embeddings/cloudflare_workersai.ts",
+ "../../langchain/src/embeddings/fake.ts",
+ "../../langchain/src/embeddings/ollama.ts",
+ "../../langchain/src/embeddings/openai.ts",
+ "../../langchain/src/embeddings/cohere.ts",
+ "../../langchain/src/embeddings/tensorflow.ts",
+ "../../langchain/src/embeddings/hf.ts",
+ "../../langchain/src/embeddings/hf_transformers.ts",
+ "../../langchain/src/embeddings/googlevertexai.ts",
+ "../../langchain/src/embeddings/googlepalm.ts",
+ "../../langchain/src/embeddings/minimax.ts",
+ "../../langchain/src/embeddings/voyage.ts",
+ "../../langchain/src/embeddings/llama_cpp.ts",
+ "../../langchain/src/embeddings/gradient_ai.ts",
+ "../../langchain/src/llms/load.ts",
+ "../../langchain/src/llms/base.ts",
+ "../../langchain/src/llms/openai.ts",
+ "../../langchain/src/llms/ai21.ts",
+ "../../langchain/src/llms/aleph_alpha.ts",
+ "../../langchain/src/llms/cloudflare_workersai.ts",
+ "../../langchain/src/llms/cohere.ts",
+ "../../langchain/src/llms/hf.ts",
+ "../../langchain/src/llms/raycast.ts",
+ "../../langchain/src/llms/ollama.ts",
+ "../../langchain/src/llms/replicate.ts",
+ "../../langchain/src/llms/fireworks.ts",
+ "../../langchain/src/llms/googlevertexai/index.ts",
+ "../../langchain/src/llms/googlevertexai/web.ts",
+ "../../langchain/src/llms/googlepalm.ts",
+ "../../langchain/src/llms/gradient_ai.ts",
+ "../../langchain/src/llms/sagemaker_endpoint.ts",
+ "../../langchain/src/llms/watsonx_ai.ts",
+ "../../langchain/src/llms/bedrock/index.ts",
+ "../../langchain/src/llms/bedrock/web.ts",
+ "../../langchain/src/llms/llama_cpp.ts",
+ "../../langchain/src/llms/writer.ts",
+ "../../langchain/src/llms/portkey.ts",
+ "../../langchain/src/llms/yandex.ts",
+ "../../langchain/src/llms/fake.ts",
+ "../../langchain/src/prompts/index.ts",
+ "../../langchain/src/prompts/load.ts",
+ "../../langchain/src/vectorstores/clickhouse.ts",
+ "../../langchain/src/vectorstores/analyticdb.ts",
+ "../../langchain/src/vectorstores/base.ts",
+ "../../langchain/src/vectorstores/cassandra.ts",
+ "../../langchain/src/vectorstores/convex.ts",
+ "../../langchain/src/vectorstores/elasticsearch.ts",
+ "../../langchain/src/vectorstores/memory.ts",
+ "../../langchain/src/vectorstores/cloudflare_vectorize.ts",
+ "../../langchain/src/vectorstores/closevector/web.ts",
+ "../../langchain/src/vectorstores/closevector/node.ts",
+ "../../langchain/src/vectorstores/chroma.ts",
+ "../../langchain/src/vectorstores/googlevertexai.ts",
+ "../../langchain/src/vectorstores/hnswlib.ts",
+ "../../langchain/src/vectorstores/faiss.ts",
+ "../../langchain/src/vectorstores/weaviate.ts",
+ "../../langchain/src/vectorstores/lancedb.ts",
+ "../../langchain/src/vectorstores/momento_vector_index.ts",
+ "../../langchain/src/vectorstores/mongo.ts",
+ "../../langchain/src/vectorstores/mongodb_atlas.ts",
+ "../../langchain/src/vectorstores/pinecone.ts",
+ "../../langchain/src/vectorstores/qdrant.ts",
+ "../../langchain/src/vectorstores/supabase.ts",
+ "../../langchain/src/vectorstores/opensearch.ts",
+ "../../langchain/src/vectorstores/pgvector.ts",
+ "../../langchain/src/vectorstores/milvus.ts",
+ "../../langchain/src/vectorstores/neo4j_vector.ts",
+ "../../langchain/src/vectorstores/prisma.ts",
+ "../../langchain/src/vectorstores/typeorm.ts",
+ "../../langchain/src/vectorstores/myscale.ts",
+ "../../langchain/src/vectorstores/redis.ts",
+ "../../langchain/src/vectorstores/rockset.ts",
+ "../../langchain/src/vectorstores/typesense.ts",
+ "../../langchain/src/vectorstores/singlestore.ts",
+ "../../langchain/src/vectorstores/tigris.ts",
+ "../../langchain/src/vectorstores/usearch.ts",
+ "../../langchain/src/vectorstores/vectara.ts",
+ "../../langchain/src/vectorstores/vercel_postgres.ts",
+ "../../langchain/src/vectorstores/voy.ts",
+ "../../langchain/src/vectorstores/xata.ts",
+ "../../langchain/src/vectorstores/zep.ts",
+ "../../langchain/src/text_splitter.ts",
+ "../../langchain/src/memory/index.ts",
+ "../../langchain/src/memory/zep.ts",
+ "../../langchain/src/document.ts",
+ "../../langchain/src/document_loaders/base.ts",
+ "../../langchain/src/document_loaders/web/apify_dataset.ts",
+ "../../langchain/src/document_loaders/web/assemblyai.ts",
+ "../../langchain/src/document_loaders/web/azure_blob_storage_container.ts",
+ "../../langchain/src/document_loaders/web/azure_blob_storage_file.ts",
+ "../../langchain/src/document_loaders/web/cheerio.ts",
+ "../../langchain/src/document_loaders/web/puppeteer.ts",
+ "../../langchain/src/document_loaders/web/playwright.ts",
+ "../../langchain/src/document_loaders/web/college_confidential.ts",
+ "../../langchain/src/document_loaders/web/gitbook.ts",
+ "../../langchain/src/document_loaders/web/hn.ts",
+ "../../langchain/src/document_loaders/web/imsdb.ts",
+ "../../langchain/src/document_loaders/web/figma.ts",
+ "../../langchain/src/document_loaders/web/github.ts",
+ "../../langchain/src/document_loaders/web/notiondb.ts",
+ "../../langchain/src/document_loaders/web/notionapi.ts",
+ "../../langchain/src/document_loaders/web/pdf.ts",
+ "../../langchain/src/document_loaders/web/recursive_url.ts",
+ "../../langchain/src/document_loaders/web/s3.ts",
+ "../../langchain/src/document_loaders/web/sonix_audio.ts",
+ "../../langchain/src/document_loaders/web/confluence.ts",
+ "../../langchain/src/document_loaders/web/searchapi.ts",
+ "../../langchain/src/document_loaders/web/serpapi.ts",
+ "../../langchain/src/document_loaders/web/sort_xyz_blockchain.ts",
+ "../../langchain/src/document_loaders/web/youtube.ts",
+ "../../langchain/src/document_loaders/fs/directory.ts",
+ "../../langchain/src/document_loaders/fs/buffer.ts",
+ "../../langchain/src/document_loaders/fs/chatgpt.ts",
+ "../../langchain/src/document_loaders/fs/text.ts",
+ "../../langchain/src/document_loaders/fs/json.ts",
+ "../../langchain/src/document_loaders/fs/srt.ts",
+ "../../langchain/src/document_loaders/fs/pdf.ts",
+ "../../langchain/src/document_loaders/fs/docx.ts",
+ "../../langchain/src/document_loaders/fs/epub.ts",
+ "../../langchain/src/document_loaders/fs/csv.ts",
+ "../../langchain/src/document_loaders/fs/notion.ts",
+ "../../langchain/src/document_loaders/fs/obsidian.ts",
+ "../../langchain/src/document_loaders/fs/unstructured.ts",
+ "../../langchain/src/document_loaders/fs/openai_whisper_audio.ts",
+ "../../langchain/src/document_loaders/fs/pptx.ts",
+ "../../langchain/src/document_transformers/html_to_text.ts",
+ "../../langchain/src/document_transformers/mozilla_readability.ts",
+ "../../langchain/src/document_transformers/openai_functions.ts",
+ "../../langchain/src/chat_models/base.ts",
+ "../../langchain/src/chat_models/openai.ts",
+ "../../langchain/src/chat_models/portkey.ts",
+ "../../langchain/src/chat_models/anthropic.ts",
+ "../../langchain/src/chat_models/bedrock/index.ts",
+ "../../langchain/src/chat_models/bedrock/web.ts",
+ "../../langchain/src/chat_models/cloudflare_workersai.ts",
+ "../../langchain/src/chat_models/googlevertexai/index.ts",
+ "../../langchain/src/chat_models/googlevertexai/web.ts",
+ "../../langchain/src/chat_models/googlepalm.ts",
+ "../../langchain/src/chat_models/fireworks.ts",
+ "../../langchain/src/chat_models/baiduwenxin.ts",
+ "../../langchain/src/chat_models/iflytek_xinghuo/index.ts",
+ "../../langchain/src/chat_models/iflytek_xinghuo/web.ts",
+ "../../langchain/src/chat_models/ollama.ts",
+ "../../langchain/src/chat_models/minimax.ts",
+ "../../langchain/src/chat_models/llama_cpp.ts",
+ "../../langchain/src/chat_models/yandex.ts",
+ "../../langchain/src/chat_models/fake.ts",
+ "../../langchain/src/schema/index.ts",
+ "../../langchain/src/schema/document.ts",
+ "../../langchain/src/schema/output_parser.ts",
+ "../../langchain/src/schema/prompt_template.ts",
+ "../../langchain/src/schema/query_constructor.ts",
+ "../../langchain/src/schema/retriever.ts",
+ "../../langchain/src/schema/runnable/index.ts",
+ "../../langchain/src/schema/storage.ts",
+ "../../langchain/src/sql_db.ts",
+ "../../langchain/src/callbacks/index.ts",
+ "../../langchain/src/callbacks/handlers/llmonitor.ts",
+ "../../langchain/src/output_parsers/index.ts",
+ "../../langchain/src/output_parsers/expression.ts",
+ "../../langchain/src/retrievers/amazon_kendra.ts",
+ "../../langchain/src/retrievers/remote/index.ts",
+ "../../langchain/src/retrievers/supabase.ts",
+ "../../langchain/src/retrievers/zep.ts",
+ "../../langchain/src/retrievers/metal.ts",
+ "../../langchain/src/retrievers/chaindesk.ts",
+ "../../langchain/src/retrievers/databerry.ts",
+ "../../langchain/src/retrievers/contextual_compression.ts",
+ "../../langchain/src/retrievers/document_compressors/index.ts",
+ "../../langchain/src/retrievers/multi_query.ts",
+ "../../langchain/src/retrievers/multi_vector.ts",
+ "../../langchain/src/retrievers/parent_document.ts",
+ "../../langchain/src/retrievers/tavily_search_api.ts",
+ "../../langchain/src/retrievers/time_weighted.ts",
+ "../../langchain/src/retrievers/document_compressors/chain_extract.ts",
+ "../../langchain/src/retrievers/document_compressors/embeddings_filter.ts",
+ "../../langchain/src/retrievers/hyde.ts",
+ "../../langchain/src/retrievers/score_threshold.ts",
+ "../../langchain/src/retrievers/self_query/index.ts",
+ "../../langchain/src/retrievers/self_query/chroma.ts",
+ "../../langchain/src/retrievers/self_query/functional.ts",
+ "../../langchain/src/retrievers/self_query/pinecone.ts",
+ "../../langchain/src/retrievers/self_query/supabase.ts",
+ "../../langchain/src/retrievers/self_query/weaviate.ts",
+ "../../langchain/src/retrievers/self_query/vectara.ts",
+ "../../langchain/src/retrievers/vespa.ts",
+ "../../langchain/src/cache/index.ts",
+ "../../langchain/src/cache/cloudflare_kv.ts",
+ "../../langchain/src/cache/momento.ts",
+ "../../langchain/src/cache/redis.ts",
+ "../../langchain/src/cache/ioredis.ts",
+ "../../langchain/src/cache/file_system.ts",
+ "../../langchain/src/cache/upstash_redis.ts",
+ "../../langchain/src/stores/doc/in_memory.ts",
+ "../../langchain/src/stores/doc/gcs.ts",
+ "../../langchain/src/stores/file/in_memory.ts",
+ "../../langchain/src/stores/file/node.ts",
+ "../../langchain/src/stores/message/cassandra.ts",
+ "../../langchain/src/stores/message/convex.ts",
+ "../../langchain/src/stores/message/cloudflare_d1.ts",
+ "../../langchain/src/stores/message/in_memory.ts",
+ "../../langchain/src/stores/message/dynamodb.ts",
+ "../../langchain/src/stores/message/firestore.ts",
+ "../../langchain/src/stores/message/momento.ts",
+ "../../langchain/src/stores/message/mongodb.ts",
+ "../../langchain/src/stores/message/redis.ts",
+ "../../langchain/src/stores/message/ioredis.ts",
+ "../../langchain/src/stores/message/upstash_redis.ts",
+ "../../langchain/src/stores/message/planetscale.ts",
+ "../../langchain/src/stores/message/xata.ts",
+ "../../langchain/src/storage/convex.ts",
+ "../../langchain/src/storage/encoder_backed.ts",
+ "../../langchain/src/storage/in_memory.ts",
+ "../../langchain/src/storage/ioredis.ts",
+ "../../langchain/src/storage/vercel_kv.ts",
+ "../../langchain/src/storage/upstash_redis.ts",
+ "../../langchain/src/storage/file_system.ts",
+ "../../langchain/src/graphs/neo4j_graph.ts",
+ "../../langchain/src/hub.ts",
+ "../../langchain/src/util/convex.ts",
+ "../../langchain/src/util/document.ts",
+ "../../langchain/src/util/math.ts",
+ "../../langchain/src/util/time.ts",
+ "../../langchain/src/experimental/autogpt/index.ts",
+ "../../langchain/src/experimental/openai_assistant/index.ts",
+ "../../langchain/src/experimental/openai_files/index.ts",
+ "../../langchain/src/experimental/babyagi/index.ts",
+ "../../langchain/src/experimental/generative_agents/index.ts",
+ "../../langchain/src/experimental/plan_and_execute/index.ts",
+ "../../langchain/src/experimental/multimodal_embeddings/googlevertexai.ts",
+ "../../langchain/src/experimental/chat_models/anthropic_functions.ts",
+ "../../langchain/src/experimental/chat_models/bittensor.ts",
+ "../../langchain/src/experimental/chat_models/ollama_functions.ts",
+ "../../langchain/src/experimental/llms/bittensor.ts",
+ "../../langchain/src/experimental/hubs/makersuite/googlemakersuitehub.ts",
+ "../../langchain/src/experimental/chains/violation_of_expectations/index.ts",
+ "../../langchain/src/experimental/masking/index.ts",
+ "../../langchain/src/experimental/tools/pyinterpreter.ts",
+ "../../langchain/src/evaluation/index.ts",
+ "../../langchain/src/runnables/index.ts",
+ "../../langchain/src/runnables/remote.ts"
]
}
diff --git a/docs/api_refs/typedoc_plugins/hide_underscore_lc.js b/docs/api_refs/typedoc_plugins/hide_underscore_lc.js
new file mode 100644
index 000000000000..c8f5e186e6d7
--- /dev/null
+++ b/docs/api_refs/typedoc_plugins/hide_underscore_lc.js
@@ -0,0 +1,70 @@
+const {
+ Application,
+ Converter,
+ Context,
+ ReflectionKind,
+ DeclarationReflection,
+} = require("typedoc");
+
+/**
+ * @param {Application} application
+ * @returns {void}
+ */
+function load(application) {
+ /**
+ * @type {Array}
+ */
+ let reflectionsToHide = [];
+
+ application.converter.on(
+ Converter.EVENT_CREATE_DECLARATION,
+ resolveReflection
+ );
+ application.converter.on(Converter.EVENT_RESOLVE_BEGIN, onBeginResolve);
+
+ const reflectionKindsToHide = [
+ ReflectionKind.Property,
+ ReflectionKind.Accessor,
+ ReflectionKind.Variable,
+ ReflectionKind.Method,
+ ReflectionKind.Function,
+ ReflectionKind.Class,
+ ReflectionKind.Interface,
+ ReflectionKind.Enum,
+ ReflectionKind.TypeAlias,
+ ];
+
+ /**
+ * @param {Context} context
+ * @returns {void}
+ */
+ function onBeginResolve(context) {
+ reflectionsToHide.forEach((reflection) => {
+ const { project } = context;
+ // Remove the property from documentation
+ project.removeReflection(reflection);
+ });
+ }
+
+ /**
+ * @param {Context} _context
+ * @param {DeclarationReflection} reflection
+ * @returns {void}
+ */
+ function resolveReflection(
+ _context,
+ reflection
+ ) {
+ const reflectionKind = reflection.kind;
+ if (reflectionKindsToHide.includes(reflectionKind)) {
+ if (
+ reflection.name.startsWith("_") ||
+ reflection.name.startsWith("lc_")
+ ) {
+ reflectionsToHide.push(reflection);
+ }
+ }
+ }
+}
+
+module.exports = { load };
diff --git a/docs/core_docs/package.json b/docs/core_docs/package.json
index 7483f76e2cf1..4ea0d6889864 100644
--- a/docs/core_docs/package.json
+++ b/docs/core_docs/package.json
@@ -6,7 +6,9 @@
"docusaurus": "docusaurus",
"start": "yarn build:typedoc && rimraf ./docs/api && NODE_OPTIONS=--max-old-space-size=7168 docusaurus start",
"build": "yarn build:typedoc && rimraf ./build && NODE_OPTIONS=--max-old-space-size=7168 DOCUSAURUS_SSR_CONCURRENCY=4 docusaurus build",
+ "build:vercel": "yarn build:typedoc:vercel && rimraf ./build && NODE_OPTIONS=--max-old-space-size=7168 DOCUSAURUS_SSR_CONCURRENCY=4 docusaurus build",
"build:typedoc": "yarn run turbo:command build --filter=api_refs",
+ "build:typedoc:vercel": "yarn run turbo:command build:vercel --filter=api_refs",
"swizzle": "docusaurus swizzle",
"deploy": "docusaurus deploy",
"clear": "docusaurus clear",
diff --git a/examples/package.json b/examples/package.json
index bbc292a7a930..477068885925 100644
--- a/examples/package.json
+++ b/examples/package.json
@@ -27,6 +27,7 @@
"@getmetal/metal-sdk": "^4.0.0",
"@getzep/zep-js": "^0.9.0",
"@gomomento/sdk": "^1.51.1",
+ "@langchain/community": "workspace:*",
"@opensearch-project/opensearch": "^2.2.0",
"@pinecone-database/pinecone": "^1.1.0",
"@planetscale/database": "^1.8.0",
diff --git a/langchain-core/README.md b/langchain-core/README.md
index c69646b77823..d885a1acddc1 100644
--- a/langchain-core/README.md
+++ b/langchain-core/README.md
@@ -1,21 +1,24 @@
-# π¦οΈπ @langchain/core
+# π¦ποΈ @langchain/core
-:::note
-This package is experimental at the moment and may change.
-:::
+[![CI](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml/badge.svg)](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dw/@langchain/core) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS)
`@langchain/core` contains the core abstractions and schemas of LangChain.js, including base classes for language models,
chat models, vectorstores, retrievers, and runnables.
-## π§ Usage
-
-Install core like this:
+## πΎ Quick Install
```bash
$ yarn add @langchain/core
```
-Then, you can install other provider-specific packages like this:
+## π€ What is this?
+
+`@langchain/core` contains the base abstractions that power the rest of the LangChain ecosystem.
+These abstractions are designed to be as modular and simple as possible.
+Examples of these abstractions include those for language models, document loaders, embedding models, vectorstores, retrievers, and more.
+The benefit of having these abstractions is that any provider can implement the required interface and then easily be used in the rest of the LangChain ecosystem.
+
+For example, you can install other provider-specific packages like this:
```bash
$ yarn add @langchain/openai
@@ -66,11 +69,44 @@ leigh
```
Note that for compatibility, all used LangChain packages (including the base LangChain package, which itself depends on core!) must share the same version of `@langchain/core`.
-This means that you may need to install a specific version of `@langchain/core` that matches the dependencies of your used packages.
+This means that you may need to install/resolve a specific version of `@langchain/core` that matches the dependencies of your used packages.
+
+## π What is LangChain Expression Language?
+
+LangChain Core also contains LangChain Expression Language, or LCEL, a runtime that allows users to compose arbitrary sequences together and get several benefits that are important when building LLM applications.
+We call these sequences βrunnablesβ.
+
+All runnables expose the same interface with single-invocation, batch, streaming and async methods.
+This design is useful because it is not enough to have a single sync interface when building an LLM application.
+Batch is needed for efficient processing of many inputs.
+Streaming (and streaming of intermediate steps) is needed to show the user that progress is being made.
+Async interfaces are nice when moving into production.
+Rather than having to write multiple implementations for all of those, LCEL allows you to write a runnable once and invoke it in many different ways.
+
+For more check out the [LCEL docs](https://js.langchain.com/docs/expression_language/).
+
+![LangChain Stack](../docs/core_docs/static/img/langchain_stack.png)
+
+## π Releases & Versioning
+
+`@langchain/core` is currently on version `0.1.x`.
+
+As `@langchain/core` contains the base abstractions and runtime for the whole LangChain ecosystem, we will communicate any breaking changes with advance notice and version bumps. The exception for this is anything in `@langchain/core/beta`. The reason for `@langchain/core/beta` is that given the rate of change of the field, being able to move quickly is still a priority, and this module is our attempt to do so.
+
+Minor version increases will occur for:
+
+- Breaking changes for any public interfaces NOT in `@langchain/core/beta`
+
+Patch version increases will occur for:
+
+- Bug fixes
+- New features
+- Any changes to private interfaces
+- Any changes to `@langchain/core/beta`
## π¦ Creating your own package
-Other LangChain packages should add this package as a dependency and extend the classes within.
+Other LangChain packages should add this package as a dependency and extend the classes within.
For an example, see the [@langchain/anthropic](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic) in this repo.
Because all used packages must share the same version of core, we suggest using a tilde dependency to allow for different (backwards-compatible) patch versions:
@@ -85,15 +121,13 @@ Because all used packages must share the same version of core, we suggest using
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.10.0",
- "@langchain/core": "~0.0.1"
+ "@langchain/core": "~0.1.0"
}
}
```
This recommendation will change to a caret once a major version (1.x.x) release has occurred.
-API reference docs for core are in progress. For now we recommend looking directly at the source code to find the necessary abstractions for your use case.
-
We suggest making all packages cross-compatible with ESM and CJS using a build step like the one in
[@langchain/anthropic](https://github.com/langchain-ai/langchainjs/tree/main/libs/langchain-anthropic), then running `yarn build` before running `npm publish`.
diff --git a/langchain-core/package.json b/langchain-core/package.json
index 581fd3e27fad..9a2a35e736b3 100644
--- a/langchain-core/package.json
+++ b/langchain-core/package.json
@@ -1,6 +1,6 @@
{
"name": "@langchain/core",
- "version": "0.0.11",
+ "version": "0.1.0",
"description": "Core LangChain.js abstractions and schemas",
"type": "module",
"engines": {
diff --git a/langchain/package.json b/langchain/package.json
index 261853f7fcf1..461c08488333 100644
--- a/langchain/package.json
+++ b/langchain/package.json
@@ -1,6 +1,6 @@
{
"name": "langchain",
- "version": "0.0.204",
+ "version": "0.0.205",
"description": "Typescript bindings for langchain",
"type": "module",
"engines": {
@@ -1175,9 +1175,9 @@
},
"dependencies": {
"@anthropic-ai/sdk": "^0.9.1",
- "@langchain/community": "~0.0.2",
- "@langchain/core": "~0.0.11",
- "@langchain/openai": "~0.0.2",
+ "@langchain/community": "~0.0.3",
+ "@langchain/core": "~0.1.0",
+ "@langchain/openai": "~0.0.5",
"binary-extensions": "^2.2.0",
"expr-eval": "^2.0.2",
"js-tiktoken": "^1.0.7",
diff --git a/langchain/scripts/create-entrypoints.js b/langchain/scripts/create-entrypoints.js
index e5bb0b7c3b2e..cf592165b424 100644
--- a/langchain/scripts/create-entrypoints.js
+++ b/langchain/scripts/create-entrypoints.js
@@ -578,7 +578,7 @@ const updateConfig = () => {
...json,
entryPoints: [...Object.keys(entrypoints)]
.filter((key) => !deprecatedNodeOnly.includes(key))
- .map((key) => `./langchain/src/${entrypoints[key]}.ts`),
+ .map((key) => `../../langchain/src/${entrypoints[key]}.ts`),
}));
const generatedFiles = generateFiles();
diff --git a/libs/create-langchain-integration/template/package.json b/libs/create-langchain-integration/template/package.json
index be75fdabefeb..3f05e51030c5 100644
--- a/libs/create-langchain-integration/template/package.json
+++ b/libs/create-langchain-integration/template/package.json
@@ -33,7 +33,7 @@
"author": "LangChain",
"license": "MIT",
"dependencies": {
- "@langchain/core": "~0.0.6"
+ "@langchain/core": "~0.1.0"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
diff --git a/libs/langchain-anthropic/package.json b/libs/langchain-anthropic/package.json
index 9d52a75f4eaa..bc5f86b00e6d 100644
--- a/libs/langchain-anthropic/package.json
+++ b/libs/langchain-anthropic/package.json
@@ -1,6 +1,6 @@
{
"name": "@langchain/anthropic",
- "version": "0.0.3",
+ "version": "0.0.4",
"description": "Anthropic integrations for LangChain.js",
"type": "module",
"engines": {
@@ -36,11 +36,10 @@
"license": "MIT",
"dependencies": {
"@anthropic-ai/sdk": "^0.10.0",
- "@langchain/core": "~0.0.1"
+ "@langchain/core": "~0.1.0"
},
"devDependencies": {
"@jest/globals": "^29.5.0",
- "@langchain/core": "workspace:*",
"@swc/core": "^1.3.90",
"@swc/jest": "^0.2.29",
"dpdm": "^3.12.0",
diff --git a/libs/langchain-community/README.md b/libs/langchain-community/README.md
new file mode 100644
index 000000000000..1547d713efca
--- /dev/null
+++ b/libs/langchain-community/README.md
@@ -0,0 +1,27 @@
+# π¦οΈπ§βπ€βπ§ LangChain Community
+
+[![CI](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml/badge.svg)](https://github.com/langchain-ai/langchainjs/actions/workflows/ci.yml) ![npm](https://img.shields.io/npm/dw/@langchain/community) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) [![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai) [![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.gg/6adMQxSpJS)
+
+## Quick Install
+
+```bash
+$ yarn add @langchain/community
+```
+
+## π€ What is this?
+
+LangChain Community contains third-party integrations that implement the base interfaces defined in LangChain Core, making them ready-to-use in any LangChain application.
+
+![LangChain Stack](../../docs/core_docs/static/img/langchain_stack.png)
+
+## π Releases & Versioning
+
+`@langchain/community` is currently on version `0.0.x`
+
+All changes will be accompanied by a patch version increase.
+
+## π Contributing
+
+As an open-source project in a rapidly developing field, we are extremely open to contributions, whether it be in the form of a new feature, improved infrastructure, or better documentation.
+
+For detailed information on how to contribute, see [here](../../CONTRIBUTING.md).
\ No newline at end of file
diff --git a/libs/langchain-community/package.json b/libs/langchain-community/package.json
index 6318441e7f64..ed71a2c5fc58 100644
--- a/libs/langchain-community/package.json
+++ b/libs/langchain-community/package.json
@@ -1,6 +1,6 @@
{
"name": "@langchain/community",
- "version": "0.0.2",
+ "version": "0.0.3",
"description": "Sample integration for LangChain.js",
"type": "module",
"engines": {
@@ -34,8 +34,8 @@
"author": "LangChain",
"license": "MIT",
"dependencies": {
- "@langchain/core": "~0.0.11",
- "@langchain/openai": "~0.0.2",
+ "@langchain/core": "~0.1.0",
+ "@langchain/openai": "~0.0.5",
"flat": "^5.0.2",
"langsmith": "~0.0.48",
"uuid": "^9.0.0",
diff --git a/libs/langchain-openai/package.json b/libs/langchain-openai/package.json
index 83cb8d10f798..58144602af6f 100644
--- a/libs/langchain-openai/package.json
+++ b/libs/langchain-openai/package.json
@@ -1,6 +1,6 @@
{
"name": "@langchain/openai",
- "version": "0.0.2",
+ "version": "0.0.5",
"description": "OpenAI integrations for LangChain.js",
"type": "module",
"engines": {
@@ -35,7 +35,7 @@
"author": "LangChain",
"license": "MIT",
"dependencies": {
- "@langchain/core": "~0.0.11",
+ "@langchain/core": "~0.1.0",
"js-tiktoken": "^1.0.7",
"openai": "^4.19.0",
"zod": "^3.22.3",
diff --git a/turbo.json b/turbo.json
index f69769f2a5c3..b5ef33b86200 100644
--- a/turbo.json
+++ b/turbo.json
@@ -22,7 +22,11 @@
"inputs": ["src/**", "scripts/**", "package.json", "tsconfig.json"]
},
"build": {
- "dependsOn": ["@langchain/core#build", "@langchain/community#build", "^build"],
+ "dependsOn": [
+ "@langchain/core#build",
+ "@langchain/community#build",
+ "^build"
+ ],
"outputs": ["dist/**", "dist-cjs/**", "*.js", "*.cjs", "*.d.ts"],
"inputs": ["src/**", "scripts/**", "package.json", "tsconfig.json"]
},
@@ -46,6 +50,9 @@
"precommit": {},
"start": {
"cache": false
+ },
+ "build:vercel": {
+ "dependsOn": ["^build:vercel"]
}
}
}
diff --git a/yarn.lock b/yarn.lock
index fda25b4bedc8..a1a9efa2f528 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -7977,7 +7977,7 @@ __metadata:
dependencies:
"@anthropic-ai/sdk": ^0.10.0
"@jest/globals": ^29.5.0
- "@langchain/core": "workspace:*"
+ "@langchain/core": ~0.1.0
"@swc/core": ^1.3.90
"@swc/jest": ^0.2.29
dpdm: ^3.12.0
@@ -7997,7 +7997,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@langchain/community@workspace:libs/langchain-community, @langchain/community@~0.0.2":
+"@langchain/community@workspace:*, @langchain/community@workspace:libs/langchain-community, @langchain/community@~0.0.3":
version: 0.0.0-use.local
resolution: "@langchain/community@workspace:libs/langchain-community"
dependencies:
@@ -8023,8 +8023,8 @@ __metadata:
"@gradientai/nodejs-sdk": ^1.2.0
"@huggingface/inference": ^2.6.4
"@jest/globals": ^29.5.0
- "@langchain/core": ~0.0.11
- "@langchain/openai": ~0.0.2
+ "@langchain/core": ~0.1.0
+ "@langchain/openai": ~0.0.5
"@mozilla/readability": ^0.4.4
"@opensearch-project/opensearch": ^2.2.0
"@pinecone-database/pinecone": ^1.1.0
@@ -8351,7 +8351,7 @@ __metadata:
languageName: unknown
linkType: soft
-"@langchain/core@workspace:*, @langchain/core@workspace:langchain-core, @langchain/core@~0.0.11":
+"@langchain/core@workspace:langchain-core, @langchain/core@~0.1.0":
version: 0.0.0-use.local
resolution: "@langchain/core@workspace:langchain-core"
dependencies:
@@ -8387,12 +8387,12 @@ __metadata:
languageName: unknown
linkType: soft
-"@langchain/openai@workspace:libs/langchain-openai, @langchain/openai@~0.0.2":
+"@langchain/openai@workspace:libs/langchain-openai, @langchain/openai@~0.0.5":
version: 0.0.0-use.local
resolution: "@langchain/openai@workspace:libs/langchain-openai"
dependencies:
"@jest/globals": ^29.5.0
- "@langchain/core": ~0.0.11
+ "@langchain/core": ~0.1.0
"@swc/core": ^1.3.90
"@swc/jest": ^0.2.29
dpdm: ^3.12.0
@@ -18442,6 +18442,7 @@ __metadata:
"@getmetal/metal-sdk": ^4.0.0
"@getzep/zep-js": ^0.9.0
"@gomomento/sdk": ^1.51.1
+ "@langchain/community": "workspace:*"
"@opensearch-project/opensearch": ^2.2.0
"@pinecone-database/pinecone": ^1.1.0
"@planetscale/database": ^1.8.0
@@ -22994,9 +22995,9 @@ __metadata:
"@google-ai/generativelanguage": ^0.2.1
"@google-cloud/storage": ^6.10.1
"@jest/globals": ^29.5.0
- "@langchain/community": ~0.0.2
- "@langchain/core": ~0.0.11
- "@langchain/openai": ~0.0.2
+ "@langchain/community": ~0.0.3
+ "@langchain/core": ~0.1.0
+ "@langchain/openai": ~0.0.5
"@notionhq/client": ^2.2.10
"@pinecone-database/pinecone": ^1.1.0
"@supabase/supabase-js": ^2.10.0