Skip to content

Commit

Permalink
docs[patch]: Update document loader doc template and script (#6336)
Browse files Browse the repository at this point in the history
* Update document loader doc template and script

* Update templaet

* Fix format
  • Loading branch information
jacoblee93 authored Aug 2, 2024
1 parent e396174 commit 9992c0a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
7 changes: 4 additions & 3 deletions libs/langchain-scripts/src/cli/docs/document_loaders.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ const SERIALIZABLE_PLACEHOLDER = "__serializable__";
const LOCAL_PLACEHOLDER = "__local__";
const PY_SUPPORT_PLACEHOLDER = "__py_support__";

const WEB_SUPPORT_PLACEHOLDER = "__web_support__";
const NODE_SUPPORT_PLACEHOLDER = "__fs_support__";

const NODE_ONLY_SIDEBAR_BADGE_PLACEHOLDER = "__node_only_sidebar__";
Expand Down Expand Up @@ -155,8 +154,10 @@ export async function fillDocLoaderIntegrationDocTemplate(fields: {
NODE_ONLY_TOOL_TIP_PLACEHOLDER,
extraFields?.nodeOnly ? NODE_ONLY_TOOLTIP : ""
)
.replaceAll(WEB_SUPPORT_PLACEHOLDER, extraFields?.webLoader ? "✅" : "❌")
.replaceAll(NODE_SUPPORT_PLACEHOLDER, extraFields?.nodeOnly ? "✅" : "❌")
.replaceAll(
NODE_SUPPORT_PLACEHOLDER,
extraFields?.nodeOnly ? "Node-only" : "All environments"
)
.replaceAll(LOCAL_PLACEHOLDER, extraFields?.local ? "✅" : "❌")
.replaceAll(
SERIALIZABLE_PLACEHOLDER,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"cells": [
{
"cell_type": "markdown",
"cell_type": "raw",
"metadata": {},
"source": [
"---\n",
Expand All @@ -20,7 +20,7 @@
"\n",
"__node_only_tooltip__\n",
"\n",
"This notebook provides a quick overview for getting started with [__ModuleName__](/docs/integrations/document_loaders/). For detailed documentation of all __ModuleName__ features and configurations head to the [API reference](https://api.js.langchain.com/classes/langchain_community_document_loaders___fs_or_web_____file_name__.__ModuleName__.html).\n",
"This notebook provides a quick overview for getting started with `__ModuleName__` [document loaders](/docs/concepts/#document-loaders). For detailed documentation of all `__ModuleName__` features and configurations head to the [API reference](https://api.js.langchain.com/classes/langchain_community_document_loaders___fs_or_web_____file_name__.__ModuleName__.html).\n",
"\n",
"- TODO: Add any other relevant links, like information about underlying API, etc.\n",
"\n",
Expand All @@ -31,13 +31,9 @@
"- TODO: Remove JS support link if not relevant, otherwise ensure link is correct.\n",
"- TODO: Make sure API reference links are correct.\n",
"\n",
"| Class | Package | Local | Serializable | [PY support](https://python.langchain.com/docs/integrations/document_loaders/__file_name__)|\n",
"| Class | Package | Compatibility | Local | [PY support](https://python.langchain.com/docs/integrations/document_loaders/__file_name__)| \n",
"| :--- | :--- | :---: | :---: | :---: |\n",
"| [__ModuleName__](https://api.js.langchain.com/classes/langchain_community_document_loaders___fs_or_web_____file_name__.__ModuleName__.html) | [@langchain/community](https://api.js.langchain.com/modules/langchain_community_document_loaders___fs_or_web_____file_name__.html) | __local__ | __serializable__ | __py_support__ | \n",
"### Loader features\n",
"| Source | Web Loader | Node Envs Only\n",
"| :---: | :---: | :---: | \n",
"| __ModuleName__ | __web_support__ | __fs_support__ | \n",
"| [__ModuleName__](https://api.js.langchain.com/classes/langchain_community_document_loaders___fs_or_web_____file_name__.__ModuleName__.html) | [@langchain/community](https://api.js.langchain.com/modules/langchain_community_document_loaders___fs_or_web_____file_name__.html) | __fs_support__ | __local__ | __py_support__ |\n",
"\n",
"## Setup\n",
"\n",
Expand All @@ -55,13 +51,6 @@
"export __MODULE_NAME_ALL_CAPS___API_KEY=\"your-api-key\"\n",
"```\n",
"\n",
"If you want to get automated tracing of your model calls you can also set your [LangSmith](https://docs.smith.langchain.com/) API key by uncommenting below:\n",
"\n",
"```bash\n",
"# export LANGCHAIN_TRACING_V2=\"true\"\n",
"# export LANGCHAIN_API_KEY=\"your-api-key\"\n",
"```\n",
"\n",
"### Installation\n",
"\n",
"The LangChain __ModuleName__ integration lives in the `@langchain/community` package:\n",
Expand Down

0 comments on commit 9992c0a

Please sign in to comment.