Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
luiz0992 authored Oct 26, 2024
2 parents 41c17fe + cdb4b19 commit 348a70f
Show file tree
Hide file tree
Showing 703 changed files with 21,760 additions and 18,613 deletions.
7 changes: 5 additions & 2 deletions .github/scripts/check_diff.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ def _get_configs_for_single_dir(job: str, dir_: str) -> List[Dict[str, str]]:
return _get_pydantic_test_configs(dir_)

if dir_ == "libs/core":
py_versions = ["3.9", "3.10", "3.11", "3.12"]
py_versions = ["3.9", "3.10", "3.11", "3.12", "3.13"]
# custom logic for specific directories
elif dir_ == "libs/partners/milvus":
# milvus poetry doesn't allow 3.12 because they
Expand All @@ -125,8 +125,11 @@ def _get_configs_for_single_dir(job: str, dir_: str) -> List[Dict[str, str]]:
elif dir_ == "libs/community" and job == "compile-integration-tests":
# community integration deps are slow in 3.12
py_versions = ["3.9", "3.11"]
else:
elif dir_ == ".":
# unable to install with 3.13 because tokenizers doesn't support 3.13 yet
py_versions = ["3.9", "3.12"]
else:
py_versions = ["3.9", "3.13"]

return [{"working-directory": dir_, "python-version": py_v} for py_v in py_versions]

Expand Down
32 changes: 29 additions & 3 deletions .github/workflows/api_doc_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ env:

jobs:
build:
if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions: write-all
steps:
Expand Down Expand Up @@ -73,6 +74,23 @@ jobs:
with:
repository: langchain-ai/langchain-unstructured
path: langchain-unstructured
- uses: actions/checkout@v4
with:
repository: langchain-ai/langchain-databricks
path: langchain-databricks
- uses: actions/checkout@v4
with:
repository: langchain-ai/langchain-ibm
path: langchain-ibm
- uses: actions/checkout@v4
with:
repository: langchain-ai/langchain-azure
path: langchain-azure
- uses: actions/checkout@v4
with:
repository: langchain-ai/langchain-mongodb
path: langchain-mongodb



- name: Set Git config
Expand All @@ -97,7 +115,11 @@ jobs:
langchain/libs/standard-tests \
langchain/libs/experimental \
langchain/libs/partners/milvus \
langchain/libs/partners/unstructured
langchain/libs/partners/unstructured \
langchain/libs/partners/databricks \
langchain/libs/partners/ibm \
langchain/libs/partners/azure-dynamic-sessions \
langchain/libs/partners/mongodb
mv langchain-google/libs/genai langchain/libs/partners/google-genai
mv langchain-google/libs/vertexai langchain/libs/partners/google-vertexai
mv langchain-google/libs/community langchain/libs/partners/google-community
Expand All @@ -113,6 +135,10 @@ jobs:
mv langchain-experimental/libs/experimental langchain/libs/experimental
mv langchain-milvus/libs/milvus langchain/libs/partners/milvus
mv langchain-unstructured/libs/unstructured langchain/libs/partners/unstructured
mv langchain-databricks/libs/databricks langchain/libs/partners/databricks
mv langchain-ibm/libs/ibm langchain/libs/partners/ibm
mv langchain-azure/libs/azure-dynamic-sessions langchain/libs/partners/azure-dynamic-sessions
mv langchain-mongodb/libs/mongodb langchain/libs/partners/mongodb
- name: Rm old html
run:
Expand All @@ -131,8 +157,8 @@ jobs:
run: |
python -m pip install -U uv
python -m uv pip install --upgrade --no-cache-dir pip setuptools
# skip airbyte and ibm due to pandas dependency issue
python -m uv pip install $(ls ./libs/partners | grep -vE "airbyte|ibm" | xargs -I {} echo "./libs/partners/{}")
# skip airbyte due to pandas dependency issue
python -m uv pip install $(ls ./libs/partners | grep -vE "airbyte" | xargs -I {} echo "./libs/partners/{}")
python -m uv pip install libs/core libs/langchain libs/text-splitters libs/community libs/experimental
python -m uv pip install -r docs/api_reference/requirements.txt
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check-broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

jobs:
check-links:
if: github.repository_owner == 'langchain-ai'
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/people.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

jobs:
langchain-people:
if: github.repository_owner == 'langchain-ai'
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
runs-on: ubuntu-latest
permissions: write-all
steps:
Expand Down
19 changes: 6 additions & 13 deletions .github/workflows/run_notebooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
jobs:
build:
runs-on: ubuntu-latest

if: github.repository == 'langchain-ai/langchain' || github.event_name != 'schedule'
name: "Test docs"
steps:
- uses: actions/checkout@v4
Expand All @@ -35,29 +35,22 @@ jobs:

- name: Install dependencies
run: |
pip install -e libs/core
pip install -e libs/langchain
pip install -e libs/community
pip install --upgrade langchain-experimental
pip install -e libs//partners/anthropic
pip install -e libs//partners/chroma
pip install -e libs//partners/openai
pip install -e libs//partners/mistralai
pip install jupyter langgraph click pypdf vcrpy
poetry install --with dev,test
- name: Pre-download tiktoken files
run: |
python docs/scripts/download_tiktoken.py
poetry run python docs/scripts/download_tiktoken.py
- name: Prepare notebooks
run: |
python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells
poetry run python docs/scripts/prepare_notebooks_for_ci.py --comment-install-cells --working-directory ${{ github.event.inputs.working-directory || 'all' }}
- name: Run notebooks
env:
ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }}
MISTRAL_API_KEY: ${{ secrets.MISTRAL_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
TAVILY_API_KEY: ${{ secrets.TAVILY_API_KEY }}
WORKING_DIRECTORY: ${{ github.event.inputs.working-directory || 'all' }}
run: |
./docs/scripts/execute_notebooks.sh ${{ github.event.inputs.working-directory || 'all' }}
./docs/scripts/execute_notebooks.sh $WORKING_DIRECTORY
2 changes: 1 addition & 1 deletion .github/workflows/scheduled_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ env:

jobs:
build:
if: github.repository_owner == 'langchain-ai'
if: github.repository_owner == 'langchain-ai' || github.event_name != 'schedule'
name: Python ${{ matrix.python-version }} - ${{ matrix.working-directory }}
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ conda install langchain -c conda-forge

For these applications, LangChain simplifies the entire application lifecycle:

- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel), [components](https://python.langchain.com/docs/concepts/), and [third-party integrations](https://python.langchain.com/docs/integrations/platforms/).
- **Open-source libraries**: Build your applications using LangChain's open-source [building blocks](https://python.langchain.com/docs/concepts/#langchain-expression-language-lcel), [components](https://python.langchain.com/docs/concepts/), and [third-party integrations](https://python.langchain.com/docs/integrations/providers/).
Use [LangGraph](https://langchain-ai.github.io/langgraph/) to build stateful agents with first-class streaming and human-in-the-loop support.
- **Productionization**: Inspect, monitor, and evaluate your apps with [LangSmith](https://docs.smith.langchain.com/) so that you can constantly optimize and deploy with confidence.
- **Deployment**: Turn your LangGraph applications into production-ready APIs and Assistants with [LangGraph Cloud](https://langchain-ai.github.io/langgraph/cloud/).
Expand Down
2 changes: 1 addition & 1 deletion docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ for dir; do \
if find "$$dir" -maxdepth 1 -type f \( -name "pyproject.toml" -o -name "setup.py" \) | grep -q .; then \
echo "$$dir"; \
fi \
done' sh {} + | grep -vE "airbyte|ibm|couchbase|databricks" | tr '\n' ' ')
done' sh {} + | grep -vE "airbyte|ibm|databricks" | tr '\n' ' ')

PORT ?= 3001

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
# LangChain Documentation

For more information on contributing to our documentation, see the [Documentation Contributing Guide](https://python.langchain.com/docs/contributing/documentation)
For more information on contributing to our documentation, see the [Documentation Contributing Guide](https://python.langchain.com/docs/contributing/how_to/documentation)
4 changes: 1 addition & 3 deletions docs/api_reference/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,9 +222,7 @@ def setup(app):
},
],
"icon_links_label": "Quick Links",
"external_links": [
{"name": "Legacy reference", "url": "https://api.python.langchain.com/"},
],
"external_links": [],
}


Expand Down
1 change: 1 addition & 0 deletions docs/api_reference/create_api_rst.py
Original file line number Diff line number Diff line change
Expand Up @@ -533,6 +533,7 @@ def _build_index(dirs: List[str]) -> None:
"airbyte": "Airbyte",
"aws": "AWS",
"ai21": "AI21",
"ibm": "IBM",
}
ordered = ["core", "langchain", "text-splitters", "community", "experimental"]
main_ = [dir_ for dir_ in ordered if dir_ in dirs]
Expand Down
2 changes: 1 addition & 1 deletion docs/api_reference/guide_imports.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions docs/cassettes/agent_executor_114ba50d.msgpack.zlib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eNrlV09z28YVb6c3nXLpfY3JKUNAAAiRoDSaDkUptqJItCXFlpzRcJaLBQETwMK7C4qkR4e4/QK49dZpLZMdjeokY0+bpnXPPfQLKId+iH6CvgUhi4o8k8zklJEO0P5577fv/3t8Ph1QLkKW/PI8TCTlmEjYiPz5lNOnGRXyd5OYyoB5p/fbe/svMh5efBRImYrlxUWchgZLaYJDg7B4cWAtkgDLRVinES1gTrvMG333qz8802IqBO5RoS2jz59phMFbiYSNdsgyhDlFGAU0Sv0sQliIUEgM1xWkcRZRRSZGQtJYO6mga9xBeGeeKhOUaydHcBIzj0bqqJdK3VE0Cews+C8kpziGjeQZhT3ApqC3zLiCMI26OmMsKkWVo7SA9rOkMI2CerdeBmkSHBcEEg/CaNQRFHMSdDgVWSRF54mYsXhUEB6mJZfWRDM6RJNemFDE4CYOx9RDPuNIWZDTgCYiHICImJAMBFSrxFNigyk8VL5goM8EVWZTjMfAg0Zg0YQChWTAII4pR4UnlUMQ7rJMIsDjYEFEB/AFiM0khVMRsCzyUFc5oxQPGPnIUAqkmIOiECGi0Drl4HkuQzrbFnTF6nuKzuMogSL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E0HV52GT2zXIth3rTqpOtitNahXX6Jmo+Hjv6vqSABHuTJlHFxNoRGGcpRfVGI8VCVntWotVWug6QrUWBJlHt3LuutM6SBWEDTliGHvy9bHeguTgOp7RTjm0/XDneb2ZuuvB/p8XOntdDZMTRMmktD3J3uUg1vyMxKxzIPayekEsHabh/kb16tafrVuYRfbrk/r+lp7b4ojEHJA8tdBdVVbdpyqtoJivOrWHNMsZqsvJrOS/93C7z0sseodIVR8TQ1iBMYwvbnZS+7SsajbGzsu6UdbVnjYfFLbsb1d09Mql21gxmFcjW5GEd1AQCAbpOoi7xK3VrmcrmbDlW7WrCpQzka0jg/iUJ6CVACbZFEEGAELiWpyME+FiUeH2rJZgSYXSawtPyunN21u7rsa8TTYcJhvBI5maCcVLWI9CPuuuISHF0OhRi6shq0Z1dHJwsLP1yJX6t+jUcS0W6b0ndumMLrHjm+dzgQnt07nzVun8ayq3zq14UfgrdNZMg+PbpvWv7kVCv+wjpqQLNXmtPx8vb2zcbSw8H/cixps
1 change: 1 addition & 0 deletions docs/cassettes/agent_executor_1f5932b6.msgpack.zlib
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eNrlV01v48YZbtHb9tJL7rNEgQCFSJMSJZE2jECWnazi2Nq1HK+9gSGMyKHIiORwZ4b68MKHbnvshT+hXa8UGO4mwS7aNO323EP/gHPoj+gv6DsUFcvxAi2QUyEfaA7nnWfej+f90PPZkDAe0PinV0EsCMOOgAXPns8YeZoSLn47jYjwqXvxsN05fJGy4PpXvhAJX19bw0mg0YTEONAcGq0NjTXHx2IN3pOQ5DAXPepOvvvZ7JkSEc5xn3BlHX32THEo3BULWCgnNEWYEYSRT8LES0OEOQ+4wLBdQgqjIZFifMIFiZTzErp12g/uo9b7EerR3rJ0yglTzk/hS0RdEspP/USoppSJYWXAfy4YwREsBEsJrAE+AftFyiSErtXlN0rDQmUxSXJoL41zF0mo79/XQasYR7mAwMMgnHQ5wczxu4zwNBS8+zmfH3EJd1iQFKeUBprLIRL3g5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