Skip to content

Commit 61b68bb

Browse files
committed
Merge remote-tracking branch 'upstream/master' into pprados/06-pdfplumber
2 parents 6b506df + ed5c480 commit 61b68bb

File tree

763 files changed

+17597
-6576
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

763 files changed

+17597
-6576
lines changed

.github/ISSUE_TEMPLATE/bug-report.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,14 +29,14 @@ body:
2929
options:
3030
- label: I added a very descriptive title to this issue.
3131
required: true
32-
- label: I searched the LangChain documentation with the integrated search.
33-
required: true
3432
- label: I used the GitHub search to find a similar question and didn't find it.
3533
required: true
3634
- label: I am sure that this is a bug in LangChain rather than my code.
3735
required: true
3836
- label: The bug is not resolved by updating to the latest stable version of LangChain (or the specific integration package).
3937
required: true
38+
- label: I posted a self-contained, minimal, reproducible example. A maintainer can copy it and run it AS IS.
39+
required: true
4040
- type: textarea
4141
id: reproduction
4242
validations:

.github/workflows/_integration_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ jobs:
7676
COHERE_API_KEY: ${{ secrets.COHERE_API_KEY }}
7777
UPSTAGE_API_KEY: ${{ secrets.UPSTAGE_API_KEY }}
7878
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
79+
PPLX_API_KEY: ${{ secrets.PPLX_API_KEY }}
7980
run: |
8081
make integration_tests
8182

.github/workflows/_release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -327,6 +327,7 @@ jobs:
327327
FIREWORKS_API_KEY: ${{ secrets.FIREWORKS_API_KEY }}
328328
XAI_API_KEY: ${{ secrets.XAI_API_KEY }}
329329
DEEPSEEK_API_KEY: ${{ secrets.DEEPSEEK_API_KEY }}
330+
PPLX_API_KEY: ${{ secrets.PPLX_API_KEY }}
330331
run: make integration_tests
331332
working-directory: ${{ inputs.working-directory }}
332333

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Check `langchain-core` version equality
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'libs/core/pyproject.toml'
7+
- 'libs/core/langchain_core/version.py'
8+
9+
jobs:
10+
check_version_equality:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Check version equality
17+
run: |
18+
PYPROJECT_VERSION=$(grep -Po '(?<=^version = ")[^"]*' libs/core/pyproject.toml)
19+
VERSION_PY_VERSION=$(grep -Po '(?<=^VERSION = ")[^"]*' libs/core/langchain_core/version.py)
20+
21+
# Compare the two versions
22+
if [ "$PYPROJECT_VERSION" != "$VERSION_PY_VERSION" ]; then
23+
echo "langchain-core versions in pyproject.toml and version.py do not match!"
24+
echo "pyproject.toml version: $PYPROJECT_VERSION"
25+
echo "version.py version: $VERSION_PY_VERSION"
26+
exit 1
27+
else
28+
echo "Versions match: $PYPROJECT_VERSION"
29+
fi

.github/workflows/codspeed.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: CodSpeed
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
paths:
9+
- 'libs/core/**'
10+
# `workflow_dispatch` allows CodSpeed to trigger backtest
11+
# performance analysis in order to generate initial data.
12+
workflow_dispatch:
13+
14+
jobs:
15+
codspeed:
16+
name: Run benchmarks
17+
if: (github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'run-benchmarks'))
18+
runs-on: codspeed-macro
19+
steps:
20+
- uses: actions/checkout@v4
21+
22+
# We have to use 3.12, 3.13 is not yet supported
23+
- name: Install uv
24+
uses: astral-sh/setup-uv@v5
25+
with:
26+
python-version: "3.12"
27+
28+
# Using this action is still necessary for CodSpeed to work
29+
- uses: actions/setup-python@v3
30+
with:
31+
python-version: "3.12"
32+
33+
- name: install deps
34+
run: uv sync --group test
35+
working-directory: ./libs/core
36+
37+
- name: Run benchmarks
38+
uses: CodSpeedHQ/action@v3
39+
with:
40+
token: ${{ secrets.CODSPEED_TOKEN }}
41+
run: |
42+
cd libs/core
43+
uv run --no-sync pytest ./tests/benchmarks --codspeed

.github/workflows/people.yml

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ on:
66
push:
77
branches: [jacob/people]
88
workflow_dispatch:
9-
inputs:
10-
debug_enabled:
11-
description: 'Run the build with tmate debugging enabled (https://github.com/marketplace/actions/debugging-with-tmate)'
12-
required: false
13-
default: 'false'
149

1510
jobs:
1611
langchain-people:
@@ -26,12 +21,6 @@ jobs:
2621
# Ref: https://github.com/actions/runner/issues/2033
2722
- name: Fix git safe.directory in container
2823
run: mkdir -p /home/runner/work/_temp/_github_home && printf "[safe]\n\tdirectory = /github/workspace" > /home/runner/work/_temp/_github_home/.gitconfig
29-
# Allow debugging with tmate
30-
- name: Setup tmate session
31-
uses: mxschmitt/action-tmate@v3
32-
if: ${{ github.event_name == 'workflow_dispatch' && github.event.inputs.debug_enabled == 'true' }}
33-
with:
34-
limit-access-to-actor: true
3524
- uses: ./.github/actions/people
3625
with:
3726
token: ${{ secrets.LANGCHAIN_PEOPLE_GITHUB_TOKEN }}

.github/workflows/scheduled_test.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,7 @@ jobs:
145145
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
146146
GOOGLE_SEARCH_API_KEY: ${{ secrets.GOOGLE_SEARCH_API_KEY }}
147147
GOOGLE_CSE_ID: ${{ secrets.GOOGLE_CSE_ID }}
148+
PPLX_API_KEY: ${{ secrets.PPLX_API_KEY }}
148149
run: |
149150
cd langchain/${{ matrix.working-directory }}
150151
make integration_tests

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ coverage.xml
5959
*.py,cover
6060
.hypothesis/
6161
.pytest_cache/
62+
.codspeed/
6263

6364
# Translations
6465
*.mo

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
[![Open in Dev Containers](https://img.shields.io/static/v1?label=Dev%20Containers&message=Open&color=blue&logo=visualstudiocode&style=flat-square)](https://vscode.dev/redirect?url=vscode://ms-vscode-remote.remote-containers/cloneInVolume?url=https://github.com/langchain-ai/langchain)
1818
[<img src="https://github.com/codespaces/badge.svg" title="Open in Github Codespace" width="150" height="20">](https://codespaces.new/langchain-ai/langchain)
1919
[![Twitter](https://img.shields.io/twitter/url/https/twitter.com/langchainai.svg?style=social&label=Follow%20%40LangChainAI)](https://twitter.com/langchainai)
20+
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/langchain-ai/langchain)
2021

2122
> [!NOTE]
2223
> Looking for the JS/TS library? Check out [LangChain.js](https://github.com/langchain-ai/langchainjs).

cookbook/advanced_rag_eval.ipynb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
"outputs": [],
3131
"source": [
3232
"# lock to 0.10.19 due to a persistent bug in more recent versions\n",
33-
"! pip install \"unstructured[all-docs]==0.10.19\" pillow pydantic lxml pillow matplotlib tiktoken open_clip_torch torch"
33+
"! pip install \"unstructured[all-docs]==0.10.19\" pillow pydantic lxml matplotlib tiktoken open_clip_torch torch"
3434
]
3535
},
3636
{
@@ -409,7 +409,7 @@
409409
" table_summaries,\n",
410410
" tables,\n",
411411
" image_summaries,\n",
412-
" image_summaries,\n",
412+
" img_base64_list,\n",
413413
")"
414414
]
415415
},

0 commit comments

Comments
 (0)