From 6ae9e00724176593777183c9b17fb0d89e27e6c4 Mon Sep 17 00:00:00 2001 From: Jacob Lee Date: Thu, 30 Nov 2023 15:56:12 -0800 Subject: [PATCH] langchain[patch]: Add missing entrypoint (#3467) * Add missing entrypoint * Mark as optional --- docs/api_refs/typedoc.json | 1 + langchain/.gitignore | 6 +++--- langchain/package.json | 11 ++++++++--- langchain/scripts/create-entrypoints.js | 2 ++ langchain/src/load/import_constants.ts | 1 + langchain/src/load/import_type.d.ts | 3 +++ 6 files changed, 18 insertions(+), 6 deletions(-) diff --git a/docs/api_refs/typedoc.json b/docs/api_refs/typedoc.json index d38c21326e44..7ff44c31fe65 100644 --- a/docs/api_refs/typedoc.json +++ b/docs/api_refs/typedoc.json @@ -165,6 +165,7 @@ "./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", diff --git a/langchain/.gitignore b/langchain/.gitignore index 456353930f6a..886cf43390bd 100644 --- a/langchain/.gitignore +++ b/langchain/.gitignore @@ -439,6 +439,9 @@ document_loaders/fs/directory.d.ts document_loaders/fs/buffer.cjs document_loaders/fs/buffer.js document_loaders/fs/buffer.d.ts +document_loaders/fs/chatgpt.cjs +document_loaders/fs/chatgpt.js +document_loaders/fs/chatgpt.d.ts document_loaders/fs/text.cjs document_loaders/fs/text.js document_loaders/fs/text.d.ts @@ -472,9 +475,6 @@ document_loaders/fs/openai_whisper_audio.d.ts document_loaders/fs/pptx.cjs document_loaders/fs/pptx.js document_loaders/fs/pptx.d.ts -document_loaders/fs/chatgpt.cjs -document_loaders/fs/chatgpt.js -document_loaders/fs/chatgpt.d.ts document_transformers/html_to_text.cjs document_transformers/html_to_text.js document_transformers/html_to_text.d.ts diff --git a/langchain/package.json b/langchain/package.json index c6fea4ffb0ef..29a988433e79 100644 --- a/langchain/package.json +++ b/langchain/package.json @@ -451,6 +451,9 @@ "document_loaders/fs/buffer.cjs", "document_loaders/fs/buffer.js", "document_loaders/fs/buffer.d.ts", + "document_loaders/fs/chatgpt.cjs", + "document_loaders/fs/chatgpt.js", + "document_loaders/fs/chatgpt.d.ts", "document_loaders/fs/text.cjs", "document_loaders/fs/text.js", "document_loaders/fs/text.d.ts", @@ -484,9 +487,6 @@ "document_loaders/fs/pptx.cjs", "document_loaders/fs/pptx.js", "document_loaders/fs/pptx.d.ts", - "document_loaders/fs/chatgpt.cjs", - "document_loaders/fs/chatgpt.js", - "document_loaders/fs/chatgpt.d.ts", "document_transformers/html_to_text.cjs", "document_transformers/html_to_text.js", "document_transformers/html_to_text.d.ts", @@ -2188,6 +2188,11 @@ "import": "./document_loaders/fs/buffer.js", "require": "./document_loaders/fs/buffer.cjs" }, + "./document_loaders/fs/chatgpt": { + "types": "./document_loaders/fs/chatgpt.d.ts", + "import": "./document_loaders/fs/chatgpt.js", + "require": "./document_loaders/fs/chatgpt.cjs" + }, "./document_loaders/fs/text": { "types": "./document_loaders/fs/text.d.ts", "import": "./document_loaders/fs/text.js", diff --git a/langchain/scripts/create-entrypoints.js b/langchain/scripts/create-entrypoints.js index fbf5dd1e92bb..446eaac7856b 100644 --- a/langchain/scripts/create-entrypoints.js +++ b/langchain/scripts/create-entrypoints.js @@ -172,6 +172,7 @@ const entrypoints = { "document_loaders/web/youtube": "document_loaders/web/youtube", "document_loaders/fs/directory": "document_loaders/fs/directory", "document_loaders/fs/buffer": "document_loaders/fs/buffer", + "document_loaders/fs/chatgpt": "document_loaders/fs/chatgpt", "document_loaders/fs/text": "document_loaders/fs/text", "document_loaders/fs/json": "document_loaders/fs/json", "document_loaders/fs/srt": "document_loaders/fs/srt", @@ -439,6 +440,7 @@ const requiresOptionalDependency = [ "document_loaders/web/youtube", "document_loaders/fs/directory", "document_loaders/fs/buffer", + "document_loaders/fs/chatgpt", "document_loaders/fs/text", "document_loaders/fs/json", "document_loaders/fs/srt", diff --git a/langchain/src/load/import_constants.ts b/langchain/src/load/import_constants.ts index 08fcbd39d5d2..a7d4a74ee1f8 100644 --- a/langchain/src/load/import_constants.ts +++ b/langchain/src/load/import_constants.ts @@ -100,6 +100,7 @@ export const optionalImportEntrypoints = [ "langchain/document_loaders/web/youtube", "langchain/document_loaders/fs/directory", "langchain/document_loaders/fs/buffer", + "langchain/document_loaders/fs/chatgpt", "langchain/document_loaders/fs/text", "langchain/document_loaders/fs/json", "langchain/document_loaders/fs/srt", diff --git a/langchain/src/load/import_type.d.ts b/langchain/src/load/import_type.d.ts index a6190f9f01eb..00fb99f9d953 100644 --- a/langchain/src/load/import_type.d.ts +++ b/langchain/src/load/import_type.d.ts @@ -298,6 +298,9 @@ export interface OptionalImportMap { "langchain/document_loaders/fs/buffer"?: | typeof import("../document_loaders/fs/buffer.js") | Promise; + "langchain/document_loaders/fs/chatgpt"?: + | typeof import("../document_loaders/fs/chatgpt.js") + | Promise; "langchain/document_loaders/fs/text"?: | typeof import("../document_loaders/fs/text.js") | Promise;