The agent engineering platform.
Python agentsaiai-agentsanthropicchatgptdeepagentsenterpriseframeworkgeminigenerative-ailangchainlanggraphllmmultiagentopen-sourceopenaipydanticpythonragtypescript
docs: remove templates (#25717)
Erick Friis0022ae1b3130
diff --git a/docs/Makefile b/docs/Makefileindex 8f4c653c73..8857aaea7b 100644--- a/docs/Makefile+++ b/docs/Makefile@@ -39,7 +39,6 @@ install-py-deps:generate-files:mkdir -p $(INTERMEDIATE_DIR)cp -r $(SOURCE_DIR)/* $(INTERMEDIATE_DIR)- mkdir -p $(INTERMEDIATE_DIR)/templates$(PYTHON) scripts/tool_feat_table.py $(INTERMEDIATE_DIR)@@ -47,8 +46,6 @@ generate-files:$(PYTHON) scripts/partner_pkg_table.py $(INTERMEDIATE_DIR)- $(PYTHON) scripts/copy_templates.py $(INTERMEDIATE_DIR)-wget -q https://raw.githubusercontent.com/langchain-ai/langserve/main/README.md -O $(INTERMEDIATE_DIR)/langserve.md$(PYTHON) scripts/resolve_local_links.py $(INTERMEDIATE_DIR)/langserve.md https://github.com/langchain-ai/langserve/tree/main/diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.jsindex 47fb61f520..869abd6903 100644--- a/docs/docusaurus.config.js+++ b/docs/docusaurus.config.js@@ -194,11 +194,6 @@ const config = {docId: "contributing/index",label: "Contributing",},- {- type: "docSidebar",- sidebarId: "templates",- label: "Templates",- },{label: "Cookbooks",href: "https://github.com/langchain-ai/langchain/blob/master/cookbook/README.md"@@ -247,14 +242,6 @@ const config = {href: "https://docs.smith.langchain.com/",label: "LangSmith Docs",},- {- href: "https://github.com/langchain-ai/langchain/tree/master/templates",- label: "Templates GitHub",- },- {- label: "Templates Hub",- href: "https://templates.langchain.com",- },{href: "https://smith.langchain.com/hub",label: "LangChain Hub",diff --git a/docs/ignore-step.sh b/docs/ignore-step.shindex 0591891eeb..8cd5e937d2 100755--- a/docs/ignore-step.sh+++ b/docs/ignore-step.sh@@ -8,16 +8,16 @@ if [ "$VERCEL_ENV" == "production" ] || [ "$VERCEL_GIT_COMMIT_REF" == "master" ]echo "✅ Production build - proceeding with build"exit 1;else- echo "Checking for changes in docs/ and templates/:"+ echo "Checking for changes in docs/"echo "---"- git log -n 50 --pretty=format:"%s" -- . ../templates | grep -v '(#'+ git log -n 50 --pretty=format:"%s" -- . | grep -v '(#'if [ $? -eq 0 ]; thenecho "---"- echo "✅ Changes detected in docs/ or templates/ - proceeding with build"+ echo "✅ Changes detected in docs/ - proceeding with build"exit 1elseecho "---"- echo "🛑 No changes detected in docs/ or templates/ - ignoring build"+ echo "🛑 No changes detected in docs/ - ignoring build"exit 0fifidiff --git a/docs/scripts/copy_templates.py b/docs/scripts/copy_templates.pydeleted file mode 100644index 46a4a85faf..0000000000--- a/docs/scripts/copy_templates.py+++ /dev/null@@ -1,46 +0,0 @@-import glob-import os-import re-import shutil-import sys-from pathlib import Path--if __name__ == "__main__":- intermediate_dir = Path(sys.argv[1])-- templates_source_dir = Path(os.path.abspath(__file__)).parents[2] / "templates"- templates_intermediate_dir = intermediate_dir / "templates"-- readmes = list(glob.glob(str(templates_source_dir) + "/*/README.md"))- destinations = [- readme[len(str(templates_source_dir)) + 1 : -10] + ".md" for readme in readmes- ]- for source, destination in zip(readmes, destinations):- full_destination = templates_intermediate_dir / destination- shutil.copyfile(source, full_destination)- with open(full_destination, "r") as f:- content = f.read()- # remove images- content = re.sub(r"\!\[.*?\]\((.*?)\)", "", content)- with open(full_destination, "w") as f:- f.write(content)-- sidebar_hidden = """----sidebar_class_name: hidden-custom_edit_url:------"""-- # handle index file- templates_index_source = templates_source_dir / "docs" / "INDEX.md"- templates_index_intermediate = templates_intermediate_dir / "index.md"-- with open(templates_index_source, "r") as f:- content = f.read()-- # replace relative links- content = re.sub(r"\]\(\.\.\/", "](/docs/templates/", content)-- with open(templates_index_intermediate, "w") as f:- f.write(sidebar_hidden + content)diff --git a/docs/sidebars.js b/docs/sidebars.jsindex 435ed14203..b7b5e8ad07 100644--- a/docs/sidebars.js+++ b/docs/sidebars.js@@ -383,22 +383,6 @@ module.exports = {},},],- templates: [- {- type: "category",- label: "Templates",- items: [- {- type: "autogenerated",- dirName: "templates",- },- ],- link: {- type: "doc",- id: "templates/index",- },- },- ],contributing: [{type: "category",diff --git a/docs/vercel.json b/docs/vercel.jsonindex 5c91cb3fb3..93a6e4acbf 100644--- a/docs/vercel.json+++ b/docs/vercel.json@@ -109,6 +109,10 @@{"source": "/v0.2/docs/integrations/chat/ollama_functions/","destination": "https://python.langchain.com/v0.1/docs/integrations/chat/ollama_functions/"+ },+ {+ "source": "/v0.2/docs/templates/:path(.*/?)*",+ "destination": "https://github.com/langchain-ai/langchain/tree/master/templates/:path*"}]}