Skip to content

Commit

Permalink
templates,docs: leave templates in v0.2 (langchain-ai#27952)
Browse files Browse the repository at this point in the history
all template installs will now have to declare `--branch v0.2` to make
clear they aren't compatible with langchain 0.3 (most have a pydantic v1
setup). e.g.

```
langchain-cli app add pirate-speak --branch v0.2
```
  • Loading branch information
efriis authored Nov 7, 2024
1 parent 8807e69 commit a073c4c
Show file tree
Hide file tree
Showing 807 changed files with 12 additions and 33,552 deletions.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Thank you for contributing to LangChain!

- [ ] **PR title**: "package: description"
- Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "templates: ..." for template changes, "infra: ..." for CI changes.
- Where "package" is whichever of langchain, community, core, etc. is being modified. Use "docs: ..." for purely docs changes, "infra: ..." for CI changes.
- Example: "community: add foobar LLM"


Expand Down
2 changes: 1 addition & 1 deletion .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ def _get_configs_for_multi_dirs(
f"Unknown lib: {file}. check_diff.py likely needs "
"an update for this new library!"
)
elif any(file.startswith(p) for p in ["docs/", "templates/", "cookbook/"]):
elif any(file.startswith(p) for p in ["docs/", "cookbook/"]):
if file.startswith("docs/"):
docs_edited = True
dirs_to_run["lint"].add(".")
Expand Down
12 changes: 6 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,12 @@ spell_fix:

## lint: Run linting on the project.
lint lint_package lint_tests:
poetry run ruff check docs templates cookbook
poetry run ruff format docs templates cookbook --diff
poetry run ruff check --select I docs templates cookbook
git grep 'from langchain import' docs/docs templates cookbook | grep -vE 'from langchain import (hub)' && exit 1 || exit 0
poetry run ruff check docs cookbook
poetry run ruff format docs cookbook cookbook --diff
poetry run ruff check --select I docs cookbook
git grep 'from langchain import' docs/docs cookbook | grep -vE 'from langchain import (hub)' && exit 1 || exit 0

## format: Format the project files.
format format_diff:
poetry run ruff format docs templates cookbook
poetry run ruff check --select I --fix docs templates cookbook
poetry run ruff format docs cookbook
poetry run ruff check --select I --fix docs cookbook
4 changes: 3 additions & 1 deletion docs/scripts/arxiv_references.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,9 @@ def _format_api_ref_url(doc_path: str, compact: bool = False) -> str:


def _format_template_url(template_name: str) -> str:
return f"https://{LANGCHAIN_PYTHON_URL}/docs/templates/{template_name}"
return (
f"https://github.com/langchain-ai/langchain/blob/v0.2/templates/{template_name}"
)


def _format_cookbook_url(cookbook_name: str) -> str:
Expand Down
2 changes: 1 addition & 1 deletion docs/vercel.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
},
{
"source": "/v0.2/docs/templates/:path(.*/?)*",
"destination": "https://github.com/langchain-ai/langchain/tree/master/templates/:path*"
"destination": "https://github.com/langchain-ai/langchain/tree/v0.2/templates/:path*"
},
{
"source": "/docs/integrations/providers/mlflow_ai_gateway(/?)",
Expand Down
2 changes: 0 additions & 2 deletions libs/cli/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ This package implements the official CLI for LangChain. Right now, it is most us
for getting started with LangChain Templates!

[CLI Docs](https://github.com/langchain-ai/langchain/blob/master/libs/cli/DOCS.md)

[LangServe Templates Quickstart](https://github.com/langchain-ai/langchain/blob/master/templates/README.md)
2 changes: 0 additions & 2 deletions templates/.gitignore

This file was deleted.

8 changes: 0 additions & 8 deletions templates/Makefile

This file was deleted.

137 changes: 0 additions & 137 deletions templates/README.md

This file was deleted.

68 changes: 0 additions & 68 deletions templates/anthropic-iterative-search/README.md

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit a073c4c

Please sign in to comment.