Compare commits

...

240 Commits

Author SHA1 Message Date
Eugene Yurtsev 27e57afeda Add deprecation notice for LangServe project
Added deprecation notice and migration recommendation.
2026-05-05 15:49:06 -04:00
dependabot[bot] 12e5d8e23f Bump langsmith from 0.7.9 to 0.7.31 in the pip group across 1 directory (#902)
Bumps the pip group with 1 update in the / directory:
[langsmith](https://github.com/langchain-ai/langsmith-sdk).

Updates `langsmith` from 0.7.9 to 0.7.31
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langsmith-sdk/releases">langsmith's
releases</a>.</em></p>
<blockquote>
<h2>v0.7.31</h2>
<h2>What's Changed</h2>
<ul>
<li>chore(deps-dev): bump langchain-core from 1.2.23 to 1.2.28 in
/python by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2692">langchain-ai/langsmith-sdk#2692</a></li>
<li>chore(deps-dev): bump <code>@​anthropic-ai/sdk</code> from 0.82.0 to
0.84.0 in /js by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2684">langchain-ai/langsmith-sdk#2684</a></li>
<li>chore(deps): bump cryptography from 46.0.6 to 46.0.7 in /python by
<a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2693">langchain-ai/langsmith-sdk#2693</a></li>
<li>chore(deps-dev): bump <code>@​anthropic-ai/sdk</code> from 0.84.0 to
0.85.0 in /js by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2700">langchain-ai/langsmith-sdk#2700</a></li>
<li>feat(py): Tag OpenAI Agent Python SDK runs with ls_agent_type by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2699">langchain-ai/langsmith-sdk#2699</a></li>
<li>feat(js): Adds ls_agent_type metadata to AI SDK runs by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2701">langchain-ai/langsmith-sdk#2701</a></li>
<li>chore(deps-dev): bump types-tqdm from 4.67.3.20260303 to
4.67.3.20260408 in /python by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2710">langchain-ai/langsmith-sdk#2710</a></li>
<li>chore(deps): bump pnpm/action-setup from 5 to 6 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2705">langchain-ai/langsmith-sdk#2705</a></li>
<li>chore(deps): bump the py-minor-and-patch group across 1 directory
with 10 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2711">langchain-ai/langsmith-sdk#2711</a></li>
<li>chore(deps-dev): bump <code>@​anthropic-ai/sdk</code> from 0.85.0 to
0.86.0 in /js by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2702">langchain-ai/langsmith-sdk#2702</a></li>
<li>chore(deps): bump actions/github-script from 8 to 9 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2706">langchain-ai/langsmith-sdk#2706</a></li>
<li>chore(deps-dev): bump the js-minor-and-patch group across 1
directory with 7 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2712">langchain-ai/langsmith-sdk#2712</a></li>
<li>chore(deps-dev): bump types-psutil from 7.2.2.20260130 to
7.2.2.20260408 in /python by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2709">langchain-ai/langsmith-sdk#2709</a></li>
<li>chore(deps-dev): bump rich from 14.3.3 to 15.0.0 in /python by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2708">langchain-ai/langsmith-sdk#2708</a></li>
<li>feat: Filter kwargs from new token events by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2714">langchain-ai/langsmith-sdk#2714</a></li>
<li>release(py): 0.7.31 by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2716">langchain-ai/langsmith-sdk#2716</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.30...v0.7.31">https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.30...v0.7.31</a></p>
<h2>v0.7.30</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(python): add service feature to sandbox by <a
href="https://github.com/DanielKneipp"><code>@​DanielKneipp</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2665">langchain-ai/langsmith-sdk#2665</a></li>
<li>fix(js): Fix prototype pollution bug in anonymizers by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2690">langchain-ai/langsmith-sdk#2690</a></li>
<li>release(js): 0.5.18 by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2691">langchain-ai/langsmith-sdk#2691</a></li>
<li>chore(js/sandbox): suppress warning log by <a
href="https://github.com/hntrl"><code>@​hntrl</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2694">langchain-ai/langsmith-sdk#2694</a></li>
<li>feat(js): Add metadata to Claude Agent SDK JS tracing by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2695">langchain-ai/langsmith-sdk#2695</a></li>
<li>fix(py): Fix run tree memory leak by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2696">langchain-ai/langsmith-sdk#2696</a></li>
<li>release(py): 0.7.30 by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2698">langchain-ai/langsmith-sdk#2698</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.29...v0.7.30">https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.29...v0.7.30</a></p>
<h2>v0.7.29</h2>
<h2>What's Changed</h2>
<ul>
<li>release(js): 0.5.17 by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2681">langchain-ai/langsmith-sdk#2681</a></li>
<li>feat(py): Fix race condition around Claude Agent SDK instrumentation
by <a href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a>
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2685">langchain-ai/langsmith-sdk#2685</a></li>
<li>release(py): 0.7.29 by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2686">langchain-ai/langsmith-sdk#2686</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.28...v0.7.29">https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.28...v0.7.29</a></p>
<h2>v0.7.28</h2>
<h2>What's Changed</h2>
<ul>
<li>feat(py): Support subagent tracing in Claude Agents SDK, fix usage
and duplicate messages by <a
href="https://github.com/jacoblee93"><code>@​jacoblee93</code></a> in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2670">langchain-ai/langsmith-sdk#2670</a></li>
<li>chore(deps-dev): bump the py-minor-and-patch group across 1
directory with 11 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2677">langchain-ai/langsmith-sdk#2677</a></li>
<li>chore(deps-dev): bump the js-minor-and-patch group across 1
directory with 8 updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2667">langchain-ai/langsmith-sdk#2667</a></li>
<li>chore(deps): bump pnpm/action-setup from 4 to 5 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>[bot]
in <a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/pull/2658">langchain-ai/langsmith-sdk#2658</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/c434999d05c00334efeba88b8bbd2de9f3afbef6"><code>c434999</code></a>
release(py): 0.7.31 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2716">#2716</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/47d7c4a783333e716395d802e7632f1f1b4744d3"><code>47d7c4a</code></a>
feat: Filter kwargs from new token events (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2714">#2714</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/3c57445b543c9a2f86db52024ea2c998bfc2ffab"><code>3c57445</code></a>
chore(deps-dev): bump rich from 14.3.3 to 15.0.0 in /python (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2708">#2708</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/2be6cd01a2b6e35e811488d3561e7b0b57b06f63"><code>2be6cd0</code></a>
chore(deps-dev): bump types-psutil from 7.2.2.20260130 to 7.2.2.20260408
in /...</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/b8b6ca32d43c919c07a4e13c99a83bcaab8accb0"><code>b8b6ca3</code></a>
chore(deps-dev): bump the js-minor-and-patch group across 1 directory
with 7 ...</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/9897cb33da7698291637f268edd833ca3e1adde6"><code>9897cb3</code></a>
chore(deps): bump actions/github-script from 8 to 9 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2706">#2706</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/572c0184285747e027a796e03ea6c9ba171e09a6"><code>572c018</code></a>
chore(deps-dev): bump <code>@​anthropic-ai/sdk</code> from 0.85.0 to
0.86.0 in /js (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2702">#2702</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/57447524c88b6bba2775161aa449da32fb8e5c42"><code>5744752</code></a>
chore(deps): bump the py-minor-and-patch group across 1 directory with
10 upd...</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/960cae7f490e9ccbe428e6b56c8047bdb7b942a5"><code>960cae7</code></a>
chore(deps): bump pnpm/action-setup from 5 to 6 (<a
href="https://redirect.github.com/langchain-ai/langsmith-sdk/issues/2705">#2705</a>)</li>
<li><a
href="https://github.com/langchain-ai/langsmith-sdk/commit/9370e7670abf7f8f9a36fbb72250bcfd2f91e7c6"><code>9370e76</code></a>
chore(deps-dev): bump types-tqdm from 4.67.3.20260303 to 4.67.3.20260408
in /...</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langsmith-sdk/compare/v0.7.9...v0.7.31">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langsmith&package-manager=pip&previous-version=0.7.9&new-version=0.7.31)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-15 21:11:40 -07:00
dependabot[bot] 970cbc7342 Bump pydantic from 2.12.5 to 2.13.0 (#900)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.12.5 to
2.13.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/releases">pydantic's
releases</a>.</em></p>
<blockquote>
<h2>v2.13.0 2026-04-13</h2>
<h2>v2.13.0 (2026-04-13)</h2>
<p>The highlights of the v2.13 release are available in the <a
href="https://pydantic.dev/articles/pydantic-v2-13-release">blog
post</a>.
Several minor changes (considered non-breaking changes according to our
<a
href="https://pydantic.dev/docs/validation/2.13/get-started/version-policy/#pydantic-v2">versioning
policy</a>) are also included in this release. Make sure to look into
them before upgrading.</p>
<p>This release contains the updated <code>pydantic.v1</code> namespace,
matching version 1.10.26 which includes support for Python 3.14.</p>
<h3>What's Changed</h3>
<p>See the beta releases for all changes sinces 2.12.</p>
<h4>Packaging</h4>
<ul>
<li>Add zizmor for GitHub Actions workflow linting by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13039">#13039</a></li>
<li>Update jiter to v0.14.0 to fix a segmentation fault on musl Linux by
<a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13064">#13064</a></li>
</ul>
<h4>New Features</h4>
<ul>
<li>Allow default factories of private attributes to take validated
model data by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13013">#13013</a></li>
</ul>
<h4>Changes</h4>
<ul>
<li>Warn when serializing fixed length tuples with too few items by <a
href="https://github.com/arvindsaripalli"><code>@​arvindsaripalli</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13016">#13016</a></li>
</ul>
<h4>Fixes</h4>
<ul>
<li>Change type of <code>Any</code> when synthesizing
<code>_build_sources</code> for <code>BaseSettings.__init__()</code>
signature in the mypy plugin by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13049">#13049</a></li>
<li>Fix model equality when using runtime <code>extra</code>
configuration by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13062">#13062</a></li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a
href="https://github.com/arvindsaripalli"><code>@​arvindsaripalli</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13016">#13016</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.12.0...v2.13.0">https://github.com/pydantic/pydantic/compare/v2.12.0...v2.13.0</a></p>
<h2>v2.13.0b3 2026-03-31</h2>
<!-- raw HTML omitted -->
<h2>What's Changed</h2>
<h3>Packaging</h3>
<ul>
<li>Add riscv64 build target for manylinux by <a
href="https://github.com/boosterl"><code>@​boosterl</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12723">#12723</a></li>
</ul>
<h3>New Features</h3>
<ul>
<li>Add <code>ascii_only</code> option to <code>StringConstraints</code>
by <a
href="https://github.com/ai-man-codes"><code>@​ai-man-codes</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12907">#12907</a></li>
<li>Support <code>exclude_if</code> in computed fields by <a
href="https://github.com/andresliszt"><code>@​andresliszt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/12748">#12748</a></li>
<li>Push down constraints in unions involving <code>MISSING</code>
sentinel by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12908">#12908</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's
changelog</a>.</em></p>
<blockquote>
<h2>v2.13.0 (2026-04-13)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.13.0">GitHub
release</a></p>
<p>The highlights of the v2.13 release are available in the <a
href="https://pydantic.dev/articles/pydantic-v2-13-release">blog
post</a>.
Several minor changes (considered non-breaking changes according to our
<a
href="https://pydantic.dev/docs/validation/2.13/get-started/version-policy/#pydantic-v2">versioning
policy</a>)
are also included in this release. Make sure to look into them before
upgrading.</p>
<p>This release contains the updated <code>pydantic.v1</code> namespace,
matching version 1.10.26 which includes support for Python 3.14.</p>
<h3>What's Changed</h3>
<p>See the beta releases for all changes sinces 2.12.</p>
<h4>New Features</h4>
<ul>
<li>Allow default factories of private attributes to take validated
model data by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13013">#13013</a></li>
</ul>
<h4>Changes</h4>
<ul>
<li>Warn when serializing fixed length tuples with too few items by <a
href="https://github.com/arvindsaripalli"><code>@​arvindsaripalli</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13016">#13016</a></li>
</ul>
<h4>Fixes</h4>
<ul>
<li>Change type of <code>Any</code> when synthesizing
<code>_build_sources</code> for <code>BaseSettings.__init__()</code>
signature in the mypy plugin by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13049">#13049</a></li>
<li>Fix model equality when using runtime <code>extra</code>
configuration by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13062">#13062</a></li>
</ul>
<h4>Packaging</h4>
<ul>
<li>Add zizmor for GitHub Actions workflow linting by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13039">#13039</a></li>
<li>Update jiter to v0.14.0 to fix a segmentation fault on musl Linux by
<a href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13064">#13064</a></li>
</ul>
<h3>New Contributors</h3>
<ul>
<li><a
href="https://github.com/arvindsaripalli"><code>@​arvindsaripalli</code></a>
made their first contribution in <a
href="https://redirect.github.com/pydantic/pydantic/pull/13016">#13016</a></li>
</ul>
<h2>v2.13.0b3 (2026-03-31)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.13.0b3">GitHub
release</a></p>
<h3>What's Changed</h3>
<h4>New Features</h4>
<ul>
<li>Add <code>ascii_only</code> option to <code>StringConstraints</code>
by <a
href="https://github.com/ai-man-codes"><code>@​ai-man-codes</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12907">#12907</a></li>
<li>Support <code>exclude_if</code> in computed fields by <a
href="https://github.com/andresliszt"><code>@​andresliszt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic/pull/12748">#12748</a></li>
<li>Push down constraints in unions involving <code>MISSING</code>
sentinel by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12908">#12908</a></li>
</ul>
<h4>Changes</h4>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pydantic/pydantic/commit/46bf4fa648af3a1fbf4603a37f210e9d9c618357"><code>46bf4fa</code></a>
Fix Pydantic release workflow (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13067">#13067</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/1b359edab09c623464d23c6fd2503ae5ff276d43"><code>1b359ed</code></a>
Prepare release v2.13.0 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13065">#13065</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/b1bf19445d8ac144a7a0e82674d2d87eebab6c18"><code>b1bf194</code></a>
Fix model equality when using runtime <code>extra</code> configuration
(<a
href="https://redirect.github.com/pydantic/pydantic/issues/13062">#13062</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/17a35e371bdff348c0690651d324c91fc7c9ff9e"><code>17a35e3</code></a>
Update jiter to v0.14.0 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13064">#13064</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/feea402b23fa23774669908c4e08a61ba1e4238e"><code>feea402</code></a>
Use <code>simulation</code> mode in Codspeed CI (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13063">#13063</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/671c9b0d4d3f9b2f1b95ca32ac85cb69e824e0bc"><code>671c9b0</code></a>
Add basic benchmarks for model equality (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13061">#13061</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/d17d71e00a35f190b27321aa6f8f2a03139c00b8"><code>d17d71e</code></a>
Bump cryptography from 46.0.6 to 46.0.7 (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13056">#13056</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/919d61ac419af5151b673a90b65c9a12631091cf"><code>919d61a</code></a>
👥 Update Pydantic People (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13059">#13059</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/e7cf5dcb939ea98511e669b647c0273667a1b08a"><code>e7cf5dc</code></a>
Fix people workflow (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13047">#13047</a>)</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/2a806ad09b984fcc43568191aba5d965350995a0"><code>2a806ad</code></a>
Add regression test for <code>MISSING</code> sentinel serialization with
subclasses (<a
href="https://redirect.github.com/pydantic/pydantic/issues/13">#13</a>...</li>
<li>Additional commits viewable in <a
href="https://github.com/pydantic/pydantic/compare/v2.12.5...v2.13.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 10:55:35 -07:00
dependabot[bot] 13cdfe0b7c Bump the npm_and_yarn group across 2 directories with 1 update (#901)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[lodash](https://github.com/lodash/lodash).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory: [lodash](https://github.com/lodash/lodash).

Updates `lodash` from 4.17.23 to 4.18.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lodash/lodash/releases">lodash's
releases</a>.</em></p>
<blockquote>
<h2>4.18.1</h2>
<h2>Bugs</h2>
<p>Fixes a <code>ReferenceError</code> issue in <code>lodash</code>
<code>lodash-es</code> <code>lodash-amd</code> and
<code>lodash.template</code> when using the <code>template</code> and
<code>fromPairs</code> functions from the modular builds. See <a
href="https://redirect.github.com/lodash/lodash/issues/6167#issuecomment-4165269769">lodash/lodash#6167</a></p>
<p>These defects were related to how lodash distributions are built from
the main branch using <a
href="https://github.com/lodash-archive/lodash-cli">https://github.com/lodash-archive/lodash-cli</a>.
When internal dependencies change inside lodash functions, equivalent
updates need to be made to a mapping in the lodash-cli. (hey, it was
ahead of its time once upon a time!). We know this, but we missed it in
the last release. It's the kind of thing that passes in CI, but fails bc
the build is not the same thing you tested.</p>
<p>There is no diff on main for this, but you can see the diffs for each
of the npm packages on their respective branches:</p>
<ul>
<li><code>lodash</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-npm...4.18.1-npm">https://github.com/lodash/lodash/compare/4.18.0-npm...4.18.1-npm</a></li>
<li><code>lodash-es</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-es...4.18.1-es">https://github.com/lodash/lodash/compare/4.18.0-es...4.18.1-es</a></li>
<li><code>lodash-amd</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-amd...4.18.1-amd">https://github.com/lodash/lodash/compare/4.18.0-amd...4.18.1-amd</a></li>
<li><code>lodash.template</code><a
href="https://github.com/lodash/lodash/compare/4.18.0-npm-packages...4.18.1-npm-packages">https://github.com/lodash/lodash/compare/4.18.0-npm-packages...4.18.1-npm-packages</a></li>
</ul>
<h2>4.18.0</h2>
<h2>v4.18.0</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lodash/lodash/compare/4.17.23...4.18.0">https://github.com/lodash/lodash/compare/4.17.23...4.18.0</a></p>
<h3>Security</h3>
<p><strong><code>_.unset</code> / <code>_.omit</code></strong>: Fixed
prototype pollution via <code>constructor</code>/<code>prototype</code>
path traversal (<a
href="https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh">GHSA-f23m-r3pf-42rh</a>,
<a
href="https://github.com/lodash/lodash/commit/fe8d32eda854377349a4f922ab7655c8e5df9a0b">fe8d32e</a>).
Previously, array-wrapped path segments and primitive roots could bypass
the existing guards, allowing deletion of properties from built-in
prototypes. Now <code>constructor</code> and <code>prototype</code> are
blocked unconditionally as non-terminal path keys, matching
<code>baseSet</code>. Calls that previously returned <code>true</code>
and deleted the property now return <code>false</code> and leave the
target untouched.</p>
<p><strong><code>_.template</code></strong>: Fixed code injection via
<code>imports</code> keys (<a
href="https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc">GHSA-r5fr-rjxr-66jc</a>,
CVE-2026-4800, <a
href="https://github.com/lodash/lodash/commit/879aaa93132d78c2f8d20c60279da9f8b21576d6">879aaa9</a>).
Fixes an incomplete patch for CVE-2021-23337. The <code>variable</code>
option was validated against <code>reForbiddenIdentifierChars</code> but
<code>importsKeys</code> was left unguarded, allowing code injection via
the same <code>Function()</code> constructor sink. <code>imports</code>
keys containing forbidden identifier characters now throw
<code>&quot;Invalid imports option passed into
_.template&quot;</code>.</p>
<h3>Docs</h3>
<ul>
<li>Add security notice for <code>_.template</code> in threat model and
API docs (<a
href="https://redirect.github.com/lodash/lodash/pull/6099">#6099</a>)</li>
<li>Document <code>lower &gt; upper</code> behavior in
<code>_.random</code> (<a
href="https://redirect.github.com/lodash/lodash/pull/6115">#6115</a>)</li>
<li>Fix quotes in <code>_.compact</code> jsdoc (<a
href="https://redirect.github.com/lodash/lodash/pull/6090">#6090</a>)</li>
</ul>
<h3><code>lodash.*</code> modular packages</h3>
<p><a
href="https://redirect.github.com/lodash/lodash/pull/6157">Diff</a></p>
<p>We have also regenerated and published a select number of the
<code>lodash.*</code> modular packages.</p>
<p>These modular packages had fallen out of sync significantly from the
minor/patch updates to lodash. Specifically, we have brought the
following packages up to parity w/ the latest lodash release because
they have had CVEs on them in the past:</p>
<ul>
<li><a
href="https://www.npmjs.com/package/lodash.orderby">lodash.orderby</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.tonumber">lodash.tonumber</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.trim">lodash.trim</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.trimend">lodash.trimend</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.sortedindexby">lodash.sortedindexby</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.zipobjectdeep">lodash.zipobjectdeep</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.unset">lodash.unset</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.omit">lodash.omit</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.template">lodash.template</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lodash/lodash/commit/cb0b9b9212521c08e3eafe7c8cb0af1b42b6649e"><code>cb0b9b9</code></a>
release(patch): bump main to 4.18.1 (<a
href="https://redirect.github.com/lodash/lodash/issues/6177">#6177</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/75535f57883b7225adb96de1cfc1cd4169cfcb51"><code>75535f5</code></a>
chore: prune stale advisory refs (<a
href="https://redirect.github.com/lodash/lodash/issues/6170">#6170</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/62e91bc6a39c98d85b9ada8c44d40593deaf82a4"><code>62e91bc</code></a>
docs: remove n_ Node.js &lt; 6 REPL note from README (<a
href="https://redirect.github.com/lodash/lodash/issues/6165">#6165</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/59be2de61f8aa9461c7856533b51d31b7d8babc4"><code>59be2de</code></a>
release(minor): bump to 4.18.0 (<a
href="https://redirect.github.com/lodash/lodash/issues/6161">#6161</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/af634573030f979194871da7c68f79420992f53d"><code>af63457</code></a>
fix: broken tests for _.template 879aaa9</li>
<li><a
href="https://github.com/lodash/lodash/commit/1073a7693e1727e0cf3641e5f71f75ddcf8de7c0"><code>1073a76</code></a>
fix: linting issues</li>
<li><a
href="https://github.com/lodash/lodash/commit/879aaa93132d78c2f8d20c60279da9f8b21576d6"><code>879aaa9</code></a>
fix: validate imports keys in _.template</li>
<li><a
href="https://github.com/lodash/lodash/commit/fe8d32eda854377349a4f922ab7655c8e5df9a0b"><code>fe8d32e</code></a>
fix: block prototype pollution in baseUnset via constructor/prototype
traversal</li>
<li><a
href="https://github.com/lodash/lodash/commit/18ba0a32f42fd02117f096b032f89c984173462d"><code>18ba0a3</code></a>
refactor(fromPairs): use baseAssignValue for consistent assignment (<a
href="https://redirect.github.com/lodash/lodash/issues/6153">#6153</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/b8190803d48d60b8c80ad45d39125f32fa618cb2"><code>b819080</code></a>
ci: add dist sync validation workflow (<a
href="https://redirect.github.com/lodash/lodash/issues/6137">#6137</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/lodash/lodash/compare/4.17.23...4.18.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `lodash` from 4.17.23 to 4.18.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/lodash/lodash/releases">lodash's
releases</a>.</em></p>
<blockquote>
<h2>4.18.1</h2>
<h2>Bugs</h2>
<p>Fixes a <code>ReferenceError</code> issue in <code>lodash</code>
<code>lodash-es</code> <code>lodash-amd</code> and
<code>lodash.template</code> when using the <code>template</code> and
<code>fromPairs</code> functions from the modular builds. See <a
href="https://redirect.github.com/lodash/lodash/issues/6167#issuecomment-4165269769">lodash/lodash#6167</a></p>
<p>These defects were related to how lodash distributions are built from
the main branch using <a
href="https://github.com/lodash-archive/lodash-cli">https://github.com/lodash-archive/lodash-cli</a>.
When internal dependencies change inside lodash functions, equivalent
updates need to be made to a mapping in the lodash-cli. (hey, it was
ahead of its time once upon a time!). We know this, but we missed it in
the last release. It's the kind of thing that passes in CI, but fails bc
the build is not the same thing you tested.</p>
<p>There is no diff on main for this, but you can see the diffs for each
of the npm packages on their respective branches:</p>
<ul>
<li><code>lodash</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-npm...4.18.1-npm">https://github.com/lodash/lodash/compare/4.18.0-npm...4.18.1-npm</a></li>
<li><code>lodash-es</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-es...4.18.1-es">https://github.com/lodash/lodash/compare/4.18.0-es...4.18.1-es</a></li>
<li><code>lodash-amd</code>: <a
href="https://github.com/lodash/lodash/compare/4.18.0-amd...4.18.1-amd">https://github.com/lodash/lodash/compare/4.18.0-amd...4.18.1-amd</a></li>
<li><code>lodash.template</code><a
href="https://github.com/lodash/lodash/compare/4.18.0-npm-packages...4.18.1-npm-packages">https://github.com/lodash/lodash/compare/4.18.0-npm-packages...4.18.1-npm-packages</a></li>
</ul>
<h2>4.18.0</h2>
<h2>v4.18.0</h2>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/lodash/lodash/compare/4.17.23...4.18.0">https://github.com/lodash/lodash/compare/4.17.23...4.18.0</a></p>
<h3>Security</h3>
<p><strong><code>_.unset</code> / <code>_.omit</code></strong>: Fixed
prototype pollution via <code>constructor</code>/<code>prototype</code>
path traversal (<a
href="https://github.com/lodash/lodash/security/advisories/GHSA-f23m-r3pf-42rh">GHSA-f23m-r3pf-42rh</a>,
<a
href="https://github.com/lodash/lodash/commit/fe8d32eda854377349a4f922ab7655c8e5df9a0b">fe8d32e</a>).
Previously, array-wrapped path segments and primitive roots could bypass
the existing guards, allowing deletion of properties from built-in
prototypes. Now <code>constructor</code> and <code>prototype</code> are
blocked unconditionally as non-terminal path keys, matching
<code>baseSet</code>. Calls that previously returned <code>true</code>
and deleted the property now return <code>false</code> and leave the
target untouched.</p>
<p><strong><code>_.template</code></strong>: Fixed code injection via
<code>imports</code> keys (<a
href="https://github.com/lodash/lodash/security/advisories/GHSA-r5fr-rjxr-66jc">GHSA-r5fr-rjxr-66jc</a>,
CVE-2026-4800, <a
href="https://github.com/lodash/lodash/commit/879aaa93132d78c2f8d20c60279da9f8b21576d6">879aaa9</a>).
Fixes an incomplete patch for CVE-2021-23337. The <code>variable</code>
option was validated against <code>reForbiddenIdentifierChars</code> but
<code>importsKeys</code> was left unguarded, allowing code injection via
the same <code>Function()</code> constructor sink. <code>imports</code>
keys containing forbidden identifier characters now throw
<code>&quot;Invalid imports option passed into
_.template&quot;</code>.</p>
<h3>Docs</h3>
<ul>
<li>Add security notice for <code>_.template</code> in threat model and
API docs (<a
href="https://redirect.github.com/lodash/lodash/pull/6099">#6099</a>)</li>
<li>Document <code>lower &gt; upper</code> behavior in
<code>_.random</code> (<a
href="https://redirect.github.com/lodash/lodash/pull/6115">#6115</a>)</li>
<li>Fix quotes in <code>_.compact</code> jsdoc (<a
href="https://redirect.github.com/lodash/lodash/pull/6090">#6090</a>)</li>
</ul>
<h3><code>lodash.*</code> modular packages</h3>
<p><a
href="https://redirect.github.com/lodash/lodash/pull/6157">Diff</a></p>
<p>We have also regenerated and published a select number of the
<code>lodash.*</code> modular packages.</p>
<p>These modular packages had fallen out of sync significantly from the
minor/patch updates to lodash. Specifically, we have brought the
following packages up to parity w/ the latest lodash release because
they have had CVEs on them in the past:</p>
<ul>
<li><a
href="https://www.npmjs.com/package/lodash.orderby">lodash.orderby</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.tonumber">lodash.tonumber</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.trim">lodash.trim</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.trimend">lodash.trimend</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.sortedindexby">lodash.sortedindexby</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.zipobjectdeep">lodash.zipobjectdeep</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.unset">lodash.unset</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.omit">lodash.omit</a></li>
<li><a
href="https://www.npmjs.com/package/lodash.template">lodash.template</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lodash/lodash/commit/cb0b9b9212521c08e3eafe7c8cb0af1b42b6649e"><code>cb0b9b9</code></a>
release(patch): bump main to 4.18.1 (<a
href="https://redirect.github.com/lodash/lodash/issues/6177">#6177</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/75535f57883b7225adb96de1cfc1cd4169cfcb51"><code>75535f5</code></a>
chore: prune stale advisory refs (<a
href="https://redirect.github.com/lodash/lodash/issues/6170">#6170</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/62e91bc6a39c98d85b9ada8c44d40593deaf82a4"><code>62e91bc</code></a>
docs: remove n_ Node.js &lt; 6 REPL note from README (<a
href="https://redirect.github.com/lodash/lodash/issues/6165">#6165</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/59be2de61f8aa9461c7856533b51d31b7d8babc4"><code>59be2de</code></a>
release(minor): bump to 4.18.0 (<a
href="https://redirect.github.com/lodash/lodash/issues/6161">#6161</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/af634573030f979194871da7c68f79420992f53d"><code>af63457</code></a>
fix: broken tests for _.template 879aaa9</li>
<li><a
href="https://github.com/lodash/lodash/commit/1073a7693e1727e0cf3641e5f71f75ddcf8de7c0"><code>1073a76</code></a>
fix: linting issues</li>
<li><a
href="https://github.com/lodash/lodash/commit/879aaa93132d78c2f8d20c60279da9f8b21576d6"><code>879aaa9</code></a>
fix: validate imports keys in _.template</li>
<li><a
href="https://github.com/lodash/lodash/commit/fe8d32eda854377349a4f922ab7655c8e5df9a0b"><code>fe8d32e</code></a>
fix: block prototype pollution in baseUnset via constructor/prototype
traversal</li>
<li><a
href="https://github.com/lodash/lodash/commit/18ba0a32f42fd02117f096b032f89c984173462d"><code>18ba0a3</code></a>
refactor(fromPairs): use baseAssignValue for consistent assignment (<a
href="https://redirect.github.com/lodash/lodash/issues/6153">#6153</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/b8190803d48d60b8c80ad45d39125f32fa618cb2"><code>b819080</code></a>
ci: add dist sync validation workflow (<a
href="https://redirect.github.com/lodash/lodash/issues/6137">#6137</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/lodash/lodash/compare/4.17.23...4.18.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 10:45:00 -07:00
dependabot[bot] d442dbc712 Bump pytest from 9.0.2 to 9.0.3 in the pip group across 1 directory (#899)
Bumps the pip group with 1 update in the / directory:
[pytest](https://github.com/pytest-dev/pytest).

Updates `pytest` from 9.0.2 to 9.0.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>9.0.3</h2>
<h1>pytest 9.0.3 (2026-04-07)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/12444">#12444</a>:
Fixed <code>pytest.approx</code> which now correctly takes into account
<code>~collections.abc.Mapping</code> keys order to compare them.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13634">#13634</a>:
Blocking a <code>conftest.py</code> file using the <code>-p no:</code>
option is now explicitly disallowed.</p>
<p>Previously this resulted in an internal assertion failure during
plugin loading.</p>
<p>Pytest now raises a clear <code>UsageError</code> explaining that
conftest files are not plugins and cannot be disabled via
<code>-p</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13734">#13734</a>:
Fixed crash when a test raises an exceptiongroup with
<code>__tracebackhide__ = True</code>.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/14195">#14195</a>:
Fixed an issue where non-string messages passed to <!-- raw HTML omitted
-->unittest.TestCase.subTest()<!-- raw HTML omitted --> were not
printed.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/14343">#14343</a>:
Fixed use of insecure temporary directory (CVE-2025-71176).</p>
</li>
</ul>
<h2>Improved documentation</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13388">#13388</a>:
Clarified documentation for <code>-p</code> vs
<code>PYTEST_PLUGINS</code> plugin loading and fixed an incorrect
<code>-p</code> example.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13731">#13731</a>:
Clarified that capture fixtures (e.g. <code>capsys</code> and
<code>capfd</code>) take precedence over the <code>-s</code> /
<code>--capture=no</code> command-line options in <code>Accessing
captured output from a test function
&lt;accessing-captured-output&gt;</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/14088">#14088</a>:
Clarified that the default <code>pytest_collection</code> hook sets
<code>session.items</code> before it calls
<code>pytest_collection_finish</code>, not after.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/14255">#14255</a>:
TOML integer log levels must be quoted: Updating reference
documentation.</li>
</ul>
<h2>Contributor-facing changes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/12689">#12689</a>:
The test reports are now published to Codecov from GitHub Actions.
The test statistics is visible <a
href="https://app.codecov.io/gh/pytest-dev/pytest/tests">on the web
interface</a>.</p>
<p>-- by <code>aleguy02</code></p>
</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/a7d58d7a21b78581e636bbbdea13c66ad1657c1e"><code>a7d58d7</code></a>
Prepare release version 9.0.3</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/089d98199c253d8f89a040243bc4f2aa6cd5ab22"><code>089d981</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14366">#14366</a>
from bluetech/revert-14193-backport</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/8127eaf4ab7f6b2fdd0dc1b38343ec97aeef05ac"><code>8127eaf</code></a>
Revert &quot;Fix: assertrepr_compare respects dict insertion order (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14050">#14050</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14193">#14193</a>)&quot;</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/99a7e6029e7a6e8d53e5df114b1346e035370241"><code>99a7e60</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14363">#14363</a>
from pytest-dev/patchback/backports/9.0.x/95d8423bd...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/ddee02a578da30dd43aedc39c1c1f1aaadfcee95"><code>ddee02a</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14343">#14343</a>
from bluetech/cve-2025-71176-simple</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/74eac6916fee34726cb194f16c516e96fbd29619"><code>74eac69</code></a>
doc: Update training info (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14298">#14298</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14301">#14301</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/f92dee777cfdb77d1c43633d02766ddf1f07c869"><code>f92dee7</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14267">#14267</a>
from pytest-dev/patchback/backports/9.0.x/d6fa26c62...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/7ee58acc8777c31ac6cf388d01addf5a414a7439"><code>7ee58ac</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/12378">#12378</a>
from Pierre-Sassoulas/fix-implicit-str-concat-and-d...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/37da870d37e3a2f5177cae075c7b9ae279432bf8"><code>37da870</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14259">#14259</a>
from mitre88/patch-4 (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14268">#14268</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/c34bfa3b7acb65b594707c714f1d8461b0304eed"><code>c34bfa3</code></a>
Add explanation for string context diffs (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14257">#14257</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14266">#14266</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/9.0.2...9.0.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=9.0.2&new-version=9.0.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-14 10:42:07 -07:00
dependabot[bot] 0a2a03cc83 Bump the npm_and_yarn group across 2 directories with 1 update (#898)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory:
[vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite).

Updates `vite` from 5.4.21 to 6.4.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v6.4.2</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.2/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.1</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.0</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.7</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.7/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.6</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v6.4.2/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->6.4.2 (2026-04-06)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply server.fs check to env transport (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22159">#22159</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22163">#22163</a>)
(<a
href="https://github.com/vitejs/vite/commit/fe28e47e9463e4c9619f94bfa06d2f8f1411b44b">fe28e47</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/22159">#22159</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/22163">#22163</a></li>
<li>fix: avoid path traversal with optimize deps sourcemap handler (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22161">#22161</a>)
(<a
href="https://github.com/vitejs/vite/commit/ca4da5d1fb45c9cfdce606aa30825095791b164b">ca4da5d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/22161">#22161</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.4.1 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20969">#20969</a>)
(<a
href="https://github.com/vitejs/vite/commit/1114b5d7ea03e26572708715343bec69db4536e8">1114b5d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20968">#20968</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/20969">#20969</a></li>
</ul>
<h2>6.4.0 (2025-10-15)</h2>
<ul>
<li>feat: allow passing down resolved config to vite's createServer (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20932">#20932</a>)
(<a
href="https://github.com/vitejs/vite/commit/ca6455ee9eb6111a9caa9810506a1b9ac96a520a">ca6455e</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20932">#20932</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.7 (2025-10-14)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(esbuild): inject esbuild helpers correctly for esbuild 0.25.9+
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20940">#20940</a>)
(<a
href="https://github.com/vitejs/vite/commit/c59a222aa584c087cfe710173de1b9ecb597a3ff">c59a222</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20940">#20940</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.6 (2025-09-08)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)
(<a
href="https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f">0ab19ea</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20736">#20736</a></li>
<li>fix: upgrade sirv to 3.0.2 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20735">#20735</a>)
(<a
href="https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0">e11d240</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20735">#20735</a></li>
<li>test: detect ts support via <code>process.features</code> (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20544">#20544</a>)
(<a
href="https://github.com/vitejs/vite/commit/7d9922972b62329d37a71d4da5a4a382d0bf8a79">7d99229</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20544">#20544</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.5 (2025-05-05)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(ssr): handle uninitialized export access as undefined (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19959">#19959</a>)
(<a
href="https://github.com/vitejs/vite/commit/fd38d076fe2455aac1e00a7b15cd51159bf12bb5">fd38d07</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19959">#19959</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.4 (2025-04-30)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>)
(<a
href="https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb">c22c43d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19965">#19965</a></li>
<li>fix(optimizer): return plain object when using <code>require</code>
to import externals in optimized dependenci (<a
href="https://github.com/vitejs/vite/commit/efc5eab253419fde0a6a48b8d2f233063d6a9643">efc5eab</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19940">#19940</a></li>
<li>refactor: remove duplicate plugin context type (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19935">#19935</a>)
(<a
href="https://github.com/vitejs/vite/commit/d6d01c2292fa4f9603e05b95d81c8724314c20e0">d6d01c2</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19935">#19935</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.3 (2025-04-24)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: ignore malformed uris in tranform middleware (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19853">#19853</a>)
(<a
href="https://github.com/vitejs/vite/commit/e4d520141bcd83ad61f16767348b4a813bf9340a">e4d5201</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19853">#19853</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/6b3fad02abd550bd7b79934ff92c58dbd7f33045"><code>6b3fad0</code></a>
release: v6.4.2</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca4da5d1fb45c9cfdce606aa30825095791b164b"><code>ca4da5d</code></a>
fix: avoid path traversal with optimize deps sourcemap handler (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22161">#22161</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/fe28e47e9463e4c9619f94bfa06d2f8f1411b44b"><code>fe28e47</code></a>
fix: apply server.fs check to env transport (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22159">#22159</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22163">#22163</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/5487f4f641f70c47ea05fd101a4319897df048b3"><code>5487f4f</code></a>
release: v6.4.1</li>
<li><a
href="https://github.com/vitejs/vite/commit/1114b5d7ea03e26572708715343bec69db4536e8"><code>1114b5d</code></a>
fix(dev): trim trailing slash before <code>server.fs.deny</code> check
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20969">#20969</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/f12697c0f64b9a37196b9ab218a0911829d5b103"><code>f12697c</code></a>
release: v6.4.0</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca6455ee9eb6111a9caa9810506a1b9ac96a520a"><code>ca6455e</code></a>
feat: allow passing down resolved config to vite's createServer (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20932">#20932</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/0e173d83681daa31be10fa8a62d56b1ec84690af"><code>0e173d8</code></a>
release: v6.3.7</li>
<li><a
href="https://github.com/vitejs/vite/commit/c59a222aa584c087cfe710173de1b9ecb597a3ff"><code>c59a222</code></a>
fix(esbuild): inject esbuild helpers correctly for esbuild 0.25.9+ (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20940">#20940</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/3f337c5e24504e51188d29c970de1416ee523dbb"><code>3f337c5</code></a>
release: v6.3.6</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v6.4.2/packages/vite">compare
view</a></li>
</ul>
</details>
<br />

Updates `vite` from 5.4.21 to 6.4.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v6.4.2</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.2/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.1</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.1/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.4.0</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.4.0/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.7</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.7/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v6.3.6</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v6.3.6/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v6.4.2/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->6.4.2 (2026-04-06)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply server.fs check to env transport (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22159">#22159</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22163">#22163</a>)
(<a
href="https://github.com/vitejs/vite/commit/fe28e47e9463e4c9619f94bfa06d2f8f1411b44b">fe28e47</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/22159">#22159</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/22163">#22163</a></li>
<li>fix: avoid path traversal with optimize deps sourcemap handler (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22161">#22161</a>)
(<a
href="https://github.com/vitejs/vite/commit/ca4da5d1fb45c9cfdce606aa30825095791b164b">ca4da5d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/22161">#22161</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.4.1 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20969">#20969</a>)
(<a
href="https://github.com/vitejs/vite/commit/1114b5d7ea03e26572708715343bec69db4536e8">1114b5d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20968">#20968</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/20969">#20969</a></li>
</ul>
<h2>6.4.0 (2025-10-15)</h2>
<ul>
<li>feat: allow passing down resolved config to vite's createServer (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20932">#20932</a>)
(<a
href="https://github.com/vitejs/vite/commit/ca6455ee9eb6111a9caa9810506a1b9ac96a520a">ca6455e</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20932">#20932</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.7 (2025-10-14)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(esbuild): inject esbuild helpers correctly for esbuild 0.25.9+
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20940">#20940</a>)
(<a
href="https://github.com/vitejs/vite/commit/c59a222aa584c087cfe710173de1b9ecb597a3ff">c59a222</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20940">#20940</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.6 (2025-09-08)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)
(<a
href="https://github.com/vitejs/vite/commit/0ab19ea9fcb66f544328f442cf6e70f7c0528d5f">0ab19ea</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20736">#20736</a></li>
<li>fix: upgrade sirv to 3.0.2 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20735">#20735</a>)
(<a
href="https://github.com/vitejs/vite/commit/e11d24008b97d4ca731ecc1a3b95260a6d12e7e0">e11d240</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20735">#20735</a></li>
<li>test: detect ts support via <code>process.features</code> (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20544">#20544</a>)
(<a
href="https://github.com/vitejs/vite/commit/7d9922972b62329d37a71d4da5a4a382d0bf8a79">7d99229</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20544">#20544</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.5 (2025-05-05)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(ssr): handle uninitialized export access as undefined (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19959">#19959</a>)
(<a
href="https://github.com/vitejs/vite/commit/fd38d076fe2455aac1e00a7b15cd51159bf12bb5">fd38d07</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19959">#19959</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.4 (2025-04-30)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>)
(<a
href="https://github.com/vitejs/vite/commit/c22c43de612eebb6c182dd67850c24e4fab8cacb">c22c43d</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19965">#19965</a></li>
<li>fix(optimizer): return plain object when using <code>require</code>
to import externals in optimized dependenci (<a
href="https://github.com/vitejs/vite/commit/efc5eab253419fde0a6a48b8d2f233063d6a9643">efc5eab</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19940">#19940</a></li>
<li>refactor: remove duplicate plugin context type (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19935">#19935</a>)
(<a
href="https://github.com/vitejs/vite/commit/d6d01c2292fa4f9603e05b95d81c8724314c20e0">d6d01c2</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19935">#19935</a></li>
</ul>
<h2><!-- raw HTML omitted -->6.3.3 (2025-04-24)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: ignore malformed uris in tranform middleware (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19853">#19853</a>)
(<a
href="https://github.com/vitejs/vite/commit/e4d520141bcd83ad61f16767348b4a813bf9340a">e4d5201</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19853">#19853</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/6b3fad02abd550bd7b79934ff92c58dbd7f33045"><code>6b3fad0</code></a>
release: v6.4.2</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca4da5d1fb45c9cfdce606aa30825095791b164b"><code>ca4da5d</code></a>
fix: avoid path traversal with optimize deps sourcemap handler (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22161">#22161</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/fe28e47e9463e4c9619f94bfa06d2f8f1411b44b"><code>fe28e47</code></a>
fix: apply server.fs check to env transport (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22159">#22159</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/22163">#22163</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/5487f4f641f70c47ea05fd101a4319897df048b3"><code>5487f4f</code></a>
release: v6.4.1</li>
<li><a
href="https://github.com/vitejs/vite/commit/1114b5d7ea03e26572708715343bec69db4536e8"><code>1114b5d</code></a>
fix(dev): trim trailing slash before <code>server.fs.deny</code> check
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20969">#20969</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/f12697c0f64b9a37196b9ab218a0911829d5b103"><code>f12697c</code></a>
release: v6.4.0</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca6455ee9eb6111a9caa9810506a1b9ac96a520a"><code>ca6455e</code></a>
feat: allow passing down resolved config to vite's createServer (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20932">#20932</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/0e173d83681daa31be10fa8a62d56b1ec84690af"><code>0e173d8</code></a>
release: v6.3.7</li>
<li><a
href="https://github.com/vitejs/vite/commit/c59a222aa584c087cfe710173de1b9ecb597a3ff"><code>c59a222</code></a>
fix(esbuild): inject esbuild helpers correctly for esbuild 0.25.9+ (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20940">#20940</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/3f337c5e24504e51188d29c970de1416ee523dbb"><code>3f337c5</code></a>
release: v6.3.6</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v6.4.2/packages/vite">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 23:11:35 -07:00
dependabot[bot] 619e176fa4 Bump ruff from 0.15.6 to 0.15.9 (#894)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.6 to 0.15.9.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.15.9</h2>
<h2>Release Notes</h2>
<p>Released on 2026-04-02.</p>
<h3>Preview features</h3>
<ul>
<li>[<code>pyflakes</code>] Flag annotated variable redeclarations as
<code>F811</code> in preview mode (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24244">#24244</a>)</li>
<li>[<code>ruff</code>] Allow dunder-named assignments in non-strict
mode for <code>RUF067</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24089">#24089</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-errmsg</code>] Avoid shadowing existing
<code>msg</code> in fix for <code>EM101</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24363">#24363</a>)</li>
<li>[<code>flake8-simplify</code>] Ignore pre-initialization references
in <code>SIM113</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24235">#24235</a>)</li>
<li>[<code>pycodestyle</code>] Fix <code>W391</code> fixes for
consecutive empty notebook cells (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24236">#24236</a>)</li>
<li>[<code>pyupgrade</code>] Fix <code>UP008</code> nested class
matching (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24273">#24273</a>)</li>
<li>[<code>pyupgrade</code>] Ignore strings with string-only escapes
(<code>UP012</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16058">#16058</a>)</li>
<li>[<code>ruff</code>] <code>RUF072</code>: skip formfeeds on dedent
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/24308">#24308</a>)</li>
<li>[<code>ruff</code>] Avoid re-using symbol in <code>RUF024</code> fix
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/24316">#24316</a>)</li>
<li>[<code>ruff</code>] Parenthesize expression in <code>RUF050</code>
fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24234">#24234</a>)</li>
<li>Disallow starred expressions as values of starred expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24280">#24280</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-simplify</code>] Suppress <code>SIM105</code> for
<code>except*</code> before Python 3.12 (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23869">#23869</a>)</li>
<li>[<code>pyflakes</code>] Extend <code>F507</code> to flag
<code>%</code>-format strings with zero placeholders (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24215">#24215</a>)</li>
<li>[<code>pyupgrade</code>] <code>UP018</code> should detect more
unnecessarily wrapped literals (UP018) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24093">#24093</a>)</li>
<li>[<code>pyupgrade</code>] Fix <code>UP008</code> callable scope
handling to support lambdas (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24274">#24274</a>)</li>
<li>[<code>ruff</code>] <code>RUF010</code>: Mark fix as unsafe when it
deletes a comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24270">#24270</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Add <code>nested-string-quote-style</code> formatting option (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24312">#24312</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Clarify RUF071 fix safety for non-path
string comparisons (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24149">#24149</a>)</li>
<li>[<code>flake8-type-checking</code>] Clarify import cycle wording for
<code>TC001</code>/<code>TC002</code>/<code>TC003</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24322">#24322</a>)</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>Avoid rendering fix lines with trailing whitespace after
<code>|</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24343">#24343</a>)</li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/tranhoangtu-it"><code>@​tranhoangtu-it</code></a></li>
<li><a href="https://github.com/dylwil3"><code>@​dylwil3</code></a></li>
<li><a href="https://github.com/zsol"><code>@​zsol</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.9</h2>
<p>Released on 2026-04-02.</p>
<h3>Preview features</h3>
<ul>
<li>[<code>pyflakes</code>] Flag annotated variable redeclarations as
<code>F811</code> in preview mode (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24244">#24244</a>)</li>
<li>[<code>ruff</code>] Allow dunder-named assignments in non-strict
mode for <code>RUF067</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24089">#24089</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>[<code>flake8-errmsg</code>] Avoid shadowing existing
<code>msg</code> in fix for <code>EM101</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24363">#24363</a>)</li>
<li>[<code>flake8-simplify</code>] Ignore pre-initialization references
in <code>SIM113</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24235">#24235</a>)</li>
<li>[<code>pycodestyle</code>] Fix <code>W391</code> fixes for
consecutive empty notebook cells (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24236">#24236</a>)</li>
<li>[<code>pyupgrade</code>] Fix <code>UP008</code> nested class
matching (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24273">#24273</a>)</li>
<li>[<code>pyupgrade</code>] Ignore strings with string-only escapes
(<code>UP012</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/16058">#16058</a>)</li>
<li>[<code>ruff</code>] <code>RUF072</code>: skip formfeeds on dedent
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/24308">#24308</a>)</li>
<li>[<code>ruff</code>] Avoid re-using symbol in <code>RUF024</code> fix
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/24316">#24316</a>)</li>
<li>[<code>ruff</code>] Parenthesize expression in <code>RUF050</code>
fix (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24234">#24234</a>)</li>
<li>Disallow starred expressions as values of starred expressions (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24280">#24280</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-simplify</code>] Suppress <code>SIM105</code> for
<code>except*</code> before Python 3.12 (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23869">#23869</a>)</li>
<li>[<code>pyflakes</code>] Extend <code>F507</code> to flag
<code>%</code>-format strings with zero placeholders (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24215">#24215</a>)</li>
<li>[<code>pyupgrade</code>] <code>UP018</code> should detect more
unnecessarily wrapped literals (UP018) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24093">#24093</a>)</li>
<li>[<code>pyupgrade</code>] Fix <code>UP008</code> callable scope
handling to support lambdas (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24274">#24274</a>)</li>
<li>[<code>ruff</code>] <code>RUF010</code>: Mark fix as unsafe when it
deletes a comment (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24270">#24270</a>)</li>
</ul>
<h3>Formatter</h3>
<ul>
<li>Add <code>nested-string-quote-style</code> formatting option (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24312">#24312</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>[<code>flake8-bugbear</code>] Clarify RUF071 fix safety for non-path
string comparisons (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24149">#24149</a>)</li>
<li>[<code>flake8-type-checking</code>] Clarify import cycle wording for
<code>TC001</code>/<code>TC002</code>/<code>TC003</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24322">#24322</a>)</li>
</ul>
<h3>Other changes</h3>
<ul>
<li>Avoid rendering fix lines with trailing whitespace after
<code>|</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/24343">#24343</a>)</li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a></li>
<li><a
href="https://github.com/MichaReiser"><code>@​MichaReiser</code></a></li>
<li><a
href="https://github.com/tranhoangtu-it"><code>@​tranhoangtu-it</code></a></li>
<li><a href="https://github.com/dylwil3"><code>@​dylwil3</code></a></li>
<li><a href="https://github.com/zsol"><code>@​zsol</code></a></li>
<li><a
href="https://github.com/renovate"><code>@​renovate</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/724ccc1ae8a61e872cf58435f2c073189dc248f2"><code>724ccc1</code></a>
Bump 0.15.9 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24369">#24369</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/96d9e0964cb87498ef15510ea7f896ba336659f9"><code>96d9e09</code></a>
[ty] Move the <code>deferred</code> submodule inside
<code>infer/builder</code> (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24368">#24368</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/130da28d610a466721bb942e8a5e0ec47bbe3469"><code>130da28</code></a>
[ty] Infer the <code>extra_items</code> keyword argument to class-based
TypedDicts as an...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a617c54b0708a8c1eb850cc3b2a5caee21137a28"><code>a617c54</code></a>
[ty] Validate type qualifiers in functional TypedDict fields and the
`extra_i...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/d8517087c6cd0aa4f33dcede605ff642941dd74b"><code>d851708</code></a>
[ty] Improve robustness of various type-qualifier-related checks (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24251">#24251</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/aecb5877c6d6fe035c03aba994ec3a7b935b8f02"><code>aecb587</code></a>
Only run the release-gate on workflow dispatch (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24366">#24366</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b88957174311030927bf564da32d05dee0eb89d9"><code>b889571</code></a>
[ty] Use <code>infer_type_expression</code> for parsing parameter
annotations and return...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/3286a62be986a8d6d04d95b3bc619f06e012fa2f"><code>3286a62</code></a>
Add a &quot;release-gate&quot; step to the release workflow (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24365">#24365</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5f88756ee10e3faf0e96c883c34c95fc78200536"><code>5f88756</code></a>
Disallow starred expressions as values of starred expressions (<a
href="https://redirect.github.com/astral-sh/ruff/issues/24280">#24280</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5c59f8a46965cac3470f09972196c8620faa4626"><code>5c59f8a</code></a>
[<code>pyupgrade</code>] Ignore strings with string-only escapes
(<code>UP012</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/issues/16058">#16058</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.15.6...0.15.9">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.15.6&new-version=0.15.9)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 23:09:39 -07:00
dependabot[bot] d09daaaeb2 Bump fastapi from 0.135.2 to 0.135.3 (#895)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.135.2 to
0.135.3.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastapi/fastapi/releases">fastapi's
releases</a>.</em></p>
<blockquote>
<h2>0.135.3</h2>
<h3>Features</h3>
<ul>
<li> Add support for <code>@app.vibe()</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15280">#15280</a>
by <a href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.
<ul>
<li>New docs: <a href="https://fastapi.tiangolo.com/advanced/vibe/">Vibe
Coding</a>.</li>
</ul>
</li>
</ul>
<h3>Docs</h3>
<ul>
<li>✏️ Fix typo for <code>client_secret</code> in OAuth2 form
docstrings. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14946">#14946</a>
by <a href="https://github.com/bysiber"><code>@​bysiber</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>👥 Update FastAPI People - Experts. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15279">#15279</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>⬆ Bump orjson from 3.11.7 to 3.11.8. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15276">#15276</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>⬆ Bump ruff from 0.15.0 to 0.15.8. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15277">#15277</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>👥 Update FastAPI GitHub topic repositories. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15274">#15274</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>⬆ Bump fastmcp from 2.14.5 to 3.2.0. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15267">#15267</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>👥 Update FastAPI People - Contributors and Translators. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15270">#15270</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>⬆ Bump requests from 2.32.5 to 2.33.0. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15228">#15228</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>👷 Add ty check to <code>lint.sh</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15136">#15136</a>
by <a
href="https://github.com/svlandeg"><code>@​svlandeg</code></a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fastapi/fastapi/commit/1f442c454f2f74c7419f83c203e6333955399528"><code>1f442c4</code></a>
🔖 Release version 0.135.3</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/8f5d1577b471f389f6cdea878d40a1497fda7746"><code>8f5d157</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/428452a710338334ae11043a48b06d52d9b3edba"><code>428452a</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/70580da818722cce68b7a88928d67bd0f64f42c5"><code>70580da</code></a>
 Add support for <code>@app.vibe()</code> (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15280">#15280</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/6ee87478d821171139264cd9cd17cbd2232934ce"><code>6ee8747</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/3e72c09a2abfe9e1b55eede6a297cb1847126e49"><code>3e72c09</code></a>
👥 Update FastAPI People - Experts (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15279">#15279</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/96df35f7a4337d612811483d8ade74f91cce2d61"><code>96df35f</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/6c8112555bd86f21cfee8500140dca094ad26e20"><code>6c81125</code></a>
⬆ Bump orjson from 3.11.7 to 3.11.8 (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15276">#15276</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/428f82c93616b52aee2fcee03484a855135c07e5"><code>428f82c</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/5599c59b9e7112109f04b63a58034fb95833f514"><code>5599c59</code></a>
⬆ Bump ruff from 0.15.0 to 0.15.8 (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15277">#15277</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/fastapi/fastapi/compare/0.135.2...0.135.3">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 23:04:54 -07:00
dependabot[bot] ff94a9248f Bump uvicorn from 0.42.0 to 0.44.0 (#893)
Bumps [uvicorn](https://github.com/Kludex/uvicorn) from 0.42.0 to
0.44.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/releases">uvicorn's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.44.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Implement websocket keepalive pings for websockets-sansio by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2888">Kludex/uvicorn#2888</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.43.0...0.44.0">https://github.com/Kludex/uvicorn/compare/0.43.0...0.44.0</a></p>
<h2>Version 0.43.0</h2>
<h2>Changed</h2>
<ul>
<li>Emit <code>http.disconnect</code> ASGI <code>receive()</code> event
on server shutting down for streaming responses (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2829">#2829</a>)</li>
<li>Use native <code>context</code> parameter for
<code>create_task</code> on Python 3.11+ (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2859">#2859</a>)</li>
<li>Drop cast in ASGI types (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2875">#2875</a>)</li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.42.0...0.43.0">https://github.com/Kludex/uvicorn/compare/0.42.0...0.43.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/blob/main/docs/release-notes.md">uvicorn's
changelog</a>.</em></p>
<blockquote>
<h2>0.44.0 (April 6, 2026)</h2>
<h3>Added</h3>
<ul>
<li>Implement websocket keepalive pings for websockets-sansio (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2888">#2888</a>)</li>
</ul>
<h2>0.43.0 (April 3, 2026)</h2>
<p>You can quit Uvicorn now. We heard you, <a
href="https://github.com/pamelafox"><code>@​pamelafox</code></a> - all
47 of your Ctrl+C's (thanks for flagging it, and thanks to <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a> for the
fix 🙏). <a href="https://x.com/pamelafox/status/2039097686155227623">See
the tweet</a>.</p>
<h3>Changed</h3>
<ul>
<li>Emit <code>http.disconnect</code> ASGI <code>receive()</code> event
on server shutting down for streaming responses (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2829">#2829</a>)</li>
<li>Use native <code>context</code> parameter for
<code>create_task</code> on Python 3.11+ (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2859">#2859</a>)</li>
<li>Drop cast in ASGI types (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2875">#2875</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Kludex/uvicorn/commit/edb54c43c0321c0b41eee1473f3f4cf145e8927f"><code>edb54c4</code></a>
Version 0.44.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2890">#2890</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/029be08867fe899cde6fd31a3ba75fffca7bd9ae"><code>029be08</code></a>
Implement websocket keepalive pings for websockets-sansio (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2888">#2888</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/8d397c73191b49c6d5280098d7c09dbe474e00bf"><code>8d397c7</code></a>
Version 0.43.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2885">#2885</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/587042d68ff6c813ec0d8cfafaa820ebe7229d23"><code>587042d</code></a>
🐛 Emit <code>http.disconnect</code> ASGI <code>receive()</code> event on
server shutting down for s...</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/c9a75fb67b2e969253a41ef4ad447e013eee879e"><code>c9a75fb</code></a>
chore(deps): bump the github-actions group with 3 updates (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2878">#2878</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/84fd578224e36766efb056585cb6cc5171270089"><code>84fd578</code></a>
chore(deps): bump pygments from 2.19.2 to 2.20.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2877">#2877</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/cd52d34b55d898180a65cfc01a6a88aac54c65c3"><code>cd52d34</code></a>
Use native <code>context</code> parameter for <code>create_task</code>
on Python 3.11+ (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2859">#2859</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/5211880320b2e99a532eb121808039404da234ab"><code>5211880</code></a>
Drop cast in ASGI types (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2875">#2875</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/1cb8e747e2817ee46a4c0d44139e46b3b1f8fab6"><code>1cb8e74</code></a>
Add websocket 500 fallback header test (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2874">#2874</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/28efbb24bd590f1f943cbc2bf84f197268a8c6d8"><code>28efbb2</code></a>
chore(deps-dev): bump cryptography from 46.0.5 to 46.0.6 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2873">#2873</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Kludex/uvicorn/compare/0.42.0...0.44.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 23:04:21 -07:00
dependabot[bot] 73b59980e6 Bump langchain-core from 1.2.23 to 1.2.28 in the pip group across 1 directory (#897)
Bumps the pip group with 1 update in the / directory:
[langchain-core](https://github.com/langchain-ai/langchain).

Updates `langchain-core` from 1.2.23 to 1.2.28
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==1.2.28</h2>
<p>Changes since langchain-core==1.2.27</p>
<p>release(core): release 1.2.28 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36614">#36614</a>)
fix(core): add more sanitization to templates (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36612">#36612</a>)</p>
<h2>langchain-core==1.2.27</h2>
<p>Changes since langchain-core==1.2.26</p>
<p>release(core): 1.2.27 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36586">#36586</a>)
fix(core): handle symlinks in deprecated prompt save path (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36585">#36585</a>)
chore: add comment explaining <code>pygments&gt;=2.20.0</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36570">#36570</a>)</p>
<p>Credit to Jeff Ponte (<a
href="https://github.com/JDP-Security"><code>@​JDP-Security</code></a>)
for reporting the symlink resolution issue in <a
href="https://redirect.github.com/langchain-ai/langchain/issues/36585">#36585</a>.</p>
<h2>langchain-core==1.2.26</h2>
<p>Changes since langchain-core==1.2.25</p>
<p>release(core): 1.2.26 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36511">#36511</a>)
fix(core): add init validator and serialization mappings for Bedrock
models (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34510">#34510</a>)
feat(core): add <code>ChatBaseten</code> to serializable mapping (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36510">#36510</a>)
chore(core): drop <code>gpt-3.5-turbo</code> from docstrings (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36497">#36497</a>)
fix(core): correct parameter names in filter_messages docstring example
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36462">#36462</a>)</p>
<h2>langchain-core==1.2.25</h2>
<p>Changes since langchain-core==1.2.24</p>
<p>release(core): 1.2.25 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36473">#36473</a>)
fix(core): harden check for txt files in deprecated prompt loading
functions (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36471">#36471</a>)
fix(core): fixed typos in the documentation (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36459">#36459</a>)</p>
<p>Credit to Jeff Ponte (<a
href="https://github.com/JDP-Security"><code>@​JDP-Security</code></a>)
for reporting the symlink resolution issue resolved in <a
href="https://redirect.github.com/langchain-ai/langchain/issues/36471">#36471</a>.</p>
<h2>langchain-core==1.2.24</h2>
<p>Changes since langchain-core==1.2.23</p>
<p>release(core): 1.2.24 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36434">#36434</a>)
feat(core): impute placeholder filenames for OpenAI file inputs (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36433">#36433</a>)
chore: pygments&gt;=2.20.0 across all packages (CVE-2026-4539) (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36385">#36385</a>)
fix(core): add &quot;computer&quot; to _WellKnownOpenAITools (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36261">#36261</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/dd7c3eb3a4acfc834b038ec9dbde94478c66776e"><code>dd7c3eb</code></a>
release(core): release 1.2.28 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36614">#36614</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/af2ed47c6f008cdd551f3c0d87db3774c8dfe258"><code>af2ed47</code></a>
fix(core): add more sanitization to templates (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36612">#36612</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/7e5858d8078124f98f10102da21414689467c132"><code>7e5858d</code></a>
release(standard-tests): 1.1.6 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36610">#36610</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/fe99cb29123b704a90f5c8587a757def3b1471e0"><code>fe99cb2</code></a>
fix(standard-tests): update standard tests for sandbox backends (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36036">#36036</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/65bbd47cb2721c51ef8638f9e7da35247c4bfdde"><code>65bbd47</code></a>
chore(model-profiles): refresh model profile data (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36596">#36596</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/64864041168606535dfbd39055c0dca3dd61b5ba"><code>6486404</code></a>
release(core): 1.2.27 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36586">#36586</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/7629c747260cbaed7ca55466d5b9e1b520a7de77"><code>7629c74</code></a>
fix(core): handle symlinks in deprecated prompt save path (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36585">#36585</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/ce21bf469d7493f4716bc30feb15a5b3f16ebe1e"><code>ce21bf4</code></a>
ci: convert working-directory to validated dropdown (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36575">#36575</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/b8698eacbd2960c7e3195018f42992bf2c9d69c7"><code>b8698ea</code></a>
release(ollama): 1.1.0 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36574">#36574</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/3beba77e2e23d498fda07f9b8d6ba00aabfaf69f"><code>3beba77</code></a>
feat(ollama): support <code>response_format</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34612">#34612</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.23...langchain-core==1.2.28">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=1.2.23&new-version=1.2.28)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-04-09 22:54:51 -07:00
John Kennedy 279630ca2c fix: patch 8 security alerts (all severities) (#891)
## Security Alert Patch

Resolves 8 Dependabot security alerts across all severity tiers.

### Packages Updated

| Package | Old Constraint | New Constraint | Strategy | Scope | CVEs
Resolved |

|---------|---------------|----------------|----------|-------|---------------|
| Pygments | 2.19.2 | 2.20.0 | A — lockfile update | runtime
(transitive) | CVE-2026-4539 |
| yaml | 1.10.2 | 1.10.3 | A — lockfile patch | runtime (transitive) |
CVE-2026-33532 |
| yaml | 2.3.3 | 2.8.3 | A — lockfile regen | dev (transitive) |
CVE-2026-33532 |
| esbuild | 0.21.5 / 0.24.2 | 0.25.0 | C — resolution override
(dev-only) | dev-only | GHSA-67mh-4wv8-2f99 |

Strategy = direct bump (A) / override (C, dev-only)
Scope = runtime (transitive) = transitive dep in runtime chain /
dev-only = local dev only

### CVE Details

- **CVE-2026-4539** (low) — Pygments ReDoS via inefficient regex for
GUID matching.
[GHSA-5239-wwwm-4pmq](https://github.com/advisories/GHSA-5239-wwwm-4pmq)
- **CVE-2026-33532** (medium) — yaml stack overflow via deeply nested
YAML collections.
[GHSA-48c2-rrv3-qjmp](https://github.com/advisories/GHSA-48c2-rrv3-qjmp)
- **GHSA-67mh-4wv8-2f99** (medium) — esbuild dev server allows any
website to send requests and read responses.
[GHSA-67mh-4wv8-2f99](https://github.com/advisories/GHSA-67mh-4wv8-2f99)

### Linear Tickets

No matching Linear tickets found for the resolved CVEs.

### Verification

- [x] All lockfiles regenerated
- [x] Linters pass (`ruff check`, `ruff format --check`)
- [x] Tests pass (123 passed)

🤖 Submitted by langster-patch
2026-04-01 00:19:21 -07:00
dependabot[bot] ad0c8a8ce1 Bump pytest-socket from 0.6.0 to 0.7.0 (#890)
Bumps [pytest-socket](https://github.com/miketheman/pytest-socket) from
0.6.0 to 0.7.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/miketheman/pytest-socket/releases">pytest-socket's
releases</a>.</em></p>
<blockquote>
<h2>0.7.0</h2>
<h2>What's Changed</h2>
<ul>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/191">miketheman/pytest-socket#191</a></li>
<li>chore(deps-dev): update starlette requirement from ^0.23.0 to
^0.24.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/192">miketheman/pytest-socket#192</a></li>
<li>feat: force enable socket CLI flag by <a
href="https://github.com/mgaitan"><code>@​mgaitan</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/186">miketheman/pytest-socket#186</a></li>
<li>chore(deps-dev): update starlette requirement from ^0.24.0 to
^0.25.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/193">miketheman/pytest-socket#193</a></li>
<li>chore(deps): update actions/checkout action to v3.4.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/198">miketheman/pytest-socket#198</a></li>
<li>chore(deps): bump actions/stale from 7 to 8 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/200">miketheman/pytest-socket#200</a></li>
<li>chore(deps): bump actions/checkout from 3.4.0 to 3.5.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/202">miketheman/pytest-socket#202</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/204">miketheman/pytest-socket#204</a></li>
<li>chore(deps-dev): update starlette requirement from ^0.25.0 to
^0.26.1 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/197">miketheman/pytest-socket#197</a></li>
<li>chore(deps): update actions/checkout action to v3.5.2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/207">miketheman/pytest-socket#207</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/213">miketheman/pytest-socket#213</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/214">miketheman/pytest-socket#214</a></li>
<li>chore(deps): update dependency pytest-httpbin to v2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/215">miketheman/pytest-socket#215</a></li>
<li>chore(deps): update dependency starlette to ^0.27.0 [security] by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/219">miketheman/pytest-socket#219</a></li>
<li>chore(deps): update actions/checkout action to v3.5.3 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/222">miketheman/pytest-socket#222</a></li>
<li>chore(deps): update dependency starlette to ^0.28.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/225">miketheman/pytest-socket#225</a></li>
<li>chore(deps): update dependency httpx to ^0.24.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/206">miketheman/pytest-socket#206</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/224">miketheman/pytest-socket#224</a></li>
<li>test: remove deprecated asynctest by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/226">miketheman/pytest-socket#226</a></li>
<li>test: test against Python 3.11 by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/175">miketheman/pytest-socket#175</a></li>
<li>test: extract common function for reuse by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/227">miketheman/pytest-socket#227</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/228">miketheman/pytest-socket#228</a></li>
<li>test: update test remote with stable service by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/231">miketheman/pytest-socket#231</a></li>
<li>test: speed up with dependency caching by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/232">miketheman/pytest-socket#232</a></li>
<li>fix: only emit license and readme for sdist by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/233">miketheman/pytest-socket#233</a></li>
<li>test: don't fail silently by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/234">miketheman/pytest-socket#234</a></li>
<li>chore(allow_hosts): Use getaddrinfo instead of gethostbyname by <a
href="https://github.com/hasier"><code>@​hasier</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/209">miketheman/pytest-socket#209</a></li>
<li>chore(deps): update dependency pytest to v7.4.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/235">miketheman/pytest-socket#235</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/236">miketheman/pytest-socket#236</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/237">miketheman/pytest-socket#237</a></li>
<li>chore(deps-dev): bump starlette from 0.28.0 to 0.29.0 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/239">miketheman/pytest-socket#239</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/240">miketheman/pytest-socket#240</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/241">miketheman/pytest-socket#241</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/242">miketheman/pytest-socket#242</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/243">miketheman/pytest-socket#243</a></li>
<li>chore(deps): update actions/checkout action to v3.6.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/244">miketheman/pytest-socket#244</a></li>
<li>chore(deps): update dependency coverage to v7.3.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/247">miketheman/pytest-socket#247</a></li>
<li>chore(deps-dev): bump certifi from 2023.5.7 to 2023.7.22 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/249">miketheman/pytest-socket#249</a></li>
<li>chore(deps): update dependency pytest to v7.4.1 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/250">miketheman/pytest-socket#250</a></li>
<li>chore(deps): update actions/checkout action to v4 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/251">miketheman/pytest-socket#251</a></li>
<li>chore(deps): update dependency pytest-randomly to v3.15.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/248">miketheman/pytest-socket#248</a></li>
<li>chore(deps): update dependency coverage to v7.3.1 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/252">miketheman/pytest-socket#252</a></li>
<li>chore(deps): update dependency pytest to v7.4.2 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/253">miketheman/pytest-socket#253</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/254">miketheman/pytest-socket#254</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/256">miketheman/pytest-socket#256</a></li>
<li>chore(deps): update actions/checkout action to v4.1.0 by <a
href="https://github.com/renovate"><code>@​renovate</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/257">miketheman/pytest-socket#257</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>
in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/258">miketheman/pytest-socket#258</a></li>
<li>chore(deps): update minimum required pytest version by <a
href="https://github.com/miketheman"><code>@​miketheman</code></a> in <a
href="https://redirect.github.com/miketheman/pytest-socket/pull/269">miketheman/pytest-socket#269</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/miketheman/pytest-socket/blob/main/CHANGELOG.md">pytest-socket's
changelog</a>.</em></p>
<blockquote>
<h2>[0.7.0][] (2024-01-28)</h2>
<p>Enhancements:</p>
<ul>
<li>Force enable socket CLI flag <a
href="https://redirect.github.com/miketheman/pytest-socket/issues/186">#186</a></li>
<li>Use <code>getaddrinfo()</code> instead of
<code>gethostbyname()</code> <a
href="https://redirect.github.com/miketheman/pytest-socket/issues/209">#209</a></li>
<li>Allow both Hosts via IP and Name <a
href="https://redirect.github.com/miketheman/pytest-socket/issues/275">#275</a></li>
</ul>
<p>Changes:</p>
<ul>
<li><strong>Removed support for Python 3.7 and older.</strong></li>
<li>Dependency updates</li>
<li>Development updates</li>
<li>Testing updates</li>
<li>Emit license and readme for source distribution <a
href="https://redirect.github.com/miketheman/pytest-socket/issues/233">#233</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/93f704bc7989cee1df10024e0344c08e16055300"><code>93f704b</code></a>
pytest-socket, v0.7.0</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/f8c904d66a4e53e72328407118ed6095cf7fe7e7"><code>f8c904d</code></a>
docs: update readme for clarity</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/e9899eb11531e0905c5da799246c0d943353d72f"><code>e9899eb</code></a>
chore: remove custom condeql config</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/0621810d5edaf0d44b6f7eb802a83ec089b24612"><code>0621810</code></a>
chore(dependencies): update custom httpbin pin (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/302">#302</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/c78b94674965de1d4f536ad4934cf348c866cca5"><code>c78b946</code></a>
chore(deps-dev): bump starlette from 0.35.1 to 0.36.1 (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/301">#301</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/7d7f2dffd0ec9fc0cc70e00e8e0c4e89286f3adf"><code>7d7f2df</code></a>
chore(deps-dev): bump jinja2 from 3.1.2 to 3.1.3 (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/299">#299</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/182efc81512834f9da212733fa825ba994bc7c71"><code>182efc8</code></a>
chore(deps-dev): bump starlette from 0.34.0 to 0.35.1 (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/300">#300</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/8cc5ec0c0f1ea6ddff46ada8450a347f0831c044"><code>8cc5ec0</code></a>
[pre-commit.ci] pre-commit autoupdate (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/297">#297</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/fbd9abf3205ecc5a62c019acd1bbc58ccab18d9c"><code>fbd9abf</code></a>
chore(deps): update dependency httpx to ^0.26.0 (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/292">#292</a>)</li>
<li><a
href="https://github.com/miketheman/pytest-socket/commit/16b74f83c38ca2855dfd9ee94d96b518471f6a3b"><code>16b74f8</code></a>
chore(deps): update dependency coverage to v7.4.0 (<a
href="https://redirect.github.com/miketheman/pytest-socket/issues/288">#288</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/miketheman/pytest-socket/compare/0.6.0...0.7.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 17:46:27 -07:00
dependabot[bot] 81fa67452f Bump fastapi from 0.135.1 to 0.135.2 (#889)
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.135.1 to
0.135.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastapi/fastapi/releases">fastapi's
releases</a>.</em></p>
<blockquote>
<h2>0.135.2</h2>
<h3>Upgrades</h3>
<ul>
<li>⬆️ Increase lower bound to <code>pydantic &gt;=2.9.0.</code> and fix
the test suite. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15139">#15139</a>
by <a
href="https://github.com/svlandeg"><code>@​svlandeg</code></a>.</li>
</ul>
<h3>Docs</h3>
<ul>
<li>📝 Add missing last release notes dates. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15202">#15202</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Update docs for contributors and team members regarding
translation PRs. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15200">#15200</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
<li>💄 Fix code blocks in reference docs overflowing table width. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15094">#15094</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
<li>📝 Fix duplicated words in docstrings. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15116">#15116</a>
by <a
href="https://github.com/AhsanSheraz"><code>@​AhsanSheraz</code></a>.</li>
<li>📝 Add docs for <code>pyproject.toml</code> with
<code>entrypoint</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15075">#15075</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Update links in docs to no longer use the classes external-link
and internal-link. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15061">#15061</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🔨 Add JS and CSS handling for automatic <code>target=_blank</code>
for links in docs. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15063">#15063</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>💄 Update styles for internal and external links in new tab. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15058">#15058</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Add documentation for the FastAPI VS Code extension. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15008">#15008</a>
by <a
href="https://github.com/savannahostrowski"><code>@​savannahostrowski</code></a>.</li>
<li>📝 Fix doctrings for <code>max_digits</code> and
<code>decimal_places</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14944">#14944</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
<li>📝 Add dates to release notes. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15001">#15001</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<h3>Translations</h3>
<ul>
<li>🌐 Update translations for zh (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15177">#15177</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for zh-hant (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15178">#15178</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for zh-hant (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15176">#15176</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for zh (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15175">#15175</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for ja (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15171">#15171</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for ko (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15170">#15170</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for tr (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15172">#15172</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for ko (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15168">#15168</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for ja (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15167">#15167</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for tr (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15169">#15169</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for fr (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15165">#15165</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for fr (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15163">#15163</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for uk (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15160">#15160</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for uk (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15158">#15158</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for pt (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15157">#15157</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for pt (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15159">#15159</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for es (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15155">#15155</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for es (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15154">#15154</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for de (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15156">#15156</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for ru (update-and-add). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15152">#15152</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>🌐 Update translations for de (add-missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15153">#15153</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>🔨 Exclude spam comments from statistics in
<code>scripts/people.py</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15088">#15088</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
<li>⬆ Bump authlib from 1.6.7 to 1.6.9. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15128">#15128</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>⬆ Bump pyasn1 from 0.6.2 to 0.6.3. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15143">#15143</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>⬆ Bump ujson from 5.11.0 to 5.12.0. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15150">#15150</a>
by <a
href="https://github.com/apps/dependabot"><code>@​dependabot[bot]</code></a>.</li>
<li>🔨 Tweak translation workflow and translation fixer tool. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15166">#15166</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fastapi/fastapi/commit/25a3697cedc6e7dfb84e93c8ff965801486f00f4"><code>25a3697</code></a>
🔖 Release version 0.135.2</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/ab125daa4034435777853a2c5a6c47451414f9aa"><code>ab125da</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/122b6d490f844b6f716855d55a3e11237b7fb61f"><code>122b6d4</code></a>
📝 Add missing last release notes dates (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15202">#15202</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/68ac0ab91e9b14c418013790fc0e420a827686b5"><code>68ac0ab</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/ea6e287eb398afe6a82c3ef71780e8451813f674"><code>ea6e287</code></a>
📝 Update docs for contributors and team members regarding translation
PRs (<a
href="https://redirect.github.com/fastapi/fastapi/issues/1">#1</a>...</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/d0a6f208c5cb5daaa1de5ea5187729e3789d1dce"><code>d0a6f20</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/fd9e192cf4fae399c0d51dd23e2a137052eb6087"><code>fd9e192</code></a>
💄 Fix code blocks in reference docs overflowing table width (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15094">#15094</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/fce9460f865928eb7d0393d8809bbc472e0c21cd"><code>fce9460</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/0227991a01e61bf5cdd93cc00e9e243f52b47a4a"><code>0227991</code></a>
🔨 Exclude spam comments from statistics in
<code>scripts/people.py</code> (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15088">#15088</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/cbd64b09a32681d3b0ea097608bc62eb0d1587e0"><code>cbd64b0</code></a>
📝 Update release notes</li>
<li>Additional commits viewable in <a
href="https://github.com/fastapi/fastapi/compare/0.135.1...0.135.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=fastapi&package-manager=pip&previous-version=0.135.1&new-version=0.135.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 17:43:33 -07:00
dependabot[bot] 0cf1cdb692 Bump openai from 2.24.0 to 2.30.0 (#888)
Bumps [openai](https://github.com/openai/openai-python) from 2.24.0 to
2.30.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/releases">openai's
releases</a>.</em></p>
<blockquote>
<h2>v2.30.0</h2>
<h2>2.30.0 (2026-03-25)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.29.0...v2.30.0">v2.29.0...v2.30.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add keys field to
Click/DoubleClick/Drag/Move/Scroll computer actions (<a
href="https://github.com/openai/openai-python/commit/ee1bbeddbb38dab817557412dc106354409bb950">ee1bbed</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> align SDK response types with expanded item
schemas (<a
href="https://github.com/openai/openai-python/commit/f3f258a9d4d19db3fb0c6c35e25ad3cedbe71254">f3f258a</a>)</li>
<li>sanitize endpoint path params (<a
href="https://github.com/openai/openai-python/commit/89f66988fde790c0c83ff8b876d1e1b10d616367">89f6698</a>)</li>
<li><strong>types:</strong> make type required in
ResponseInputMessageItem (<a
href="https://github.com/openai/openai-python/commit/cfdb1676ea0550840330a58f1a31a40a41a0a53f">cfdb167</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>ci:</strong> skip lint on metadata-only changes (<a
href="https://github.com/openai/openai-python/commit/faa93e19a1d5c30c7dd672a08dbbdbb3c0374714">faa93e1</a>)</li>
<li><strong>internal:</strong> update gitignore (<a
href="https://github.com/openai/openai-python/commit/c468477f1546579618865a726e35a685cffeacd9">c468477</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.4 (<a
href="https://github.com/openai/openai-python/commit/f350af86c13ade0237778010d264c55fda443354">f350af8</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.5 (<a
href="https://github.com/openai/openai-python/commit/5c0340128fc1a416e2dfdc6ab4b05f1e954e8482">5c03401</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.6 (<a
href="https://github.com/openai/openai-python/commit/b6353b8411d31dcc95875d801ce9e90a21e0fd52">b6353b8</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.7 (<a
href="https://github.com/openai/openai-python/commit/1d654bea74ac9c3d43302587f98f33cfff502e48">1d654be</a>)</li>
</ul>
<h3>Refactors</h3>
<ul>
<li><strong>tests:</strong> switch from prism to steady (<a
href="https://github.com/openai/openai-python/commit/4a82035669b739d16a0e85d4ded778d51e061948">4a82035</a>)</li>
</ul>
<h2>v2.29.0</h2>
<h2>2.29.0 (2026-03-17)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.28.0...v2.29.0">v2.28.0...v2.29.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> 5.4 nano and mini model slugs (<a
href="https://github.com/openai/openai-python/commit/3b456661f77ca3196aceb5ab3350664a63481114">3b45666</a>)</li>
<li><strong>api:</strong> add /v1/videos endpoint to batches create
method (<a
href="https://github.com/openai/openai-python/commit/c0e7a161a996854021e9eb69ea2a60ca0d08047f">c0e7a16</a>)</li>
<li><strong>api:</strong> add defer_loading field to ToolFunction (<a
href="https://github.com/openai/openai-python/commit/3167595432bdda2f90721901d30ad316db49323e">3167595</a>)</li>
<li><strong>api:</strong> add in and nin operators to ComparisonFilter
type (<a
href="https://github.com/openai/openai-python/commit/664f02b051af84e1ca3fa313981ec72fdea269b3">664f02b</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> bump minimum typing-extensions version (<a
href="https://github.com/openai/openai-python/commit/a2fb2ca55142c6658a18be7bd1392a01f5a83f35">a2fb2ca</a>)</li>
<li><strong>pydantic:</strong> do not pass <code>by_alias</code> unless
set (<a
href="https://github.com/openai/openai-python/commit/8ebe8fbcb011c6a005a715cae50c6400a8596ee0">8ebe8fb</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/blob/main/CHANGELOG.md">openai's
changelog</a>.</em></p>
<blockquote>
<h2>2.30.0 (2026-03-25)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.29.0...v2.30.0">v2.29.0...v2.30.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add keys field to
Click/DoubleClick/Drag/Move/Scroll computer actions (<a
href="https://github.com/openai/openai-python/commit/ee1bbeddbb38dab817557412dc106354409bb950">ee1bbed</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> align SDK response types with expanded item
schemas (<a
href="https://github.com/openai/openai-python/commit/f3f258a9d4d19db3fb0c6c35e25ad3cedbe71254">f3f258a</a>)</li>
<li>sanitize endpoint path params (<a
href="https://github.com/openai/openai-python/commit/89f66988fde790c0c83ff8b876d1e1b10d616367">89f6698</a>)</li>
<li><strong>types:</strong> make type required in
ResponseInputMessageItem (<a
href="https://github.com/openai/openai-python/commit/cfdb1676ea0550840330a58f1a31a40a41a0a53f">cfdb167</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>ci:</strong> skip lint on metadata-only changes (<a
href="https://github.com/openai/openai-python/commit/faa93e19a1d5c30c7dd672a08dbbdbb3c0374714">faa93e1</a>)</li>
<li><strong>internal:</strong> update gitignore (<a
href="https://github.com/openai/openai-python/commit/c468477f1546579618865a726e35a685cffeacd9">c468477</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.4 (<a
href="https://github.com/openai/openai-python/commit/f350af86c13ade0237778010d264c55fda443354">f350af8</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.5 (<a
href="https://github.com/openai/openai-python/commit/5c0340128fc1a416e2dfdc6ab4b05f1e954e8482">5c03401</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.6 (<a
href="https://github.com/openai/openai-python/commit/b6353b8411d31dcc95875d801ce9e90a21e0fd52">b6353b8</a>)</li>
<li><strong>tests:</strong> bump steady to v0.19.7 (<a
href="https://github.com/openai/openai-python/commit/1d654bea74ac9c3d43302587f98f33cfff502e48">1d654be</a>)</li>
</ul>
<h3>Refactors</h3>
<ul>
<li><strong>tests:</strong> switch from prism to steady (<a
href="https://github.com/openai/openai-python/commit/4a82035669b739d16a0e85d4ded778d51e061948">4a82035</a>)</li>
</ul>
<h2>2.29.0 (2026-03-17)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.28.0...v2.29.0">v2.28.0...v2.29.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> 5.4 nano and mini model slugs (<a
href="https://github.com/openai/openai-python/commit/3b456661f77ca3196aceb5ab3350664a63481114">3b45666</a>)</li>
<li><strong>api:</strong> add /v1/videos endpoint to batches create
method (<a
href="https://github.com/openai/openai-python/commit/c0e7a161a996854021e9eb69ea2a60ca0d08047f">c0e7a16</a>)</li>
<li><strong>api:</strong> add defer_loading field to ToolFunction (<a
href="https://github.com/openai/openai-python/commit/3167595432bdda2f90721901d30ad316db49323e">3167595</a>)</li>
<li><strong>api:</strong> add in and nin operators to ComparisonFilter
type (<a
href="https://github.com/openai/openai-python/commit/664f02b051af84e1ca3fa313981ec72fdea269b3">664f02b</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>deps:</strong> bump minimum typing-extensions version (<a
href="https://github.com/openai/openai-python/commit/a2fb2ca55142c6658a18be7bd1392a01f5a83f35">a2fb2ca</a>)</li>
<li><strong>pydantic:</strong> do not pass <code>by_alias</code> unless
set (<a
href="https://github.com/openai/openai-python/commit/8ebe8fbcb011c6a005a715cae50c6400a8596ee0">8ebe8fb</a>)</li>
</ul>
<h3>Chores</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/openai/openai-python/commit/5ae2cc10e4140d36aa236fa7c0bc5ce5ff190a01"><code>5ae2cc1</code></a>
release: 2.30.0</li>
<li><a
href="https://github.com/openai/openai-python/commit/6e772ae791759b25de83313614e0fb26eba895b7"><code>6e772ae</code></a>
fix(api): align SDK response types with expanded item schemas</li>
<li><a
href="https://github.com/openai/openai-python/commit/cd72fba37866bfdddd4a84420afe2ff397279582"><code>cd72fba</code></a>
feat(api): add keys field to Click/DoubleClick/Drag/Move/Scroll computer
actions</li>
<li><a
href="https://github.com/openai/openai-python/commit/4f43fe371037415ace13981a277917366b6fc24e"><code>4f43fe3</code></a>
chore(tests): bump steady to v0.19.7</li>
<li><a
href="https://github.com/openai/openai-python/commit/23bc02703bbb9497eadd5d56497d5d6954372a62"><code>23bc027</code></a>
chore(ci): skip lint on metadata-only changes</li>
<li><a
href="https://github.com/openai/openai-python/commit/e3c59bf1ac8533a1be831a6d166f9f7abeabf8e0"><code>e3c59bf</code></a>
chore(tests): bump steady to v0.19.6</li>
<li><a
href="https://github.com/openai/openai-python/commit/56ad9ca089394e535d7df52fe48d544e54086ddc"><code>56ad9ca</code></a>
fix(types): make type required in ResponseInputMessageItem</li>
<li><a
href="https://github.com/openai/openai-python/commit/78c764bdf483a0c48789bfdefe6299830d5abde0"><code>78c764b</code></a>
chore(internal): update gitignore</li>
<li><a
href="https://github.com/openai/openai-python/commit/634b74edd4aaa07a74f9ee30241410d61624264f"><code>634b74e</code></a>
chore(tests): bump steady to v0.19.5</li>
<li><a
href="https://github.com/openai/openai-python/commit/c8c9508899b2119cc69e006403d09cbad7f616e4"><code>c8c9508</code></a>
chore(tests): bump steady to v0.19.4</li>
<li>Additional commits viewable in <a
href="https://github.com/openai/openai-python/compare/v2.24.0...v2.30.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=openai&package-manager=pip&previous-version=2.24.0&new-version=2.30.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 17:43:18 -07:00
dependabot[bot] 1d40334f07 Bump langchain-core from 1.2.22 to 1.2.23 (#887)
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from
1.2.22 to 1.2.23.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==1.2.23</h2>
<p>Changes since langchain-core==1.2.22</p>
<p>release(core): 1.2.23 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36323">#36323</a>)
revert: Revert &quot;fix(core): trace invocation params in
metadata&quot; (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36322">#36322</a>)
chore: bump requests from 2.32.5 to 2.33.0 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36243">#36243</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/d48364130dfc4ef2e8a751453d2045243c22b388"><code>d483641</code></a>
release(core): 1.2.23 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36323">#36323</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/389f7ad1bc15123b8b901e61d0a1785b0a14815f"><code>389f7ad</code></a>
revert: Revert &quot;fix(core): trace invocation params in
metadata&quot; (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36322">#36322</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/475408fa620996e1958d18a0789ed5bf9fdee054"><code>475408f</code></a>
fix(langchain): recognize ChatAnthropicVertex in
_get_approximate_token_count...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/1545dbfa174c4dcf1d9a8618da59df480b33e235"><code>1545dbf</code></a>
chore(langchain): remove unnecessary description for toods list as a
group (#...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/494b760028dfedddc1b91ad79f80a05d393d277e"><code>494b760</code></a>
fix(chroma): fix Python 3.14 support in langchain-chroma (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36199">#36199</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/c7a677bba511d7f3f5c36f9384ae6ba150866e04"><code>c7a677b</code></a>
chore(langchain): add async implementation to todolist and test (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36313">#36313</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/03515881176fddba919e3592e0a41cbc9806fdb8"><code>0351588</code></a>
chore: harden language in ci (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36314">#36314</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/954a23094d15b91ae2137cbfabd3870cb8853a5e"><code>954a230</code></a>
chore(langchain): speed up todo list middleware init (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36311">#36311</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/89cd0caa54d541e33ae87224c8e277bcbb026020"><code>89cd0ca</code></a>
docs: fix grammatical error in development guidelines (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36225">#36225</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/2aeeb58ef11e74ab98f869d6ae5c2ae04721be06"><code>2aeeb58</code></a>
chore: bump requests from 2.32.5 to 2.33.0 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36243">#36243</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.22...langchain-core==1.2.23">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=1.2.22&new-version=1.2.23)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-31 17:43:08 -07:00
dependabot[bot] ffd3ec1e4b Bump pytest-cov from 4.1.0 to 7.1.0 (#881)
Bumps [pytest-cov](https://github.com/pytest-dev/pytest-cov) from 4.1.0
to 7.1.0.
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest-cov/blob/master/CHANGELOG.rst">pytest-cov's
changelog</a>.</em></p>
<blockquote>
<h2>7.1.0 (2026-03-21)</h2>
<ul>
<li>
<p>Fixed total coverage computation to always be consistent, regardless
of reporting settings.
Previously some reports could produce different total counts, and
consequently can make --cov-fail-under behave different depending on
reporting options.
See <code>[#641](https://github.com/pytest-dev/pytest-cov/issues/641)
&lt;https://github.com/pytest-dev/pytest-cov/issues/641&gt;</code>_.</p>
</li>
<li>
<p>Improve handling of ResourceWarning from sqlite3.</p>
<p>The plugin adds warning filter for sqlite3
<code>ResourceWarning</code> unclosed database (since 6.2.0).
It checks if there is already existing plugin for this message by
comparing filter regular expression.
When filter is specified on command line the message is escaped and does
not match an expected message.
A check for an escaped regular expression is added to handle this
case.</p>
<p>With this fix one can suppress <code>ResourceWarning</code> from
sqlite3 from command line::</p>
<p>pytest -W &quot;ignore:unclosed database in &lt;sqlite3.Connection
object at:ResourceWarning&quot; ...</p>
</li>
<li>
<p>Various improvements to documentation.
Contributed by Art Pelling in
<code>[#718](https://github.com/pytest-dev/pytest-cov/issues/718)
&lt;https://github.com/pytest-dev/pytest-cov/pull/718&gt;</code>_ and
&quot;vivodi&quot; in
<code>[#738](https://github.com/pytest-dev/pytest-cov/issues/738)
&lt;https://github.com/pytest-dev/pytest-cov/pull/738&gt;</code><em>.
Also closed
<code>[#736](https://github.com/pytest-dev/pytest-cov/issues/736)
&lt;https://github.com/pytest-dev/pytest-cov/issues/736&gt;</code></em>.</p>
</li>
<li>
<p>Fixed some assertions in tests.
Contributed by in Markéta Machová in
<code>[#722](https://github.com/pytest-dev/pytest-cov/issues/722)
&lt;https://github.com/pytest-dev/pytest-cov/pull/722&gt;</code>_.</p>
</li>
<li>
<p>Removed unnecessary coverage configuration copying (meant as a backup
because reporting commands had configuration side-effects before
coverage 5.0).</p>
</li>
</ul>
<h2>7.0.0 (2025-09-09)</h2>
<ul>
<li>
<p>Dropped support for subprocesses measurement.</p>
<p>It was a feature added long time ago when coverage lacked a nice way
to measure subprocesses created in tests.
It relied on a <code>.pth</code> file, there was no way to opt-out and
it created bad interations
with <code>coverage's new patch system
&lt;https://coverage.readthedocs.io/en/latest/config.html#run-patch&gt;</code>_
added
in <code>7.10
&lt;https://coverage.readthedocs.io/en/7.10.6/changes.html#version-7-10-0-2025-07-24&gt;</code>_.</p>
<p>To migrate to this release you might need to enable the suprocess
patch, example for <code>.coveragerc</code>:</p>
<p>.. code-block:: ini</p>
<p>[run]
patch = subprocess</p>
<p>This release also requires at least coverage 7.10.6.</p>
</li>
<li>
<p>Switched packaging to have metadata completely in
<code>pyproject.toml</code> and use <code>hatchling
&lt;https://pypi.org/project/hatchling/&gt;</code>_ for
building.
Contributed by Ofek Lev in
<code>[#551](https://github.com/pytest-dev/pytest-cov/issues/551)
&lt;https://github.com/pytest-dev/pytest-cov/pull/551&gt;</code>_
with some extras in
<code>[#716](https://github.com/pytest-dev/pytest-cov/issues/716)
&lt;https://github.com/pytest-dev/pytest-cov/pull/716&gt;</code>_.</p>
</li>
<li>
<p>Removed some not really necessary testing deps like
<code>six</code>.</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/66c8a526b1246b5eb8fb1bc218878131bc628622"><code>66c8a52</code></a>
Bump version: 7.0.0 → 7.1.0</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/f7076624784332594aa4cb3585d4757d295db15e"><code>f707662</code></a>
Make the examples use pypy 3.11.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/6049a7847872e3139e6c82e93787123df5dc8672"><code>6049a78</code></a>
Make context test use the old ctracer (seems the new sysmon tracer
behaves di...</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/8ebf20bbbc73478b3f8fd36d30237d9ea083f06b"><code>8ebf20b</code></a>
Update changelog.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/861d30e60d571f97259c6b718b71c819d5dbc3b9"><code>861d30e</code></a>
Remove the backup context manager - shouldn't be needed since coverage
5.0, ...</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/fd4c956014035527f0c3c8d7faef3f8cfdadac7f"><code>fd4c956</code></a>
Pass the precision on the nulled total (seems that there's some caching
goion...</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/78c9c4ecb005faf4962fd86ff7bf9c9cce9554d6"><code>78c9c4e</code></a>
Only run the 3.9 on older deps.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/4849a922e8be725c662a3d9175da571ace6545dc"><code>4849a92</code></a>
Punctuation.</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/197c35e2f37031fd1927715307ab6eed7cb3d2b7"><code>197c35e</code></a>
Update changelog and hopefully I don't forget to publish release again
:))</li>
<li><a
href="https://github.com/pytest-dev/pytest-cov/commit/14dc1c92d44108384e39803888635fdbfc578b7f"><code>14dc1c9</code></a>
Update examples to use 3.11 and make the adhoc layout example look a bit
more...</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest-cov/compare/v4.1.0...v7.1.0">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 20:15:41 -07:00
dependabot[bot] c7331426ad Bump langchain-core from 1.2.19 to 1.2.22 in the pip group across 1 directory (#886)
Bumps the pip group with 1 update in the / directory:
[langchain-core](https://github.com/langchain-ai/langchain).

Updates `langchain-core` from 1.2.19 to 1.2.22
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==1.2.22</h2>
<p>Changes since langchain-core==1.2.21</p>
<p>release(core): 1.2.22 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36201">#36201</a>)
fix(core): validate paths in <code>prompt.save</code> and
<code>load_prompt</code>, deprecate methods (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36200">#36200</a>)</p>
<h2>langchain-core==1.2.21</h2>
<p>Changes since langchain-core==1.2.20</p>
<p>release(core): 1.2.21 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36179">#36179</a>)
fix(core,model-profiles): add missing <code>ModelProfile</code> fields,
warn on schema drift (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36129">#36129</a>)
chore(core): remove stale blockbuster allowlist for deleted context
module (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36168">#36168</a>)
ci: suppress pytest streaming output in CI (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36092">#36092</a>)</p>
<h2>langchain-core==1.2.20</h2>
<p>Changes since langchain-core==1.2.19</p>
<p>release(core): 1.2.20 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36085">#36085</a>)
fix(core): trace invocation params in metadata (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36080">#36080</a>)
feat: Add LangSmith integration metadata to create_agent and
init_chat_model (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35810">#35810</a>)
feat(core): harden anti-ssrf (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35960">#35960</a>)
ci: avoid unnecessary dep installs in lint targets (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36046">#36046</a>)
docs(core): document <code>base_url</code> in mermaid api (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35961">#35961</a>)
chore: bump orjson from 3.11.5 to 3.11.6 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35805">#35805</a>)
chore: housekeeping (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35850">#35850</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/d22df94537e4267f72dc1bbfc8e3849baf20d9f7"><code>d22df94</code></a>
release(core): 1.2.22 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36201">#36201</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/27add913474e01e33bededf4096151130ba0d47c"><code>27add91</code></a>
fix(core): validate paths in <code>prompt.save</code> and
<code>load_prompt</code>, deprecate metho...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/7563fceb40ce31165524f3f57ec65e487c02b1a7"><code>7563fce</code></a>
chore(model-profiles): refresh model profile data (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36195">#36195</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/3e64c255b84b283b3a65216b19b9838734258c96"><code>3e64c25</code></a>
chore: use repo permissions instead of org membership for maintainer
override...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/1778b082ecd64a9dedd48674d874ca1bfcbe4c7d"><code>1778b08</code></a>
chore(partners): bump <code>langchain-core</code> min to
<code>1.2.21</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36183">#36183</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/ad574fce0d52740c249b0db7bde871d779ffb93d"><code>ad574fc</code></a>
fix(openai): bump min core version (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36180">#36180</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/19f81cf6f1d73f7adf156491ba0617497a526b8c"><code>19f81cf</code></a>
release(core): 1.2.21 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36179">#36179</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/6d07ef28a7023dc7b832fe52862f7a6fc0a187f3"><code>6d07ef2</code></a>
release(openai): 1.1.12 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/36178">#36178</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/2f64d80cc65091985873c339ca76a59af7baf739"><code>2f64d80</code></a>
fix(core,model-profiles): add missing <code>ModelProfile</code> fields,
warn on schema d...</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/5ffece5c033365baf4a3df52ffed5c6bfbed27ee"><code>5ffece5</code></a>
chore(core): remove stale blockbuster allowlist for deleted context
module (#...</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.19...langchain-core==1.2.22">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=1.2.19&new-version=1.2.22)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:46:17 -07:00
dependabot[bot] 1f35a9186a Bump the npm_and_yarn group across 2 directories with 1 update (#885)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[brace-expansion](https://github.com/juliangruber/brace-expansion).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory:
[brace-expansion](https://github.com/juliangruber/brace-expansion).

Updates `brace-expansion` from 1.1.12 to 1.1.13
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/6c353caf23beb9644f858eb3fe38d43a68b82898"><code>6c353ca</code></a>
1.1.13</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/7fd684f89fdde3549563d0a6522226a9189472a2"><code>7fd684f</code></a>
Backport fix for GHSA-f886-m6hf-6m8v (<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/95">#95</a>)</li>
<li>See full diff in <a
href="https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13">compare
view</a></li>
</ul>
</details>
<br />

Updates `brace-expansion` from 1.1.12 to 1.1.13
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/6c353caf23beb9644f858eb3fe38d43a68b82898"><code>6c353ca</code></a>
1.1.13</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/7fd684f89fdde3549563d0a6522226a9189472a2"><code>7fd684f</code></a>
Backport fix for GHSA-f886-m6hf-6m8v (<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/95">#95</a>)</li>
<li>See full diff in <a
href="https://github.com/juliangruber/brace-expansion/compare/v1.1.12...v1.1.13">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:46:07 -07:00
dependabot[bot] 3436a68908 Bump orjson from 3.11.6 to 3.11.7 (#880)
Bumps [orjson](https://github.com/ijl/orjson) from 3.11.6 to 3.11.7.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/releases">orjson's
releases</a>.</em></p>
<blockquote>
<h2>3.11.7</h2>
<h3>Changed</h3>
<ul>
<li>Use a faster library to serialize <code>float</code>. Users with
byte-exact regression
tests should note positive exponents are now written using a
<code>+</code>, e.g.,
<code>1.2e+30</code> instead of <code>1.2e30</code>. Both formats are
spec-compliant.</li>
<li>ABI compatibility with CPython 3.15 alpha 5 free-threading.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/blob/master/CHANGELOG.md">orjson's
changelog</a>.</em></p>
<blockquote>
<h2>3.11.7 - 2026-02-02</h2>
<h3>Changed</h3>
<ul>
<li>Use a faster library to serialize <code>float</code>. Users with
byte-exact regression
tests should note positive exponents are now written using a
<code>+</code>, e.g.,
<code>1.2e+30</code> instead of <code>1.2e30</code>. Both formats are
spec-compliant.</li>
<li>ABI compatibility with CPython 3.15 alpha 5 free-threading.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ijl/orjson/commit/ec2b066cae79ae4a90ed126ac5723335dd99e408"><code>ec2b066</code></a>
3.11.7</li>
<li><a
href="https://github.com/ijl/orjson/commit/1ca01f78cf4198ec37407d83713afa6e5c53dbf9"><code>1ca01f7</code></a>
zmij</li>
<li><a
href="https://github.com/ijl/orjson/commit/1716a226bd1f38db01503f30cd37b0efec48d88e"><code>1716a22</code></a>
cargo update</li>
<li>See full diff in <a
href="https://github.com/ijl/orjson/compare/3.11.6...3.11.7">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=orjson&package-manager=pip&previous-version=3.11.6&new-version=3.11.7)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:45:53 -07:00
dependabot[bot] 671371df0f Bump pytest from 8.4.2 to 9.0.2 (#879)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.4.2 to
9.0.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>9.0.2</h2>
<h1>pytest 9.0.2 (2025-12-06)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13896">#13896</a>:
The terminal progress feature added in pytest 9.0.0 has been disabled by
default, except on Windows, due to compatibility issues with some
terminal emulators.</p>
<p>You may enable it again by passing <code>-p terminalprogress</code>.
We may enable it by default again once compatibility improves in the
future.</p>
<p>Additionally, when the environment variable <code>TERM</code> is
<code>dumb</code>, the escape codes are no longer emitted, even if the
plugin is enabled.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13904">#13904</a>:
Fixed the TOML type of the <code>tmp_path_retention_count</code>
settings in the API reference from number to string.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13946">#13946</a>:
The private <code>config.inicfg</code> attribute was changed in a
breaking manner in pytest 9.0.0.
Due to its usage in the ecosystem, it is now restored to working order
using a compatibility shim.
It will be deprecated in pytest 9.1 and removed in pytest 10.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13965">#13965</a>:
Fixed quadratic-time behavior when handling <code>unittest</code>
subtests in Python 3.10.</p>
</li>
</ul>
<h2>Improved documentation</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/4492">#4492</a>:
The API Reference now contains cross-reference-able documentation of
<code>pytest's command-line flags
&lt;command-line-flags&gt;</code>.</li>
</ul>
<h2>9.0.1</h2>
<h1>pytest 9.0.1 (2025-11-12)</h1>
<h2>Bug fixes</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13895">#13895</a>:
Restore support for skipping tests via <code>raise
unittest.SkipTest</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13896">#13896</a>:
The terminal progress plugin added in pytest 9.0 is now automatically
disabled when iTerm2 is detected, it generated desktop notifications
instead of the desired functionality.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13904">#13904</a>:
Fixed the TOML type of the verbosity settings in the API reference from
number to string.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13910">#13910</a>:
Fixed <!-- raw HTML omitted -->UserWarning: Do not expect
file_or_dir<!-- raw HTML omitted --> on some earlier Python 3.12 and
3.13 point versions.</li>
</ul>
<h2>Packaging updates and notes for downstreams</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13933">#13933</a>:
The tox configuration has been adjusted to make sure the desired
version string can be passed into its <code>package_env</code> through
the <code>SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST</code> environment
variable as a part of the release process -- by
<code>webknjaz</code>.</li>
</ul>
<h2>Contributor-facing changes</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13891">#13891</a>,
<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13942">#13942</a>:
The CI/CD part of the release automation is now capable of
creating GitHub Releases without having a Git checkout on
disk -- by <code>bluetech</code> and <code>webknjaz</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13933">#13933</a>:
The tox configuration has been adjusted to make sure the desired
version string can be passed into its <code>package_env</code> through
the <code>SETUPTOOLS_SCM_PRETEND_VERSION_FOR_PYTEST</code> environment
variable as a part of the release process -- by
<code>webknjaz</code>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/3d10b5148e03eb82b3ee29181dbdc73cf82699e2"><code>3d10b51</code></a>
Prepare release version 9.0.2</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/188750b725add8c3400eee6fbb6b80559c296d69"><code>188750b</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14030">#14030</a>
from pytest-dev/patchback/backports/9.0.x/1e4b01d1f...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/b7d7bef90cb9a6db8ac1d3dd5b9ae0eb9abd6c58"><code>b7d7bef</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14014">#14014</a>
from bluetech/compat-note</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/bd08e85ac76614ff5ca9ae338aee8d8b06c8fae0"><code>bd08e85</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14013">#14013</a>
from pytest-dev/patchback/backports/9.0.x/922b60377...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/bc783862991241c442c9f9c068e51737ec15ea10"><code>bc78386</code></a>
Add CLI options reference documentation (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13930">#13930</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/5a4e398ce89bc23d2cf3fd98c042fdffb6fa8afa"><code>5a4e398</code></a>
Fix docs typo (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14005">#14005</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14008">#14008</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/d7ae6df394398168bf9d926f803c26849c8f07ee"><code>d7ae6df</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/14006">#14006</a>
from pytest-dev/maintenance/update-plugin-list-tmpl...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/556f6a22e12d13d1ffeceaf64424eb95d5e0fb87"><code>556f6a2</code></a>
pre-commit: fix rst-lint after new release (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13999">#13999</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/14001">#14001</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/c60fbe63a26f64a42738e3f3527a8f79024fdf50"><code>c60fbe6</code></a>
Fix quadratic-time behavior when handling <code>unittest</code> subtests
in Python 3.10 ...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/73d9b011183d9a1c4a7007c1119d97a6e627788e"><code>73d9b01</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13995">#13995</a>
from nicoddemus/patchback/backports/9.0.x/1b5200c0f...</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/8.4.2...9.0.2">compare
view</a></li>
</ul>
</details>
<br />

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:45:44 -07:00
dependabot[bot] 42696df0d2 Bump the npm_and_yarn group across 3 directories with 1 update (#883)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[picomatch](https://github.com/micromatch/picomatch).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory: [picomatch](https://github.com/micromatch/picomatch).
Bumps the npm_and_yarn group with 1 update in the
/libs/langserve-playground directory:
[picomatch](https://github.com/micromatch/picomatch).

Updates `picomatch` from 2.3.1 to 2.3.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/releases">picomatch's
releases</a>.</em></p>
<blockquote>
<h2>2.3.2</h2>
<p>This is a security release fixing several security relevant
issues.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: exception when glob pattern contains constructor by <a
href="https://github.com/Jason3S"><code>@​Jason3S</code></a> in <a
href="https://redirect.github.com/micromatch/picomatch/pull/144">micromatch/picomatch#144</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-c2c7-rcm5-vvqj">CVE-2026-33671</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-3v7f-55p6-f55p">CVE-2026-33672</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md">picomatch's
changelog</a>.</em></p>
<blockquote>
<h1>Release history</h1>
<p><strong>All notable changes to this project will be documented in
this file.</strong></p>
<p>The format is based on <a
href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>
and this project adheres to <a
href="http://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
<!-- raw HTML omitted -->
<ul>
<li>Changelogs are for humans, not machines.</li>
<li>There should be an entry for every single version.</li>
<li>The same types of changes should be grouped.</li>
<li>Versions and sections should be linkable.</li>
<li>The latest version comes first.</li>
<li>The release date of each versions is displayed.</li>
<li>Mention whether you follow Semantic Versioning.</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Changelog entries are classified using the following labels <em>(from
<a href="http://keepachangelog.com/">keep-a-changelog</a></em>):</p>
<ul>
<li><code>Added</code> for new features.</li>
<li><code>Changed</code> for changes in existing functionality.</li>
<li><code>Deprecated</code> for soon-to-be removed features.</li>
<li><code>Removed</code> for now removed features.</li>
<li><code>Fixed</code> for any bug fixes.</li>
<li><code>Security</code> in case of vulnerabilities.</li>
</ul>
<!-- raw HTML omitted -->
<h2>4.0.0 (2024-02-07)</h2>
<h3>Fixes</h3>
<ul>
<li>Fix bad text values in parse <a
href="https://redirect.github.com/micromatch/picomatch/issues/126">#126</a>,
thanks to <a
href="https://github.com/connor4312"><code>@​connor4312</code></a></li>
</ul>
<h3>Changed</h3>
<ul>
<li>Remove process global to work outside of node <a
href="https://redirect.github.com/micromatch/picomatch/issues/129">#129</a>,
thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a></li>
<li>Add sideEffects to package.json <a
href="https://redirect.github.com/micromatch/picomatch/issues/128">#128</a>,
thanks to <a
href="https://github.com/frandiox"><code>@​frandiox</code></a></li>
<li>Removed <code>os</code>, make compatible browser environment. See <a
href="https://redirect.github.com/micromatch/picomatch/issues/124">#124</a>,
thanks to <a
href="https://github.com/gwsbhqt"><code>@​gwsbhqt</code></a></li>
</ul>
<h2>3.0.1</h2>
<h3>Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/picomatch/commit/81cba8d4b767cab3cb29d26eb4f691eed75b73b2"><code>81cba8d</code></a>
Publish 2.3.2</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/fc1f6b69006e9435caf8fb40d8aff378bc0b7bce"><code>fc1f6b6</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/eec17aee5428a7249e9ca5adbb8a0d28fa29619b"><code>eec17ae</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/78f8ca4362d9e66cadea97b93e292f10096452ed"><code>78f8ca4</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/156">#156</a>
from micromatch/backport-144</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/3f4f10eaa65bf3a52e8f2999674cd27e11fa3c9b"><code>3f4f10e</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/144">#144</a>
from Jason3S/jdent-object-properties</li>
<li>See full diff in <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `picomatch` from 2.3.1 to 2.3.2
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/releases">picomatch's
releases</a>.</em></p>
<blockquote>
<h2>2.3.2</h2>
<p>This is a security release fixing several security relevant
issues.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: exception when glob pattern contains constructor by <a
href="https://github.com/Jason3S"><code>@​Jason3S</code></a> in <a
href="https://redirect.github.com/micromatch/picomatch/pull/144">micromatch/picomatch#144</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-c2c7-rcm5-vvqj">CVE-2026-33671</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-3v7f-55p6-f55p">CVE-2026-33672</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md">picomatch's
changelog</a>.</em></p>
<blockquote>
<h1>Release history</h1>
<p><strong>All notable changes to this project will be documented in
this file.</strong></p>
<p>The format is based on <a
href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>
and this project adheres to <a
href="http://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
<!-- raw HTML omitted -->
<ul>
<li>Changelogs are for humans, not machines.</li>
<li>There should be an entry for every single version.</li>
<li>The same types of changes should be grouped.</li>
<li>Versions and sections should be linkable.</li>
<li>The latest version comes first.</li>
<li>The release date of each versions is displayed.</li>
<li>Mention whether you follow Semantic Versioning.</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Changelog entries are classified using the following labels <em>(from
<a href="http://keepachangelog.com/">keep-a-changelog</a></em>):</p>
<ul>
<li><code>Added</code> for new features.</li>
<li><code>Changed</code> for changes in existing functionality.</li>
<li><code>Deprecated</code> for soon-to-be removed features.</li>
<li><code>Removed</code> for now removed features.</li>
<li><code>Fixed</code> for any bug fixes.</li>
<li><code>Security</code> in case of vulnerabilities.</li>
</ul>
<!-- raw HTML omitted -->
<h2>4.0.0 (2024-02-07)</h2>
<h3>Fixes</h3>
<ul>
<li>Fix bad text values in parse <a
href="https://redirect.github.com/micromatch/picomatch/issues/126">#126</a>,
thanks to <a
href="https://github.com/connor4312"><code>@​connor4312</code></a></li>
</ul>
<h3>Changed</h3>
<ul>
<li>Remove process global to work outside of node <a
href="https://redirect.github.com/micromatch/picomatch/issues/129">#129</a>,
thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a></li>
<li>Add sideEffects to package.json <a
href="https://redirect.github.com/micromatch/picomatch/issues/128">#128</a>,
thanks to <a
href="https://github.com/frandiox"><code>@​frandiox</code></a></li>
<li>Removed <code>os</code>, make compatible browser environment. See <a
href="https://redirect.github.com/micromatch/picomatch/issues/124">#124</a>,
thanks to <a
href="https://github.com/gwsbhqt"><code>@​gwsbhqt</code></a></li>
</ul>
<h2>3.0.1</h2>
<h3>Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/picomatch/commit/81cba8d4b767cab3cb29d26eb4f691eed75b73b2"><code>81cba8d</code></a>
Publish 2.3.2</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/fc1f6b69006e9435caf8fb40d8aff378bc0b7bce"><code>fc1f6b6</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/eec17aee5428a7249e9ca5adbb8a0d28fa29619b"><code>eec17ae</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/78f8ca4362d9e66cadea97b93e292f10096452ed"><code>78f8ca4</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/156">#156</a>
from micromatch/backport-144</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/3f4f10eaa65bf3a52e8f2999674cd27e11fa3c9b"><code>3f4f10e</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/144">#144</a>
from Jason3S/jdent-object-properties</li>
<li>See full diff in <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `picomatch` from 4.0.3 to 4.0.4
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/releases">picomatch's
releases</a>.</em></p>
<blockquote>
<h2>2.3.2</h2>
<p>This is a security release fixing several security relevant
issues.</p>
<h2>What's Changed</h2>
<ul>
<li>fix: exception when glob pattern contains constructor by <a
href="https://github.com/Jason3S"><code>@​Jason3S</code></a> in <a
href="https://redirect.github.com/micromatch/picomatch/pull/144">micromatch/picomatch#144</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-c2c7-rcm5-vvqj">CVE-2026-33671</a></li>
<li>Fix for <a
href="https://github.com/micromatch/picomatch/security/advisories/GHSA-3v7f-55p6-f55p">CVE-2026-33672</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md">picomatch's
changelog</a>.</em></p>
<blockquote>
<h1>Release history</h1>
<p><strong>All notable changes to this project will be documented in
this file.</strong></p>
<p>The format is based on <a
href="http://keepachangelog.com/en/1.0.0/">Keep a Changelog</a>
and this project adheres to <a
href="http://semver.org/spec/v2.0.0.html">Semantic Versioning</a>.</p>
<!-- raw HTML omitted -->
<ul>
<li>Changelogs are for humans, not machines.</li>
<li>There should be an entry for every single version.</li>
<li>The same types of changes should be grouped.</li>
<li>Versions and sections should be linkable.</li>
<li>The latest version comes first.</li>
<li>The release date of each versions is displayed.</li>
<li>Mention whether you follow Semantic Versioning.</li>
</ul>
<!-- raw HTML omitted -->
<!-- raw HTML omitted -->
<p>Changelog entries are classified using the following labels <em>(from
<a href="http://keepachangelog.com/">keep-a-changelog</a></em>):</p>
<ul>
<li><code>Added</code> for new features.</li>
<li><code>Changed</code> for changes in existing functionality.</li>
<li><code>Deprecated</code> for soon-to-be removed features.</li>
<li><code>Removed</code> for now removed features.</li>
<li><code>Fixed</code> for any bug fixes.</li>
<li><code>Security</code> in case of vulnerabilities.</li>
</ul>
<!-- raw HTML omitted -->
<h2>4.0.0 (2024-02-07)</h2>
<h3>Fixes</h3>
<ul>
<li>Fix bad text values in parse <a
href="https://redirect.github.com/micromatch/picomatch/issues/126">#126</a>,
thanks to <a
href="https://github.com/connor4312"><code>@​connor4312</code></a></li>
</ul>
<h3>Changed</h3>
<ul>
<li>Remove process global to work outside of node <a
href="https://redirect.github.com/micromatch/picomatch/issues/129">#129</a>,
thanks to <a
href="https://github.com/styfle"><code>@​styfle</code></a></li>
<li>Add sideEffects to package.json <a
href="https://redirect.github.com/micromatch/picomatch/issues/128">#128</a>,
thanks to <a
href="https://github.com/frandiox"><code>@​frandiox</code></a></li>
<li>Removed <code>os</code>, make compatible browser environment. See <a
href="https://redirect.github.com/micromatch/picomatch/issues/124">#124</a>,
thanks to <a
href="https://github.com/gwsbhqt"><code>@​gwsbhqt</code></a></li>
</ul>
<h2>3.0.1</h2>
<h3>Fixes</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/picomatch/commit/81cba8d4b767cab3cb29d26eb4f691eed75b73b2"><code>81cba8d</code></a>
Publish 2.3.2</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/fc1f6b69006e9435caf8fb40d8aff378bc0b7bce"><code>fc1f6b6</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/eec17aee5428a7249e9ca5adbb8a0d28fa29619b"><code>eec17ae</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/78f8ca4362d9e66cadea97b93e292f10096452ed"><code>78f8ca4</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/156">#156</a>
from micromatch/backport-144</li>
<li><a
href="https://github.com/micromatch/picomatch/commit/3f4f10eaa65bf3a52e8f2999674cd27e11fa3c9b"><code>3f4f10e</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/picomatch/issues/144">#144</a>
from Jason3S/jdent-object-properties</li>
<li>See full diff in <a
href="https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:42:13 -07:00
dependabot[bot] 57503807b7 Bump requests from 2.32.5 to 2.33.0 in the pip group across 1 directory (#882)
Bumps the pip group with 1 update in the / directory:
[requests](https://github.com/psf/requests).

Updates `requests` from 2.32.5 to 2.33.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/releases">requests's
releases</a>.</em></p>
<blockquote>
<h2>v2.33.0</h2>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base
that uses Requests, please take a look at <a
href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>.
Give it a try, and report any gaps or feedback you may have in the
issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now
extracts contents to a non-deterministic location to prevent malicious
file replacement. This does not affect default usage of Requests, only
applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a
href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause malformed
authentication to be applied to Requests on Python 3.11+. (<a
href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a
href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/M0d3v1"><code>@​M0d3v1</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6865">psf/requests#6865</a></li>
<li><a href="https://github.com/aminvakil"><code>@​aminvakil</code></a>
made their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7220">psf/requests#7220</a></li>
<li><a href="https://github.com/E8Price"><code>@​E8Price</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6960">psf/requests#6960</a></li>
<li><a href="https://github.com/mitre88"><code>@​mitre88</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7244">psf/requests#7244</a></li>
<li><a href="https://github.com/magsen"><code>@​magsen</code></a> made
their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/6553">psf/requests#6553</a></li>
<li><a
href="https://github.com/Rohan5commit"><code>@​Rohan5commit</code></a>
made their first contribution in <a
href="https://redirect.github.com/psf/requests/pull/7227">psf/requests#7227</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25">https://github.com/psf/requests/blob/main/HISTORY.md#2330-2026-03-25</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/psf/requests/blob/main/HISTORY.md">requests's
changelog</a>.</em></p>
<blockquote>
<h2>2.33.0 (2026-03-25)</h2>
<p><strong>Announcements</strong></p>
<ul>
<li>📣 Requests is adding inline types. If you have a typed code base
that
uses Requests, please take a look at <a
href="https://redirect.github.com/psf/requests/issues/7271">#7271</a>.
Give it a try, and report
any gaps or feedback you may have in the issue. 📣</li>
</ul>
<p><strong>Security</strong></p>
<ul>
<li>CVE-2026-25645 <code>requests.utils.extract_zipped_paths</code> now
extracts
contents to a non-deterministic location to prevent malicious file
replacement. This does not affect default usage of Requests, only
applications calling the utility function directly.</li>
</ul>
<p><strong>Improvements</strong></p>
<ul>
<li>Migrated to a PEP 517 build system using setuptools. (<a
href="https://redirect.github.com/psf/requests/issues/7012">#7012</a>)</li>
</ul>
<p><strong>Bugfixes</strong></p>
<ul>
<li>Fixed an issue where an empty netrc entry could cause
malformed authentication to be applied to Requests on
Python 3.11+. (<a
href="https://redirect.github.com/psf/requests/issues/7205">#7205</a>)</li>
</ul>
<p><strong>Deprecations</strong></p>
<ul>
<li>Dropped support for Python 3.9 following its end of support. (<a
href="https://redirect.github.com/psf/requests/issues/7196">#7196</a>)</li>
</ul>
<p><strong>Documentation</strong></p>
<ul>
<li>Various typo fixes and doc improvements.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/psf/requests/commit/bc04dfd6dad4cb02cd92f5daa81eb562d280a761"><code>bc04dfd</code></a>
v2.33.0</li>
<li><a
href="https://github.com/psf/requests/commit/66d21cb07bd6255b1280291c4fafb71803cdb3b7"><code>66d21cb</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/psf/requests/commit/8b9bc8fc0f63be84602387913c4b689f19efd028"><code>8b9bc8f</code></a>
Move badges to top of README (<a
href="https://redirect.github.com/psf/requests/issues/7293">#7293</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/e331a288f369973f5de0ec8901c94cae4fa87286"><code>e331a28</code></a>
Remove unused extraction call (<a
href="https://redirect.github.com/psf/requests/issues/7292">#7292</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/753fd08c5eacce0aa0df73fe47e49525c67e0a29"><code>753fd08</code></a>
docs: fix FAQ grammar in httplib2 example</li>
<li><a
href="https://github.com/psf/requests/commit/774a0b837a194ee885d4fdd9ca947900cc3daf71"><code>774a0b8</code></a>
docs(socks): same block as other sections</li>
<li><a
href="https://github.com/psf/requests/commit/9c72a41bec8597f948c9d8caa5dc3f12273b3303"><code>9c72a41</code></a>
Bump github/codeql-action from 4.33.0 to 4.34.1</li>
<li><a
href="https://github.com/psf/requests/commit/ebf71906798ec82f34e07d3168f8b8aecaf8a3be"><code>ebf7190</code></a>
Bump github/codeql-action from 4.32.0 to 4.33.0</li>
<li><a
href="https://github.com/psf/requests/commit/0e4ae38f0c93d4f92a96c774bd52c069d12a4798"><code>0e4ae38</code></a>
docs: exclude Response.is_permanent_redirect from API docs (<a
href="https://redirect.github.com/psf/requests/issues/7244">#7244</a>)</li>
<li><a
href="https://github.com/psf/requests/commit/d568f47278492e630cc990a259047c67991d007a"><code>d568f47</code></a>
docs: clarify Quickstart POST example (<a
href="https://redirect.github.com/psf/requests/issues/6960">#6960</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/psf/requests/compare/v2.32.5...v2.33.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=requests&package-manager=pip&previous-version=2.32.5&new-version=2.33.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-30 18:42:03 -07:00
dependabot[bot] b19fa6640a Bump uvicorn from 0.39.0 to 0.42.0 (#878)
Bumps [uvicorn](https://github.com/Kludex/uvicorn) from 0.39.0 to
0.42.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/releases">uvicorn's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.42.0</h2>
<h2>Changed</h2>
<ul>
<li>Use <code>bytearray</code> for request body accumulation to avoid
O(n^2) allocation on fragmented bodies (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2845">#2845</a>)</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Escape brackets and backslash in httptools <code>HEADER_RE</code>
regex (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2824">#2824</a>)</li>
<li>Fix multiple issues in websockets sans-io implementation (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2825">#2825</a>)</li>
</ul>
<hr />
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/bysiber"><code>@​bysiber</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2825">Kludex/uvicorn#2825</a></li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.41.0...0.42.0">https://github.com/Kludex/uvicorn/compare/0.41.0...0.42.0</a></p>
<h2>Version 0.41.0</h2>
<h2>Added</h2>
<ul>
<li>Add <code>--limit-max-requests-jitter</code> to stagger worker
restarts (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2707">#2707</a>)</li>
<li>Add socket path to <code>scope[&quot;server&quot;]</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2561">#2561</a>)</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Rename <code>LifespanOn.error_occured</code> to
<code>error_occurred</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2776">#2776</a>)</li>
</ul>
<h2>Fixed</h2>
<ul>
<li>Ignore permission denied errors in watchfiles reloader (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2817">#2817</a>)</li>
<li>Ensure lifespan shutdown runs when <code>should_exit</code> is set
during startup (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2812">#2812</a>)</li>
<li>Reduce the log level of 'request limit exceeded' messages (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2788">#2788</a>)</li>
</ul>
<hr />
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/t-kawasumi"><code>@​t-kawasumi</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2776">Kludex/uvicorn#2776</a></li>
<li><a href="https://github.com/fardyn"><code>@​fardyn</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2800">Kludex/uvicorn#2800</a></li>
<li><a href="https://github.com/ewie"><code>@​ewie</code></a> made their
first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2807">Kludex/uvicorn#2807</a></li>
<li><a href="https://github.com/shevron"><code>@​shevron</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2788">Kludex/uvicorn#2788</a></li>
<li><a href="https://github.com/jonashaag"><code>@​jonashaag</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2707">Kludex/uvicorn#2707</a></li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.40.0...0.41.0">https://github.com/Kludex/uvicorn/compare/0.40.0...0.41.0</a></p>
<h2>Version 0.40.0</h2>
<h2>What's Changed</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/blob/main/docs/release-notes.md">uvicorn's
changelog</a>.</em></p>
<blockquote>
<h2>0.42.0 (March 16, 2026)</h2>
<h3>Changed</h3>
<ul>
<li>Use <code>bytearray</code> for request body accumulation to avoid
O(n^2) allocation on fragmented bodies (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2845">#2845</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Escape brackets and backslash in httptools <code>HEADER_RE</code>
regex (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2824">#2824</a>)</li>
<li>Fix multiple issues in websockets sans-io implementation (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2825">#2825</a>)</li>
</ul>
<h2>0.41.0 (February 16, 2026)</h2>
<h3>Added</h3>
<ul>
<li>Add <code>--limit-max-requests-jitter</code> to stagger worker
restarts (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2707">#2707</a>)</li>
<li>Add socket path to <code>scope[&quot;server&quot;]</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2561">#2561</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Rename <code>LifespanOn.error_occured</code> to
<code>error_occurred</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2776">#2776</a>)</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Ignore permission denied errors in watchfiles reloader (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2817">#2817</a>)</li>
<li>Ensure lifespan shutdown runs when <code>should_exit</code> is set
during startup (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2812">#2812</a>)</li>
<li>Reduce the log level of 'request limit exceeded' messages (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2788">#2788</a>)</li>
</ul>
<h2>0.40.0 (December 21, 2025)</h2>
<h3>Remove</h3>
<ul>
<li>Drop support for Python 3.9 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2772">#2772</a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Kludex/uvicorn/commit/02bed6f8c38e74f684bb0e572977a9bfdc1f6fea"><code>02bed6f</code></a>
Version 0.42.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2852">#2852</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/d8f25013161d8206e129e39bf48432d3a85e1744"><code>d8f2501</code></a>
chore: pre-create Config objects in benchmarks to measure protocol hot
paths ...</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/9dbb7836bb0fdb446d083ecd8dc5a2a95bb96b98"><code>9dbb783</code></a>
Add WebSocket protocol benchmarks for wsproto and websockets-sansio (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2849">#2849</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/b3c69da8c1a36e1834e614abe38243671e156077"><code>b3c69da</code></a>
Use bytearray for request body accumulation (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2845">#2845</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/3f3ebee20f46504a3f7279dd72f9c24ce9070b11"><code>3f3ebee</code></a>
Disable <code>pytest-xdist</code> for CodSpeed benchmark runs (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2847">#2847</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/d072de754f825bee4710363dd49d41efd5285dcc"><code>d072de7</code></a>
Add fragmented body benchmark for chunked body accumulation (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2846">#2846</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/e300c2c75d71bea6f8d1799ca6f182f1e5583aaa"><code>e300c2c</code></a>
Add CodSpeed benchmark suite for HTTP protocol hot paths (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2844">#2844</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/1fa697651bacf10d72f74de104ead814ce6fcdc0"><code>1fa6976</code></a>
Escape brackets and backslash in httptools HEADER_RE regex (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2824">#2824</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/59ec1de7a4f07afbd139812f033f3af8b784de74"><code>59ec1de</code></a>
Fix multiple issues in websockets sansio implementation (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2825">#2825</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/2fc0efcdd958abd3adbe6ea19682408d6b2e1b18"><code>2fc0efc</code></a>
Clarify Windows asyncio event loop selection in docs (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2843">#2843</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Kludex/uvicorn/compare/0.39.0...0.42.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uvicorn&package-manager=pip&previous-version=0.39.0&new-version=0.42.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 10:49:56 -07:00
dependabot[bot] c4d5b8ad2a Bump the npm_and_yarn group across 2 directories with 1 update (#877)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[flatted](https://github.com/WebReflection/flatted).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory: [flatted](https://github.com/WebReflection/flatted).

Updates `flatted` from 3.4.1 to 3.4.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/WebReflection/flatted/commit/3bf09091c3562e17a0647bc06710dd6097079cf7"><code>3bf0909</code></a>
3.4.2</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/885ddcc33cf9657caf38c57c7be45ae1c5272802"><code>885ddcc</code></a>
fix CWE-1321</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/0bdba705d130f00892b1b8fcc80cf4cdea0631e3"><code>0bdba70</code></a>
added flatted-view to the benchmark</li>
<li>See full diff in <a
href="https://github.com/WebReflection/flatted/compare/v3.4.1...v3.4.2">compare
view</a></li>
</ul>
</details>
<br />

Updates `flatted` from 3.4.1 to 3.4.2
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/WebReflection/flatted/commit/3bf09091c3562e17a0647bc06710dd6097079cf7"><code>3bf0909</code></a>
3.4.2</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/885ddcc33cf9657caf38c57c7be45ae1c5272802"><code>885ddcc</code></a>
fix CWE-1321</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/0bdba705d130f00892b1b8fcc80cf4cdea0631e3"><code>0bdba70</code></a>
added flatted-view to the benchmark</li>
<li>See full diff in <a
href="https://github.com/WebReflection/flatted/compare/v3.4.1...v3.4.2">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-25 10:49:45 -07:00
dependabot[bot] b3cb77a649 Bump codespell from 2.4.1 to 2.4.2 (#876)
Bumps [codespell](https://github.com/codespell-project/codespell) from
2.4.1 to 2.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/codespell-project/codespell/releases">codespell's
releases</a>.</em></p>
<blockquote>
<h2>v2.4.2</h2>
<!-- raw HTML omitted -->
<h2>Highlights</h2>
<ul>
<li>Fixed compatibility with chardet 7+</li>
</ul>
<h2>What's Changed</h2>
<ul>
<li>Fix and clarify cases in ignore patterns by <a
href="https://github.com/DanielYang59"><code>@​DanielYang59</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3583">codespell-project/codespell#3583</a></li>
<li>codespell-private.yml: Do not codespell digital signature files by
<a href="https://github.com/cclauss"><code>@​cclauss</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3623">codespell-project/codespell#3623</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3634">codespell-project/codespell#3634</a></li>
<li>numbes-&gt;numbers and numbesr-&gt;numbers by <a
href="https://github.com/skshetry"><code>@​skshetry</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3635">codespell-project/codespell#3635</a></li>
<li>Add spelling corrections for disclose and variables. by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3622">codespell-project/codespell#3622</a></li>
<li>Add spelling correction for Vulnererability and variants. by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3625">codespell-project/codespell#3625</a></li>
<li>Remove lets-&gt;let's by <a
href="https://github.com/Piedone"><code>@​Piedone</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3633">codespell-project/codespell#3633</a></li>
<li>Add corrections for &quot;dictate&quot; by <a
href="https://github.com/jdufresne"><code>@​jdufresne</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3636">codespell-project/codespell#3636</a></li>
<li>Add specicification (and pl) typo by <a
href="https://github.com/yarikoptic"><code>@​yarikoptic</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3639">codespell-project/codespell#3639</a></li>
<li>Remove &quot;blueish&quot; correction by <a
href="https://github.com/hadess"><code>@​hadess</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3510">codespell-project/codespell#3510</a></li>
<li>Add &quot;lighting&quot; as an option to fix &quot;lighning&quot; by
<a href="https://github.com/yarikoptic"><code>@​yarikoptic</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3648">codespell-project/codespell#3648</a></li>
<li>Revert adding <code>lien</code> to the rare dictionary by <a
href="https://github.com/nikolaik"><code>@​nikolaik</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3631">codespell-project/codespell#3631</a></li>
<li>&quot;ane&quot; could have been &quot;one&quot; by <a
href="https://github.com/yarikoptic"><code>@​yarikoptic</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3645">codespell-project/codespell#3645</a></li>
<li>Add spelling correction for &quot;priort&quot; by <a
href="https://github.com/cfi-gb"><code>@​cfi-gb</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3647">codespell-project/codespell#3647</a></li>
<li>Remove &quot;fix&quot; of &quot;deques&quot; - it is quite legit by
<a href="https://github.com/yarikoptic"><code>@​yarikoptic</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3649">codespell-project/codespell#3649</a></li>
<li>Several new suggestions by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3621">codespell-project/codespell#3621</a></li>
<li>Add proposal constraints to containts by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3652">codespell-project/codespell#3652</a></li>
<li>Additions dleay,infp,practive,utiliy by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3643">codespell-project/codespell#3643</a></li>
<li>Add calncelled and its variations by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3650">codespell-project/codespell#3650</a></li>
<li>Use raw strings for regex by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3654">codespell-project/codespell#3654</a></li>
<li>Allow multiple spaces before codespell:ignore by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3653">codespell-project/codespell#3653</a></li>
<li>Added correction from <code>timeour</code> to <code>timeout</code>
by <a href="https://github.com/jamesbraza"><code>@​jamesbraza</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3656">codespell-project/codespell#3656</a></li>
<li>Add typos found in various software projects by <a
href="https://github.com/luzpaz"><code>@​luzpaz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3640">codespell-project/codespell#3640</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3659">codespell-project/codespell#3659</a></li>
<li>Add codespell suggestions for enabke and friends by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3657">codespell-project/codespell#3657</a></li>
<li>END: add &quot;queues&quot; (plural from queue) as possible fix for
ques by <a
href="https://github.com/yarikoptic"><code>@​yarikoptic</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3591">codespell-project/codespell#3591</a></li>
<li>agreegate, lesda, realod, colouer by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3665">codespell-project/codespell#3665</a></li>
<li>Update pre-commit version in documentation by <a
href="https://github.com/prchoward"><code>@​prchoward</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3666">codespell-project/codespell#3666</a></li>
<li>MAINT: Rename CI file and run name by <a
href="https://github.com/larsoner"><code>@​larsoner</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3667">codespell-project/codespell#3667</a></li>
<li>preoccuption-&gt;preoccupation; occuption-&gt;occupation by <a
href="https://github.com/TheGiraffe3"><code>@​TheGiraffe3</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3668">codespell-project/codespell#3668</a></li>
<li>Suggestions for: checkto, diminsion, waitfor by <a
href="https://github.com/mdeweerd"><code>@​mdeweerd</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3670">codespell-project/codespell#3670</a></li>
<li>Typos found in sigstore-python by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3664">codespell-project/codespell#3664</a></li>
<li>usgin-&gt;using by <a
href="https://github.com/ydah"><code>@​ydah</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3672">codespell-project/codespell#3672</a></li>
<li>Add typos found in various software projects by <a
href="https://github.com/luzpaz"><code>@​luzpaz</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3669">codespell-project/codespell#3669</a></li>
<li>Add coered -&gt; coerced by <a
href="https://github.com/effigies"><code>@​effigies</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3680">codespell-project/codespell#3680</a></li>
<li>backwward(s)-&gt;backward(s), onwward(s)-&gt;onward(s) by <a
href="https://github.com/cjwatson"><code>@​cjwatson</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3682">codespell-project/codespell#3682</a></li>
<li>[pre-commit.ci] pre-commit autoupdate by <a
href="https://github.com/pre-commit-ci"><code>@​pre-commit-ci</code></a>[bot]
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3685">codespell-project/codespell#3685</a></li>
<li>telemetery-&gt;telemetry by <a
href="https://github.com/august-soderberg"><code>@​august-soderberg</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3686">codespell-project/codespell#3686</a></li>
<li>Add hexedacimal and similar typos by <a
href="https://github.com/Akuli"><code>@​Akuli</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3692">codespell-project/codespell#3692</a></li>
<li>Add rounted-&gt;routed, rounded and friends by <a
href="https://github.com/peternewman"><code>@​peternewman</code></a> in
<a
href="https://redirect.github.com/codespell-project/codespell/pull/3693">codespell-project/codespell#3693</a></li>
<li>Add symmectric and similar typos by <a
href="https://github.com/Akuli"><code>@​Akuli</code></a> in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3694">codespell-project/codespell#3694</a></li>
<li>Fix CI on Windows: pip upgrade pip by <a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
in <a
href="https://redirect.github.com/codespell-project/codespell/pull/3698">codespell-project/codespell#3698</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/codespell-project/codespell/commit/2ccb47ff45ad361a21071a7eedda4c37e6ae8c5a"><code>2ccb47f</code></a>
Compat with chardet 7 (<a
href="https://redirect.github.com/codespell-project/codespell/issues/3886">#3886</a>)</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/4ec53bf6a3e510c64900d5ee838abd99d49b2910"><code>4ec53bf</code></a>
[pre-commit.ci] pre-commit autoupdate</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/2a4acba3f282f1b5ccb7ad8b57bc991810663a44"><code>2a4acba</code></a>
Bump actions/download-artifact from 7 to 8</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/be17cacc96a5ee3f014e048f5962cfdb7145e096"><code>be17cac</code></a>
Bump actions/upload-artifact from 6 to 7</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/04a071280d56148cab14249ccc8d4181c0066b3c"><code>04a0712</code></a>
Bump ruff (<a
href="https://redirect.github.com/codespell-project/codespell/issues/3879">#3879</a>)</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/583d8796d92eb58e15072db03e5b756be45f638a"><code>583d879</code></a>
avoide-&gt;avoid, avoided, avoids,</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/1f59f34d7c6d1642fdb325d9dfa49cf9eb5f692a"><code>1f59f34</code></a>
Add correction for 'foudation' to 'foundation'</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/e047fdafb8620b08a86349014487886bcd9c2205"><code>e047fda</code></a>
Add spelling correction for gather and variants.</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/b5cd66de14b8f65b0f45fabbe1c89bd69ea60939"><code>b5cd66d</code></a>
respondant-&gt;respondent</li>
<li><a
href="https://github.com/codespell-project/codespell/commit/92125a3814fa6e86cd2055385916ce5186d3e5df"><code>92125a3</code></a>
Add detection of ivoice and variants.</li>
<li>Additional commits viewable in <a
href="https://github.com/codespell-project/codespell/compare/v2.4.1...v2.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=codespell&package-manager=pip&previous-version=2.4.1&new-version=2.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 13:02:31 -07:00
dependabot[bot] 58a7c24429 Bump ruff from 0.15.0 to 0.15.6 (#872)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.15.0 to 0.15.6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.15.6</h2>
<h2>Release Notes</h2>
<p>Released on 2026-03-12.</p>
<h3>Preview features</h3>
<ul>
<li>Add support for <code>lazy</code> import parsing (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23755">#23755</a>)</li>
<li>Add support for star-unpacking of comprehensions (PEP 798) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23788">#23788</a>)</li>
<li>Reject semantic syntax errors for lazy imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23757">#23757</a>)</li>
<li>Drop a few rules from the preview default set (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23879">#23879</a>)</li>
<li>[<code>airflow</code>] Flag <code>Variable.get()</code> calls
outside of task execution context (<code>AIR003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23584">#23584</a>)</li>
<li>[<code>airflow</code>] Flag runtime-varying values in DAG/task
constructor arguments (<code>AIR304</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23631">#23631</a>)</li>
<li>[<code>flake8-bugbear</code>] Implement
<code>delattr-with-constant</code> (<code>B043</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23737">#23737</a>)</li>
<li>[<code>flake8-tidy-imports</code>] Add <code>TID254</code> to
enforce lazy imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23777">#23777</a>)</li>
<li>[<code>flake8-tidy-imports</code>] Allow users to ban lazy imports
with <code>TID254</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23847">#23847</a>)</li>
<li>[<code>isort</code>] Retain <code>lazy</code> keyword when sorting
imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23762">#23762</a>)</li>
<li>[<code>pyupgrade</code>] Add <code>from __future__ import
annotations</code> automatically (<code>UP006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23260">#23260</a>)</li>
<li>[<code>refurb</code>] Support <code>newline</code> parameter in
<code>FURB101</code> for Python 3.13+ (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23754">#23754</a>)</li>
<li>[<code>ruff</code>] Add <code>os-path-commonprefix</code>
(<code>RUF071</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23814">#23814</a>)</li>
<li>[<code>ruff</code>] Add unsafe fix for os-path-commonprefix
(<code>RUF071</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23852">#23852</a>)</li>
<li>[<code>ruff</code>] Limit <code>RUF036</code> to typing contexts;
make it unsafe for non-typing-only (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23765">#23765</a>)</li>
<li>[<code>ruff</code>] Use starred unpacking for <code>RUF017</code> in
Python 3.15+ (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23789">#23789</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Fix <code>--add-noqa</code> creating unwanted leading whitespace (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23773">#23773</a>)</li>
<li>Fix <code>--add-noqa</code> breaking shebangs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23577">#23577</a>)</li>
<li>[formatter] Fix lambda body formatting for multiline calls and
subscripts (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23866">#23866</a>)</li>
<li>[formatter] Preserve required annotation parentheses in annotated
assignments (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23865">#23865</a>)</li>
<li>[formatter] Preserve type-expression parentheses in the formatter
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/23867">#23867</a>)</li>
<li>[<code>flake8-annotations</code>] Fix stack overflow in
<code>ANN401</code> on quoted annotations with escape sequences (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23912">#23912</a>)</li>
<li>[<code>pep8-naming</code>] Check naming conventions in
<code>match</code> pattern bindings (<code>N806</code>,
<code>N815</code>, <code>N816</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23899">#23899</a>)</li>
<li>[<code>perflint</code>] Fix comment duplication in fixes
(<code>PERF401</code>, <code>PERF403</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23729">#23729</a>)</li>
<li>[<code>pyupgrade</code>] Properly trigger <code>super</code> change
in nested class (<code>UP008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/22677">#22677</a>)</li>
<li>[<code>ruff</code>] Avoid syntax errors in <code>RUF036</code> fixes
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/23764">#23764</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Flag <code>S501</code> with
<code>requests.request</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23873">#23873</a>)</li>
<li>[<code>flake8-executable</code>] Fix WSL detection in non-Docker
containers (<a
href="https://redirect.github.com/astral-sh/ruff/pull/22879">#22879</a>)</li>
<li>[<code>flake8-print</code>] Ignore <code>pprint</code> calls with
<code>stream=</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23787">#23787</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Update docs for Markdown code block formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23871">#23871</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix misleading description for
<code>B904</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23731">#23731</a>)</li>
</ul>
<h3>Contributors</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.6</h2>
<p>Released on 2026-03-12.</p>
<h3>Preview features</h3>
<ul>
<li>Add support for <code>lazy</code> import parsing (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23755">#23755</a>)</li>
<li>Add support for star-unpacking of comprehensions (PEP 798) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23788">#23788</a>)</li>
<li>Reject semantic syntax errors for lazy imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23757">#23757</a>)</li>
<li>Drop a few rules from the preview default set (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23879">#23879</a>)</li>
<li>[<code>airflow</code>] Flag <code>Variable.get()</code> calls
outside of task execution context (<code>AIR003</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23584">#23584</a>)</li>
<li>[<code>airflow</code>] Flag runtime-varying values in DAG/task
constructor arguments (<code>AIR304</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23631">#23631</a>)</li>
<li>[<code>flake8-bugbear</code>] Implement
<code>delattr-with-constant</code> (<code>B043</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23737">#23737</a>)</li>
<li>[<code>flake8-tidy-imports</code>] Add <code>TID254</code> to
enforce lazy imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23777">#23777</a>)</li>
<li>[<code>flake8-tidy-imports</code>] Allow users to ban lazy imports
with <code>TID254</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23847">#23847</a>)</li>
<li>[<code>isort</code>] Retain <code>lazy</code> keyword when sorting
imports (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23762">#23762</a>)</li>
<li>[<code>pyupgrade</code>] Add <code>from __future__ import
annotations</code> automatically (<code>UP006</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23260">#23260</a>)</li>
<li>[<code>refurb</code>] Support <code>newline</code> parameter in
<code>FURB101</code> for Python 3.13+ (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23754">#23754</a>)</li>
<li>[<code>ruff</code>] Add <code>os-path-commonprefix</code>
(<code>RUF071</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23814">#23814</a>)</li>
<li>[<code>ruff</code>] Add unsafe fix for os-path-commonprefix
(<code>RUF071</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23852">#23852</a>)</li>
<li>[<code>ruff</code>] Limit <code>RUF036</code> to typing contexts;
make it unsafe for non-typing-only (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23765">#23765</a>)</li>
<li>[<code>ruff</code>] Use starred unpacking for <code>RUF017</code> in
Python 3.15+ (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23789">#23789</a>)</li>
</ul>
<h3>Bug fixes</h3>
<ul>
<li>Fix <code>--add-noqa</code> creating unwanted leading whitespace (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23773">#23773</a>)</li>
<li>Fix <code>--add-noqa</code> breaking shebangs (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23577">#23577</a>)</li>
<li>[formatter] Fix lambda body formatting for multiline calls and
subscripts (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23866">#23866</a>)</li>
<li>[formatter] Preserve required annotation parentheses in annotated
assignments (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23865">#23865</a>)</li>
<li>[formatter] Preserve type-expression parentheses in the formatter
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/23867">#23867</a>)</li>
<li>[<code>flake8-annotations</code>] Fix stack overflow in
<code>ANN401</code> on quoted annotations with escape sequences (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23912">#23912</a>)</li>
<li>[<code>pep8-naming</code>] Check naming conventions in
<code>match</code> pattern bindings (<code>N806</code>,
<code>N815</code>, <code>N816</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23899">#23899</a>)</li>
<li>[<code>perflint</code>] Fix comment duplication in fixes
(<code>PERF401</code>, <code>PERF403</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23729">#23729</a>)</li>
<li>[<code>pyupgrade</code>] Properly trigger <code>super</code> change
in nested class (<code>UP008</code>) (<a
href="https://redirect.github.com/astral-sh/ruff/pull/22677">#22677</a>)</li>
<li>[<code>ruff</code>] Avoid syntax errors in <code>RUF036</code> fixes
(<a
href="https://redirect.github.com/astral-sh/ruff/pull/23764">#23764</a>)</li>
</ul>
<h3>Rule changes</h3>
<ul>
<li>[<code>flake8-bandit</code>] Flag <code>S501</code> with
<code>requests.request</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23873">#23873</a>)</li>
<li>[<code>flake8-executable</code>] Fix WSL detection in non-Docker
containers (<a
href="https://redirect.github.com/astral-sh/ruff/pull/22879">#22879</a>)</li>
<li>[<code>flake8-print</code>] Ignore <code>pprint</code> calls with
<code>stream=</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23787">#23787</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li>Update docs for Markdown code block formatting (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23871">#23871</a>)</li>
<li>[<code>flake8-bugbear</code>] Fix misleading description for
<code>B904</code> (<a
href="https://redirect.github.com/astral-sh/ruff/pull/23731">#23731</a>)</li>
</ul>
<h3>Contributors</h3>
<ul>
<li><a href="https://github.com/zsol"><code>@​zsol</code></a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/e4c7f357777a2fdd34dbe6a98b1b7d3e7488f675"><code>e4c7f35</code></a>
Bump 0.15.6 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23919">#23919</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/edfe6c17a493669227da45ce7edc786208d9d0b0"><code>edfe6c1</code></a>
[ty] Narrow type context during collection literal inference (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23844">#23844</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/dd16d689abd9d0fa1caf4316e70479fd422b6142"><code>dd16d68</code></a>
Exclude broken symlink in ecosystem check (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23921">#23921</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/3f94c6ac6397cdc3160459d9d6e3892e3f3242dd"><code>3f94c6a</code></a>
Fix stack overflow in ANN401 on quoted annotations with escape sequences
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/23">#23</a>...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/91fc7bd3f936974d7107ba8fd0668bc251a55c58"><code>91fc7bd</code></a>
[ty] Fix false-positive diagnostics for PEP-604 union annotations on
attribut...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/04229cffb44dfe8c64a0879eb3cea472a08d1565"><code>04229cf</code></a>
[ty] Initial test suite for PEP-728 <code>TypedDict</code> features (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23832">#23832</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/728b9d6fd300d492fc2572bcfade170141296f97"><code>728b9d6</code></a>
[<code>pep8-naming</code>] Check naming conventions in
<code>match</code> pattern bindings (<code>N806</code>,...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/88d1eecd261679fc9d1d10f30d814230a7f28513"><code>88d1eec</code></a>
[ty] Ensure a <code>type[]</code> type <code>T</code> is always
considered assignable to a union th...</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/37cdd61406ad4965847c9baa7c3f6ca633887d68"><code>37cdd61</code></a>
Fix lambda body formatting for multiline calls and subscripts (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23866">#23866</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/a25a4df54aca67d23b4867ddad634fe0768fd6a2"><code>a25a4df</code></a>
[ty] Disambiguate duplicate-looking overloaded callables in union
display (<a
href="https://redirect.github.com/astral-sh/ruff/issues/2">#2</a>...</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/0.15.0...0.15.6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.15.0&new-version=0.15.6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 11:19:26 -07:00
dependabot[bot] c01d65ba3c Bump fastapi from 0.128.4 to 0.135.1 (#867)
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.128.4 to
0.135.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastapi/fastapi/releases">fastapi's
releases</a>.</em></p>
<blockquote>
<h2>0.135.1</h2>
<h3>Fixes</h3>
<ul>
<li>🐛 Fix, avoid yield from a TaskGroup, only as an async context
manager, closed in the request async exit stack. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15038">#15038</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Docs</h3>
<ul>
<li>✏️ Fix typo in <code>docs/en/docs/_llm-test.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15007">#15007</a>
by <a
href="https://github.com/adityagiri3600"><code>@​adityagiri3600</code></a>.</li>
<li>📝 Update Skill, optimize context, trim and refactor into references.
PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15031">#15031</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>👥 Update FastAPI People - Experts. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15037">#15037</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>👥 Update FastAPI People - Contributors and Translators. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15029">#15029</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>👥 Update FastAPI GitHub topic repositories. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15036">#15036</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h2>0.135.0</h2>
<h3>Features</h3>
<ul>
<li> Add support for Server Sent Events. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15030">#15030</a>
by <a href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.
<ul>
<li>New docs: <a
href="https://fastapi.tiangolo.com/tutorial/server-sent-events/">Server-Sent
Events (SSE)</a>.</li>
</ul>
</li>
</ul>
<h2>0.134.0</h2>
<h3>Features</h3>
<ul>
<li> Add support for streaming JSON Lines and binary data with
<code>yield</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15022">#15022</a>
by <a href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.
<ul>
<li>This also upgrades Starlette from <code>&gt;=0.40.0</code> to
<code>&gt;=0.46.0</code>, as it's needed to properly unrwap and re-raise
exceptions from exception groups.</li>
<li>New docs: <a
href="https://fastapi.tiangolo.com/tutorial/stream-json-lines/">Stream
JSON Lines</a>.</li>
<li>And new docs: <a
href="https://fastapi.tiangolo.com/advanced/stream-data/">Stream
Data</a>.</li>
</ul>
</li>
</ul>
<h3>Docs</h3>
<ul>
<li>📝 Update Library Agent Skill with streaming responses. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15024">#15024</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Update docs for responses and new stream with <code>yield</code>.
PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/15023">#15023</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Add <code>await</code> in <code>StreamingResponse</code> code
example to allow cancellation. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14681">#14681</a>
by <a
href="https://github.com/casperdcl"><code>@​casperdcl</code></a>.</li>
<li>📝 Rename <code>docs_src/websockets</code> to
<code>docs_src/websockets_</code> to avoid import errors. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14979">#14979</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>🔨 Run tests with <code>pytest-xdist</code> and
<code>pytest-cov</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14992">#14992</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<h2>0.133.1</h2>
<h3>Features</h3>
<ul>
<li>🔧 Add FastAPI Agent Skill. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14982">#14982</a>
by <a href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.
<ul>
<li>Read more about it in <a
href="https://tiangolo.com/ideas/library-agent-skills/">Library Agent
Skills</a>.</li>
</ul>
</li>
</ul>
<h3>Internal</h3>
<ul>
<li> Fix all tests are skipped on Windows. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14994">#14994</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fastapi/fastapi/commit/ca5f60ee72f35fb2134d8b5d26bbb75965bcff66"><code>ca5f60e</code></a>
🔖 Release version 0.135.1</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/87f75aa62c1dde90f4dfbfa7fc2c33127d757d34"><code>87f75aa</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/8a9258b169dce3e321f614c14b1877c18750d6c7"><code>8a9258b</code></a>
🐛 Fix, avoid yield from a TaskGroup, only as an async context manager,
closed...</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/60385078233e00f9f13307ff038f12f88fc5c240"><code>6038507</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/c796ba4f46a6e81477ce44eabe13fd01d82f2c4a"><code>c796ba4</code></a>
👥 Update FastAPI People - Experts (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15037">#15037</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/b24aa03b888b78dd2ec6540d47c84a8676d6a7cb"><code>b24aa03</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/2c6104752a97273976c8a63e897de98a48f19ce0"><code>2c61047</code></a>
✏️ Fix typo in <code>docs/en/docs/_llm-test.md</code> (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15007">#15007</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/e3bbeef8a2687fdf34d4de2d304a59135a30e63c"><code>e3bbeef</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/d726c8cb2b8e00279487fa8661a5276d2ff2125f"><code>d726c8c</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/cf514e6d3839ca69ca45a55a6f862e74892339b9"><code>cf514e6</code></a>
👥 Update FastAPI People - Contributors and Translators (<a
href="https://redirect.github.com/fastapi/fastapi/issues/15029">#15029</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/fastapi/fastapi/compare/0.128.4...0.135.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=fastapi&package-manager=pip&previous-version=0.128.4&new-version=0.135.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-20 10:11:29 -07:00
dependabot[bot] 09fd6de4aa Bump the npm_and_yarn group across 2 directories with 1 update (#874)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[flatted](https://github.com/WebReflection/flatted).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory: [flatted](https://github.com/WebReflection/flatted).

Updates `flatted` from 3.2.9 to 3.4.1
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/WebReflection/flatted/commit/2a02dce7c641dec31194c67663f9b0b12e62da20"><code>2a02dce</code></a>
3.4.1</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/fba4e8f2e113665da275b19cd0f695f3d98e9416"><code>fba4e8f</code></a>
Merge pull request <a
href="https://redirect.github.com/WebReflection/flatted/issues/89">#89</a>
from WebReflection/python-fix</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/5fe86485e6df7f7f34a07a2a85498bd3e17384e7"><code>5fe8648</code></a>
added &quot;when in Rome&quot; also a test for PHP</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/53517adbefe724fe472b2f9ebcdb01910d0ae3f0"><code>53517ad</code></a>
some minor improvement</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/b3e2a0c387bf446435fec45ad7f05299f012346f"><code>b3e2a0c</code></a>
Fixing recursion issue in Python too</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/c4b46dbcbf782326e54ea1b65d3ebb1dc7a23fad"><code>c4b46db</code></a>
Add SECURITY.md for security policy and reporting</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/f86d071e0f70de5a7d8200198824a3f07fc9c988"><code>f86d071</code></a>
Create dependabot.yml for version updates</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/d3418c718160eae69dbc0405dce75f7849019e1e"><code>d3418c7</code></a>
3.4.0</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/7eb65d857e1a40de11c47461cdbc8541449f0606"><code>7eb65d8</code></a>
Merge pull request <a
href="https://redirect.github.com/WebReflection/flatted/issues/88">#88</a>
from WebReflection/avoid-recusrion</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/7774aae45d3775c842abe9d071fd009171a5fc0c"><code>7774aae</code></a>
Avoid recursion on parse due possible shenanigans</li>
<li>Additional commits viewable in <a
href="https://github.com/WebReflection/flatted/compare/v3.2.9...v3.4.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `flatted` from 3.2.9 to 3.4.1
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/WebReflection/flatted/commit/2a02dce7c641dec31194c67663f9b0b12e62da20"><code>2a02dce</code></a>
3.4.1</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/fba4e8f2e113665da275b19cd0f695f3d98e9416"><code>fba4e8f</code></a>
Merge pull request <a
href="https://redirect.github.com/WebReflection/flatted/issues/89">#89</a>
from WebReflection/python-fix</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/5fe86485e6df7f7f34a07a2a85498bd3e17384e7"><code>5fe8648</code></a>
added &quot;when in Rome&quot; also a test for PHP</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/53517adbefe724fe472b2f9ebcdb01910d0ae3f0"><code>53517ad</code></a>
some minor improvement</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/b3e2a0c387bf446435fec45ad7f05299f012346f"><code>b3e2a0c</code></a>
Fixing recursion issue in Python too</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/c4b46dbcbf782326e54ea1b65d3ebb1dc7a23fad"><code>c4b46db</code></a>
Add SECURITY.md for security policy and reporting</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/f86d071e0f70de5a7d8200198824a3f07fc9c988"><code>f86d071</code></a>
Create dependabot.yml for version updates</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/d3418c718160eae69dbc0405dce75f7849019e1e"><code>d3418c7</code></a>
3.4.0</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/7eb65d857e1a40de11c47461cdbc8541449f0606"><code>7eb65d8</code></a>
Merge pull request <a
href="https://redirect.github.com/WebReflection/flatted/issues/88">#88</a>
from WebReflection/avoid-recusrion</li>
<li><a
href="https://github.com/WebReflection/flatted/commit/7774aae45d3775c842abe9d071fd009171a5fc0c"><code>7774aae</code></a>
Avoid recursion on parse due possible shenanigans</li>
<li>Additional commits viewable in <a
href="https://github.com/WebReflection/flatted/compare/v3.2.9...v3.4.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 10:14:47 -07:00
dependabot[bot] 81bffe199f Bump langchain-core from 1.2.16 to 1.2.19 (#873)
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from
1.2.16 to 1.2.19.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==1.2.19</h2>
<p>Changes since langchain-core==1.2.18</p>
<p>release(core): 1.2.19 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35832">#35832</a>)
chore(core): move BaseCrossEncoder to langchain-core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35809">#35809</a>)
chore: bump tornado from 6.5.2 to 6.5.5 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35775">#35775</a>)</p>
<h2>langchain-core==1.2.18</h2>
<p>Changes since langchain-core==1.2.17</p>
<p>release(core): 1.2.18 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35704">#35704</a>)
fix(core): fix double backticks in deprecation docstring for
alternative_import (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35658">#35658</a>)
fix(core): preserve default_factory when generating tool call schema (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35550">#35550</a>)
feat(openai): support tool search (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35582">#35582</a>)
chore: bump the minor-and-patch group across 3 directories with 7
updates (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35605">#35605</a>)</p>
<h2>langchain-core==1.2.17</h2>
<p>Changes since langchain-core==1.2.16</p>
<p>release(core): 1.2.17 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35527">#35527</a>)
fix(core): extract usage metadata from serialized tracer message outputs
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35526">#35526</a>)
chore: bump the langchain-deps group across 3 directories with 7 updates
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35513">#35513</a>)
chore: bump the langchain-deps group across 3 directories with 14
updates (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35441">#35441</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/41cca203e633d8506b563f263b005cb52909300d"><code>41cca20</code></a>
release(core): 1.2.19 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35832">#35832</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/307cdcac9e4e3d7cdcc86eeb3a4688b486f8e1d8"><code>307cdca</code></a>
chore(core): move BaseCrossEncoder to langchain-core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35809">#35809</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/cee6430b1cd2530cdebcdb8820ed4ebf700556a4"><code>cee6430</code></a>
refactor(xai): remove redundant <code>lc_attributes</code> override (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35791">#35791</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/6b9b4c6546332346b787f337b92879fc9b6b530c"><code>6b9b4c6</code></a>
feat(xai): support <code>base_url</code> alias and
<code>XAI_API_BASE</code> env var (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35790">#35790</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/b676167707b9c8e27feef7e58a11edb0fe011703"><code>b676167</code></a>
fix(deepseek): accept <code>base_url</code> as alias for
<code>api_base</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35789">#35789</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/5d9568b5f5a94ef21bee094f38694415e099ed73"><code>5d9568b</code></a>
feat(model-profiles): new fields + <code>Makefile</code> target (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35788">#35788</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/1891d414beceeef8e23a05e9e8f6011ccbf4d8b2"><code>1891d41</code></a>
chore: bump tornado from 6.5.2 to 6.5.5 in /libs/text-splitters (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35774">#35774</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/1d954bccfad779097f63688b324f82fed48f4c5e"><code>1d954bc</code></a>
chore: bump tornado from 6.5.2 to 6.5.5 in /libs/langchain (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35773">#35773</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/261b1d57e40b8470673d923b925aeed58415bc59"><code>261b1d5</code></a>
chore: bump tornado from 6.5.2 to 6.5.5 in /libs/core (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/35775">#35775</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/9521c679db9641912b97297d434adc8d000b5a9c"><code>9521c67</code></a>
fix(openai): close PIL Image handles in token counting to prevent fd
leak (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/3">#3</a>...</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==1.2.16...langchain-core==1.2.19">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=1.2.16&new-version=1.2.19)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 10:11:40 -07:00
dependabot[bot] e2353612f8 Bump the pip group across 1 directory with 2 updates (#871)
Bumps the pip group with 2 updates in the / directory:
[orjson](https://github.com/ijl/orjson) and
[tornado](https://github.com/tornadoweb/tornado).

Updates `orjson` from 3.11.5 to 3.11.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/releases">orjson's
releases</a>.</em></p>
<blockquote>
<h2>3.11.6</h2>
<h3>Changed</h3>
<ul>
<li>orjson now includes code licensed under the Mozilla Public License
2.0 (MPL-2.0).</li>
<li>Drop support for Python 3.9.</li>
<li>ABI compatibility with CPython 3.15 alpha 5.</li>
<li>Build now depends on Rust 1.89 or later instead of 1.85.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix sporadic crash serializing deeply nested <code>list</code> of
<code>dict</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/blob/master/CHANGELOG.md">orjson's
changelog</a>.</em></p>
<blockquote>
<h2>3.11.6 - 2026-01-29</h2>
<h3>Changed</h3>
<ul>
<li>orjson now includes code licensed under the Mozilla Public License
2.0 (MPL-2.0).</li>
<li>Drop support for Python 3.9.</li>
<li>ABI compatibility with CPython 3.15 alpha 5.</li>
<li>Build now depends on Rust 1.89 or later instead of 1.85.</li>
</ul>
<h3>Fixed</h3>
<ul>
<li>Fix sporadic crash serializing deeply nested <code>list</code> of
<code>dict</code>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ijl/orjson/commit/ec02024c3837255064f248c0d2d331319b75e9ad"><code>ec02024</code></a>
3.11.6</li>
<li><a
href="https://github.com/ijl/orjson/commit/d58168733189f82b3fd0c058dff73e05d09202e6"><code>d581687</code></a>
build, clippy misc</li>
<li><a
href="https://github.com/ijl/orjson/commit/4105b29b2275f200f6fae01349bef02ccf1bc2e2"><code>4105b29</code></a>
writer::num</li>
<li><a
href="https://github.com/ijl/orjson/commit/62bb185b70785ded49c79c26f8c9781f1e6fe370"><code>62bb185</code></a>
Fix sporadic crash on serializing object close</li>
<li><a
href="https://github.com/ijl/orjson/commit/d860078a973f44401265c5c4ad12a7dbe4f839ad"><code>d860078</code></a>
PyRef idiom refactors</li>
<li><a
href="https://github.com/ijl/orjson/commit/343ae2f148197918aba9f8562db42c364620e4b8"><code>343ae2f</code></a>
Deserializer, Utf8Buffer</li>
<li><a
href="https://github.com/ijl/orjson/commit/7835f58d1c56947d1cf7a18acdfc07a2bca9b0f2"><code>7835f58</code></a>
PyBytesRef and other input refactor</li>
<li><a
href="https://github.com/ijl/orjson/commit/71e0516424ce1e11613eb1780f18e8cde83989fd"><code>71e0516</code></a>
PyStrRef</li>
<li><a
href="https://github.com/ijl/orjson/commit/1096df42dc585fde837ed0c930a346f5ef7dbb94"><code>1096df4</code></a>
MSRV 1.89</li>
<li><a
href="https://github.com/ijl/orjson/commit/b718e75b8ba18a707c2b44b6de14d52547573771"><code>b718e75</code></a>
Drop support for python3.9</li>
<li>Additional commits viewable in <a
href="https://github.com/ijl/orjson/compare/3.11.5...3.11.6">compare
view</a></li>
</ul>
</details>
<br />

Updates `tornado` from 6.5.2 to 6.5.5
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/tornadoweb/tornado/blob/master/docs/releases.rst">tornado's
changelog</a>.</em></p>
<blockquote>
<h1>Release notes</h1>
<p>.. toctree::
:maxdepth: 2</p>
<p>releases/v6.5.5
releases/v6.5.4
releases/v6.5.3
releases/v6.5.2
releases/v6.5.1
releases/v6.5.0
releases/v6.4.2
releases/v6.4.1
releases/v6.4.0
releases/v6.3.3
releases/v6.3.2
releases/v6.3.1
releases/v6.3.0
releases/v6.2.0
releases/v6.1.0
releases/v6.0.4
releases/v6.0.3
releases/v6.0.2
releases/v6.0.1
releases/v6.0.0
releases/v5.1.1
releases/v5.1.0
releases/v5.0.2
releases/v5.0.1
releases/v5.0.0
releases/v4.5.3
releases/v4.5.2
releases/v4.5.1
releases/v4.5.0
releases/v4.4.3
releases/v4.4.2
releases/v4.4.1
releases/v4.4.0
releases/v4.3.0
releases/v4.2.1
releases/v4.2.0
releases/v4.1.0
releases/v4.0.2
releases/v4.0.1
releases/v4.0.0
releases/v3.2.2
releases/v3.2.1
releases/v3.2.0
releases/v3.1.1</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/tornadoweb/tornado/commit/7d6465056ceb7a054b3f64cf1c18271753b10482"><code>7d64650</code></a>
Merge pull request <a
href="https://redirect.github.com/tornadoweb/tornado/issues/3586">#3586</a>
from bdarnell/update-cibw</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/d05d59b8080a0d5d6a260994c7aad7049209d345"><code>d05d59b</code></a>
build: Bump cibuildwheel to 3.4.0</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/c2f46732b0ad14bf0db4219c96a945f4b60205f5"><code>c2f4673</code></a>
Merge pull request <a
href="https://redirect.github.com/tornadoweb/tornado/issues/3585">#3585</a>
from bdarnell/release-655</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/e5f1aa4b6fa2c16b29024830227838fcb0c79b6f"><code>e5f1aa4</code></a>
Release notes and version bump for v6.5.5</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/78a046f99f89977dfc8ff5a1fe16d298afbeeaca"><code>78a046f</code></a>
httputil: Add CRLF to _FORBIDDEN_HEADER_CHARS_RE</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/24a2d96ea115f663b223887deb0060f13974c104"><code>24a2d96</code></a>
web: Validate characters in all cookie attributes.</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/119a195e290c43ad2d63a2cf012c29d43d6ed839"><code>119a195</code></a>
httputil: Add limits on multipart form data parsing</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/63d4df4eefa6750bb14efa1ebffe67b8c54fbad4"><code>63d4df4</code></a>
Merge pull request <a
href="https://redirect.github.com/tornadoweb/tornado/issues/3564">#3564</a>
from bdarnell/release-654</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/eadbf9adbe9db19e2686a32f48ddf9a25518c4f6"><code>eadbf9a</code></a>
Release notes and version bump for 6.5.4</li>
<li><a
href="https://github.com/tornadoweb/tornado/commit/bbc2b1429c6db80765a8a95c09ddddc7bb40e4e8"><code>bbc2b14</code></a>
Make sure that the in-operator on HTTPHeaders is case insensitive</li>
<li>Additional commits viewable in <a
href="https://github.com/tornadoweb/tornado/compare/v6.5.2...v6.5.5">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-03-16 10:11:27 -07:00
John Kennedy 9001867cc1 Fix all open Dependabot security vulnerabilities (#864)
## Summary

- **rollup** (high): Bump resolution `^3.29.5` → `^3.30.0` to fix
arbitrary file write via path traversal (CVE-2026-27606)
- **ajv** (medium): Add resolution `^8.18.0` to fix ReDoS when using
`$data` option (CVE-2025-69873) — resolves all 4 ajv alerts
- **langchain-core** (low): Upgrade `0.3.83` → `1.2.16` to fix SSRF via
image_url token counting (CVE-2026-26013)
- **langsmith** (medium): Upgrade `0.4.32` → `0.7.9` to fix SSRF via
tracing header injection (CVE-2026-25528)
- **Python 3.9**: Dropped (EOL since Oct 2025) — required to enable
langchain-core 1.x and langsmith 0.6.x+ which have the security fixes

Resolves Dependabot alerts #143, #144, #149, #150, #151, #152, #155,
#156.

## Test plan

- [ ] CI passes on Python 3.10 and 3.11
- [ ] Playground builds still succeed with updated yarn.lock
- [ ] Verify Dependabot alerts auto-close after merge

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 15:21:29 -08:00
dependabot[bot] 81152822bc Bump openai from 0.28.1 to 2.18.0 (#857)
Bumps [openai](https://github.com/openai/openai-python) from 0.28.1 to
2.18.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/releases">openai's
releases</a>.</em></p>
<blockquote>
<h2>v2.18.0</h2>
<h2>2.18.0 (2026-02-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.17.0...v2.18.0">v2.17.0...v2.18.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add context_management to responses (<a
href="https://github.com/openai/openai-python/commit/137e992b80956401d1867274fa7a0969edfdba54">137e992</a>)</li>
<li><strong>api:</strong> responses context_management (<a
href="https://github.com/openai/openai-python/commit/c3bd017318347af0a0105a7e975c8d91e22f7941">c3bd017</a>)</li>
</ul>
<h2>v2.17.0</h2>
<h2>2.17.0 (2026-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.16.0...v2.17.0">v2.16.0...v2.17.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add shell_call_output status field (<a
href="https://github.com/openai/openai-python/commit/1bbaf8865000b338c24c9fdd5e985183feaca10f">1bbaf88</a>)</li>
<li><strong>api:</strong> image generation actions for responses;
ResponseFunctionCallArgumentsDoneEvent.name (<a
href="https://github.com/openai/openai-python/commit/7d965135f93f41b0c3dbf3dc9f01796bd9645b6c">7d96513</a>)</li>
<li><strong>client:</strong> add custom JSON encoder for extended type
support (<a
href="https://github.com/openai/openai-python/commit/9f43c8b1a1641db2336cc6d0ec0c6dc470a89103">9f43c8b</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> undo change to web search Find action (<a
href="https://github.com/openai/openai-python/commit/8f14eb0a74363fdfc648c5cd5c6d34a85b938d3c">8f14eb0</a>)</li>
<li><strong>client:</strong> update type for <code>find_in_page</code>
action (<a
href="https://github.com/openai/openai-python/commit/ec54ddeb357e49edd81cc3fe53d549c297e59a07">ec54dde</a>)</li>
</ul>
<h2>v2.16.0</h2>
<h2>2.16.0 (2026-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.15.0...v2.16.0">v2.15.0...v2.16.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://github.com/openai/openai-python/commit/b97f9f26b9c46ca4519130e60a8bf12ad8d52bf3">b97f9f2</a>)</li>
<li><strong>api:</strong> api updates (<a
href="https://github.com/openai/openai-python/commit/9debcc02370f5b76a6a609ded18fbf8dea87b9cb">9debcc0</a>)</li>
<li><strong>client:</strong> add support for binary request streaming
(<a
href="https://github.com/openai/openai-python/commit/49561d88279628bc400d1b09aa98765b67018ef1">49561d8</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> mark assistants as deprecated (<a
href="https://github.com/openai/openai-python/commit/0419cbcbf1021131c7492321436ed01ca4337835">0419cbc</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>ci:</strong> upgrade <code>actions/github-script</code> (<a
href="https://github.com/openai/openai-python/commit/5139f13ef35e64dadc65f2ba2bab736977985769">5139f13</a>)</li>
<li><strong>internal:</strong> update <code>actions/checkout</code>
version (<a
href="https://github.com/openai/openai-python/commit/f2767144c11833070c0579063ed33918089b4617">f276714</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/openai/openai-python/blob/main/CHANGELOG.md">openai's
changelog</a>.</em></p>
<blockquote>
<h2>2.18.0 (2026-02-09)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.17.0...v2.18.0">v2.17.0...v2.18.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add context_management to responses (<a
href="https://github.com/openai/openai-python/commit/137e992b80956401d1867274fa7a0969edfdba54">137e992</a>)</li>
<li><strong>api:</strong> responses context_management (<a
href="https://github.com/openai/openai-python/commit/c3bd017318347af0a0105a7e975c8d91e22f7941">c3bd017</a>)</li>
</ul>
<h2>2.17.0 (2026-02-05)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.16.0...v2.17.0">v2.16.0...v2.17.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> add shell_call_output status field (<a
href="https://github.com/openai/openai-python/commit/1bbaf8865000b338c24c9fdd5e985183feaca10f">1bbaf88</a>)</li>
<li><strong>api:</strong> image generation actions for responses;
ResponseFunctionCallArgumentsDoneEvent.name (<a
href="https://github.com/openai/openai-python/commit/7d965135f93f41b0c3dbf3dc9f01796bd9645b6c">7d96513</a>)</li>
<li><strong>client:</strong> add custom JSON encoder for extended type
support (<a
href="https://github.com/openai/openai-python/commit/9f43c8b1a1641db2336cc6d0ec0c6dc470a89103">9f43c8b</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>client:</strong> undo change to web search Find action (<a
href="https://github.com/openai/openai-python/commit/8f14eb0a74363fdfc648c5cd5c6d34a85b938d3c">8f14eb0</a>)</li>
<li><strong>client:</strong> update type for <code>find_in_page</code>
action (<a
href="https://github.com/openai/openai-python/commit/ec54ddeb357e49edd81cc3fe53d549c297e59a07">ec54dde</a>)</li>
</ul>
<h2>2.16.0 (2026-01-27)</h2>
<p>Full Changelog: <a
href="https://github.com/openai/openai-python/compare/v2.15.0...v2.16.0">v2.15.0...v2.16.0</a></p>
<h3>Features</h3>
<ul>
<li><strong>api:</strong> api update (<a
href="https://github.com/openai/openai-python/commit/b97f9f26b9c46ca4519130e60a8bf12ad8d52bf3">b97f9f2</a>)</li>
<li><strong>api:</strong> api updates (<a
href="https://github.com/openai/openai-python/commit/9debcc02370f5b76a6a609ded18fbf8dea87b9cb">9debcc0</a>)</li>
<li><strong>client:</strong> add support for binary request streaming
(<a
href="https://github.com/openai/openai-python/commit/49561d88279628bc400d1b09aa98765b67018ef1">49561d8</a>)</li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li><strong>api:</strong> mark assistants as deprecated (<a
href="https://github.com/openai/openai-python/commit/0419cbcbf1021131c7492321436ed01ca4337835">0419cbc</a>)</li>
</ul>
<h3>Chores</h3>
<ul>
<li><strong>ci:</strong> upgrade <code>actions/github-script</code> (<a
href="https://github.com/openai/openai-python/commit/5139f13ef35e64dadc65f2ba2bab736977985769">5139f13</a>)</li>
<li><strong>internal:</strong> update <code>actions/checkout</code>
version (<a
href="https://github.com/openai/openai-python/commit/f2767144c11833070c0579063ed33918089b4617">f276714</a>)</li>
</ul>
<h3>Documentation</h3>
<ul>
<li><strong>examples:</strong> update Azure Realtime sample to use v1
API (<a
href="https://redirect.github.com/openai/openai-python/issues/2829">#2829</a>)
(<a
href="https://github.com/openai/openai-python/commit/3b319819544d629c5b8c206b8b1f6ec6328c6136">3b31981</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/openai/openai-python/commit/a7a60166ad8f686f388719a147f815b053c9e885"><code>a7a6016</code></a>
release: 2.18.0 (<a
href="https://redirect.github.com/openai/openai-python/issues/2846">#2846</a>)</li>
<li><a
href="https://github.com/openai/openai-python/commit/e8888736c86bb1d5a27100867da22b11ab5bb1b7"><code>e888873</code></a>
release: 2.17.0</li>
<li><a
href="https://github.com/openai/openai-python/commit/b982088450a89409ae0eedc1f27f84f383b447af"><code>b982088</code></a>
fix(client): undo change to web search Find action</li>
<li><a
href="https://github.com/openai/openai-python/commit/b95c09d3f1b760378ee4137b83a8e9b87156bedd"><code>b95c09d</code></a>
codegen metadata</li>
<li><a
href="https://github.com/openai/openai-python/commit/31b4218b71025c9183eb8320629af5de74682adc"><code>31b4218</code></a>
codegen metadata</li>
<li><a
href="https://github.com/openai/openai-python/commit/a1fb97bb3580d58a4534a3b4278b5cd4a43ddbc6"><code>a1fb97b</code></a>
fix(client): update type for <code>find_in_page</code> action</li>
<li><a
href="https://github.com/openai/openai-python/commit/42cb178759bd2bac2274f4c7afd3c550e6cf9aa2"><code>42cb178</code></a>
feat(api): image generation actions for responses;
ResponseFunctionCallArgume...</li>
<li><a
href="https://github.com/openai/openai-python/commit/db4d87193089f60d8a2c2841ded3c7fdcd54a5bb"><code>db4d871</code></a>
feat(client): add custom JSON encoder for extended type support</li>
<li><a
href="https://github.com/openai/openai-python/commit/2360dfa7fd26a8f92211702c04752a10fe5fff27"><code>2360dfa</code></a>
codegen metadata</li>
<li><a
href="https://github.com/openai/openai-python/commit/7da396e2601ea1587c8798a9c60d9d3497146380"><code>7da396e</code></a>
codegen metadata</li>
<li>Additional commits viewable in <a
href="https://github.com/openai/openai-python/compare/v0.28.1...v2.18.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=openai&package-manager=pip&previous-version=0.28.1&new-version=2.18.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-27 16:50:44 -08:00
dependabot[bot] fa7f3b828b Bump uvicorn from 0.23.2 to 0.39.0 (#858)
[//]: # (dependabot-start)
⚠️  **Dependabot is rebasing this PR** ⚠️ 

Rebasing might not happen immediately, so don't worry if this takes some
time.

Note: if you make any changes to this PR yourself, they will take
precedence over the rebase.

---

[//]: # (dependabot-end)

Bumps [uvicorn](https://github.com/Kludex/uvicorn) from 0.23.2 to
0.39.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/releases">uvicorn's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.39.0</h2>
<h2>What's Changed</h2>
<ul>
<li>explicitly start ASGI run with empty context by <a
href="https://github.com/pmeier"><code>@​pmeier</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2742">Kludex/uvicorn#2742</a></li>
<li>fix(websockets): Send close frame on ASGI return by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2769">Kludex/uvicorn#2769</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/pmeier"><code>@​pmeier</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2742">Kludex/uvicorn#2742</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.38.0...0.39.0">https://github.com/Kludex/uvicorn/compare/0.38.0...0.39.0</a></p>
<h2>Version 0.38.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Support Python 3.14 by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2723">Kludex/uvicorn#2723</a></li>
</ul>
<hr />
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/NGANAMODEIJunior"><code>@​NGANAMODEIJunior</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2713">Kludex/uvicorn#2713</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.37.0...0.38.0">https://github.com/Kludex/uvicorn/compare/0.37.0...0.38.0</a></p>
<h2>Version 0.37.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add <code>--timeout-worker-healthcheck</code> setting by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2711">Kludex/uvicorn#2711</a></li>
<li>Add <code>os.PathLike[str]</code> type to <code>ssl_ca_certs</code>
by <a href="https://github.com/rnv812"><code>@​rnv812</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2676">Kludex/uvicorn#2676</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/LincolnPuzey"><code>@​LincolnPuzey</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2669">Kludex/uvicorn#2669</a></li>
<li><a href="https://github.com/rnv812"><code>@​rnv812</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2676">Kludex/uvicorn#2676</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.36.1...0.37.0">https://github.com/Kludex/uvicorn/compare/0.36.1...0.37.0</a></p>
<h2>Version 0.36.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Raise an exception when calling removed
<code>Config.setup_event_loop()</code> by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2709">Kludex/uvicorn#2709</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/uvicorn/compare/0.36.0...0.36.1">https://github.com/Kludex/uvicorn/compare/0.36.0...0.36.1</a></p>
<h2>Version 0.36.0</h2>
<h2>Added</h2>
<ul>
<li>Support custom IOLOOPs by <a
href="https://github.com/gnir-work"><code>@​gnir-work</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2435">Kludex/uvicorn#2435</a></li>
<li>Allow to provide importable string in <code>--http</code>,
<code>--ws</code> and <code>--loop</code> by <a
href="https://github.com/Kludex"><code>@​Kludex</code></a> in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2658">Kludex/uvicorn#2658</a></li>
</ul>
<hr />
<h3>New Contributors</h3>
<ul>
<li><a href="https://github.com/gnir-work"><code>@​gnir-work</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/uvicorn/pull/2435">Kludex/uvicorn#2435</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/uvicorn/blob/main/docs/release-notes.md">uvicorn's
changelog</a>.</em></p>
<blockquote>
<h2>0.39.0 (December 21, 2025)</h2>
<h3>Fixed</h3>
<ul>
<li>Send close frame on ASGI return for WebSockets (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2769">#2769</a>)</li>
<li>Explicitly start ASGI run with empty context (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2742">#2742</a>)</li>
</ul>
<h2>0.38.0 (October 18, 2025)</h2>
<h3>Added</h3>
<ul>
<li>Support Python 3.14 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2723">#2723</a>)</li>
</ul>
<h2>0.37.0 (September 23, 2025)</h2>
<h3>Added</h3>
<ul>
<li>Add <code>--timeout-worker-healthcheck</code> option (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2711">#2711</a>)</li>
<li>Add <code>os.PathLike[str]</code> type to <code>ssl_ca_certs</code>
(<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2676">#2676</a>)</li>
</ul>
<h2>0.36.1 (September 23, 2025)</h2>
<h3>Fixed</h3>
<ul>
<li>Raise an exception when calling removed
<code>Config.setup_event_loop()</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2709">#2709</a>)</li>
</ul>
<h2>0.36.0 (September 20, 2025)</h2>
<h3>Added</h3>
<ul>
<li>Support custom IOLOOPs (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2435">#2435</a>)</li>
<li>Allow to provide importable string in <code>--http</code>,
<code>--ws</code> and <code>--loop</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2658">#2658</a>)</li>
</ul>
<h2>0.35.0 (June 28, 2025)</h2>
<h3>Added</h3>
<ul>
<li>Add <code>WebSocketsSansIOProtocol</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2540">#2540</a>)</li>
</ul>
<h3>Changed</h3>
<ul>
<li>Refine help message for option <code>--proxy-headers</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2653">#2653</a>)</li>
</ul>
<h2>0.34.3 (June 1, 2025)</h2>
<h3>Fixed</h3>
<ul>
<li>Don't include <code>cwd()</code> when non-empty
<code>--reload-dirs</code> is passed (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2598">#2598</a>)</li>
<li>Apply <code>get_client_addr</code> formatting to WebSocket logging
(<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2636">#2636</a>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Kludex/uvicorn/commit/4f40b8495772eb3a1ab3613ffd7be5156f8e1389"><code>4f40b84</code></a>
Version 0.39.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2770">#2770</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/5692dfc416f9e65aee5028e55d119313d8d3ab0f"><code>5692dfc</code></a>
fix(websockets): Send close frame on ASGI return (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2769">#2769</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/4194764a26824e5d8ddd1fa673df78dff82966e0"><code>4194764</code></a>
chore(deps): bump the github-actions group with 2 updates (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2763">#2763</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/d94bf28743de545d2d4b150f022203a5178cb705"><code>d94bf28</code></a>
explicitly start ASGI run with empty context (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2742">#2742</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/8ae0bcbecb0a655789abf0c2dd4200848fc68a30"><code>8ae0bcb</code></a>
chore(deps): bump the github-actions group with 2 updates (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2748">#2748</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/4744ff9a1a4888c76ea160328cc9dcc2680c2c71"><code>4744ff9</code></a>
Add groups configuration for GitHub Actions (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2747">#2747</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/0391372376c264604a0475b0864bcbf3a8705352"><code>0391372</code></a>
chore(deps): bump astral-sh/setup-uv from 6.8.0 to 7.1.2 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2746">#2746</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/69a6ae319801a5866ec07afdeb2ff3d912f4d3a0"><code>69a6ae3</code></a>
Improve typing in <code>test_http.py</code> (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2740">#2740</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/3850ad6520cafb290bd4174fa9c4ca5d33440c82"><code>3850ad6</code></a>
Version 0.38.0 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2733">#2733</a>)</li>
<li><a
href="https://github.com/Kludex/uvicorn/commit/9b3f17a549ec96f57bf4d975145fc58feefdd4e8"><code>9b3f17a</code></a>
Support Python 3.14 (<a
href="https://redirect.github.com/Kludex/uvicorn/issues/2723">#2723</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Kludex/uvicorn/compare/0.23.2...0.39.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=uvicorn&package-manager=pip&previous-version=0.23.2&new-version=0.39.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 00:08:16 -08:00
John Kennedy 6b53d46321 Potential fix for code scanning alert no. 1: Workflow does not contain permissions (#863)
Potential fix for
[https://github.com/langchain-ai/langserve/security/code-scanning/1](https://github.com/langchain-ai/langserve/security/code-scanning/1)

In general, to fix this class of issue, you explicitly declare a
`permissions:` block in the workflow (either at the top level or per
job) that grants only the scopes required. For linting and caching,
read-only `contents` access is sufficient; no write access or extra
scopes are needed.

For this specific workflow, the least-privilege, non-breaking fix is to
add a root-level `permissions:` block just under the `name: lint` line.
That will apply to all jobs (here only `build`) that don’t override
permissions. Based on the steps (checkout, cache, running local tools),
only repository contents need to be readable, so we can set:

```yaml
permissions:
  contents: read
```

No other parts of the file need to change, and no additional imports or
methods are required, since this is pure workflow configuration.


_Suggested fixes powered by Copilot Autofix. Review carefully before
merging._

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2026-02-26 00:07:52 -08:00
dependabot[bot] 79bf88aa7a Bump pydantic from 2.11.10 to 2.12.5 (#856)
Bumps [pydantic](https://github.com/pydantic/pydantic) from 2.11.10 to
2.12.5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/releases">pydantic's
releases</a>.</em></p>
<blockquote>
<h2>v2.12.5 2025-11-26</h2>
<h2>v2.12.5 (2025-11-26)</h2>
<p>This is the fifth 2.12 patch release, addressing an issue with the
<code>MISSING</code> sentinel and providing several documentation
improvements.</p>
<p>The next 2.13 minor release will be published in a couple weeks, and
will include a new <em>polymorphic serialization</em> feature addressing
the remaining unexpected changes to the <em>serialize as any</em>
behavior.</p>
<ul>
<li>Fix pickle error when using <code>model_construct()</code> on a
model with <code>MISSING</code> as a default value by <a
href="https://github.com/ornariece"><code>@​ornariece</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12522">#12522</a>.</li>
<li>Several updates to the documentation by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a>.</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.12.4...v2.12.5">https://github.com/pydantic/pydantic/compare/v2.12.4...v2.12.5</a></p>
<h2>v2.12.4 2025-11-05</h2>
<h2>v2.12.4 (2025-11-05)</h2>
<p>This is the fourth 2.12 patch release, fixing more regressions, and
reverting a change in the <code>build()</code> method
of the <a
href="https://docs.pydantic.dev/latest/api/networks/"><code>AnyUrl</code>
and Dsn types</a>.</p>
<p>This patch release also fixes an issue with the serialization of IP
address types, when <code>serialize_as_any</code> is used. The next
patch release
will try to address the remaining issues with <em>serialize as any</em>
behavior by introducing a new <em>polymorphic serialization</em>
feature, that
should be used in most cases in place of <em>serialize as any</em>.</p>
<ul>
<li>
<p>Fix issue with forward references in parent <code>TypedDict</code>
classes by <a href="https://github.com/Viicos"><code>@​Viicos</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12427">#12427</a>.</p>
<p>This issue is only relevant on Python 3.14 and greater.</p>
</li>
<li>
<p>Exclude fields with <code>exclude_if</code> from JSON Schema required
fields by <a href="https://github.com/Viicos"><code>@​Viicos</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12430">#12430</a></p>
</li>
<li>
<p>Revert URL percent-encoding of credentials in the
<code>build()</code> method of the <a
href="https://docs.pydantic.dev/latest/api/networks/"><code>AnyUrl</code>
and Dsn types</a> by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1833">pydantic-core#1833</a>.</p>
<p>This was initially considered as a bugfix, but caused regressions and
as such was fully reverted. The next release will include
an opt-in option to percent-encode components of the URL.</p>
</li>
<li>
<p>Add type inference for IP address types by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1868">pydantic-core#1868</a>.</p>
<p>The 2.12 changes to the <code>serialize_as_any</code> behavior made
it so that IP address types could not properly serialize to JSON.</p>
</li>
<li>
<p>Avoid getting default values from defaultdict by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1853">pydantic-core#1853</a>.</p>
<p>This fixes a subtle regression in the validation behavior of the <a
href="https://docs.python.org/3/library/collections.html#collections.defaultdict"><code>collections.defaultdict</code></a>
type.</p>
</li>
<li>
<p>Fix issue with field serializers on nested typed dictionaries by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1879">pydantic-core#1879</a>.</p>
</li>
<li>
<p>Add more <code>pydantic-core</code> builds for the three-threaded
version of Python 3.14 by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1864">pydantic-core#1864</a>.</p>
</li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/pydantic/pydantic/compare/v2.12.3...v2.12.4">https://github.com/pydantic/pydantic/compare/v2.12.3...v2.12.4</a></p>
<h2>v2.12.3 2025-10-17</h2>
<h2>v2.12.3 (2025-10-17)</h2>
<h3>What's Changed</h3>
<p>This is the third 2.13 patch release, fixing issues related to the
<code>FieldInfo</code> class, and reverting a change to the supported <a
href="https://docs.pydantic.dev/latest/concepts/validators/#model-validators"><em>after</em>
model validator</a> function signatures.</p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/pydantic/pydantic/blob/main/HISTORY.md">pydantic's
changelog</a>.</em></p>
<blockquote>
<h2>v2.12.5 (2025-11-26)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.12.5">GitHub
release</a></p>
<p>This is the fifth 2.12 patch release, addressing an issue with the
<code>MISSING</code> sentinel and providing several documentation
improvements.</p>
<p>The next 2.13 minor release will be published in a couple weeks, and
will include a new <em>polymorphic serialization</em> feature addressing
the remaining unexpected changes to the <em>serialize as any</em>
behavior.</p>
<ul>
<li>Fix pickle error when using <code>model_construct()</code> on a
model with <code>MISSING</code> as a default value by <a
href="https://github.com/ornariece"><code>@​ornariece</code></a> in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12522">#12522</a>.</li>
<li>Several updates to the documentation by <a
href="https://github.com/Viicos"><code>@​Viicos</code></a>.</li>
</ul>
<h2>v2.12.4 (2025-11-05)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.12.4">GitHub
release</a></p>
<p>This is the fourth 2.12 patch release, fixing more regressions, and
reverting a change in the <code>build()</code> method
of the <a
href="https://docs.pydantic.dev/latest/api/networks/"><code>AnyUrl</code>
and Dsn types</a>.</p>
<p>This patch release also fixes an issue with the serialization of IP
address types, when <code>serialize_as_any</code> is used. The next
patch release
will try to address the remaining issues with <em>serialize as any</em>
behavior by introducing a new <em>polymorphic serialization</em>
feature, that
should be used in most cases in place of <em>serialize as any</em>.</p>
<ul>
<li>
<p>Fix issue with forward references in parent <code>TypedDict</code>
classes by <a href="https://github.com/Viicos"><code>@​Viicos</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12427">#12427</a>.</p>
<p>This issue is only relevant on Python 3.14 and greater.</p>
</li>
<li>
<p>Exclude fields with <code>exclude_if</code> from JSON Schema required
fields by <a href="https://github.com/Viicos"><code>@​Viicos</code></a>
in <a
href="https://redirect.github.com/pydantic/pydantic/pull/12430">#12430</a></p>
</li>
<li>
<p>Revert URL percent-encoding of credentials in the
<code>build()</code> method
of the <a
href="https://docs.pydantic.dev/latest/api/networks/"><code>AnyUrl</code>
and Dsn types</a> by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1833">pydantic-core#1833</a>.</p>
<p>This was initially considered as a bugfix, but caused regressions and
as such was fully reverted. The next release will include
an opt-in option to percent-encode components of the URL.</p>
</li>
<li>
<p>Add type inference for IP address types by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1868">pydantic-core#1868</a>.</p>
<p>The 2.12 changes to the <code>serialize_as_any</code> behavior made
it so that IP address types could not properly serialize to JSON.</p>
</li>
<li>
<p>Avoid getting default values from defaultdict by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1853">pydantic-core#1853</a>.</p>
<p>This fixes a subtle regression in the validation behavior of the <a
href="https://docs.python.org/3/library/collections.html#collections.defaultdict"><code>collections.defaultdict</code></a>
type.</p>
</li>
<li>
<p>Fix issue with field serializers on nested typed dictionaries by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1879">pydantic-core#1879</a>.</p>
</li>
<li>
<p>Add more <code>pydantic-core</code> builds for the three-threaded
version of Python 3.14 by <a
href="https://github.com/davidhewitt"><code>@​davidhewitt</code></a> in
<a
href="https://redirect.github.com/pydantic/pydantic-core/pull/1864">pydantic-core#1864</a>.</p>
</li>
</ul>
<h2>v2.12.3 (2025-10-17)</h2>
<p><a
href="https://github.com/pydantic/pydantic/releases/tag/v2.12.3">GitHub
release</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pydantic/pydantic/commit/bd2d0dd0137dfa1a8fdff2529b9dfb1547980150"><code>bd2d0dd</code></a>
Prepare release v2.12.5</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/7d0302ec7ec2cf115de3450a615522875bdd8b56"><code>7d0302e</code></a>
Document security implications when using
<code>create_model()</code></li>
<li><a
href="https://github.com/pydantic/pydantic/commit/e9ef980def726b6f59b6c495ddc9dc259a0228db"><code>e9ef980</code></a>
Fix typo in Standard Library Types documentation</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/f2c20c00c265a31a13c48f9bae923a87c829952e"><code>f2c20c0</code></a>
Add <code>pydantic-docs</code> dev dependency, make use of versioning
blocks</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/a76c1aa26f2d64a3fd080ac515d80832689197e8"><code>a76c1aa</code></a>
Update documentation about JSON Schema</li>
<li><a
href="https://github.com/pydantic/pydantic/commit/8cbc72ca489891e574fba45238ee8bd4f8e719a2"><code>8cbc72c</code></a>
Add documentation about custom <code>__init__()</code></li>
<li><a
href="https://github.com/pydantic/pydantic/commit/99eba599069da137b3f708ffa74627f2b456ba73"><code>99eba59</code></a>
Add additional test for <code>FieldInfo.get_default()</code></li>
<li><a
href="https://github.com/pydantic/pydantic/commit/c71076988e507ea93844c77c3bf0bbb85a5716af"><code>c710769</code></a>
Special case <code>MISSING</code> sentinel in
<code>smart_deepcopy()</code></li>
<li><a
href="https://github.com/pydantic/pydantic/commit/20a9d771c210fd77d52366ac923258c4c199727f"><code>20a9d77</code></a>
Do not delete mock validator/serializer in
<code>rebuild_dataclass()</code></li>
<li><a
href="https://github.com/pydantic/pydantic/commit/c86515a3a8f2120148fab2eaedd3bc45925779d0"><code>c86515a</code></a>
Update parts of the model and <code>revalidate_instances</code>
documentation</li>
<li>Additional commits viewable in <a
href="https://github.com/pydantic/pydantic/compare/v2.11.10...v2.12.5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pydantic&package-manager=pip&previous-version=2.11.10&new-version=2.12.5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 00:04:51 -08:00
dependabot[bot] 2007e07a83 Bump starlette from 0.48.0 to 0.49.1 in the pip group across 1 directory (#855)
Bumps the pip group with 1 update in the / directory:
[starlette](https://github.com/Kludex/starlette).

Updates `starlette` from 0.48.0 to 0.49.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/starlette/releases">starlette's
releases</a>.</em></p>
<blockquote>
<h2>Version 0.49.1</h2>
<p>This release fixes a security vulnerability in the parsing logic of
the <code>Range</code> header in <code>FileResponse</code>.</p>
<p>You can view the full security advisory: <a
href="https://github.com/Kludex/starlette/security/advisories/GHSA-7f5h-v6xp-fcq8">GHSA-7f5h-v6xp-fcq8</a></p>
<h2>Fixed</h2>
<ul>
<li>Optimize the HTTP ranges parsing logic <a
href="https://github.com/Kludex/starlette/commit/4ea6e22b489ec388d6004cfbca52dd5b147127c5">4ea6e22b489ec388d6004cfbca52dd5b147127c5</a></li>
</ul>
<hr />
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/starlette/compare/0.49.0...0.49.1">https://github.com/Kludex/starlette/compare/0.49.0...0.49.1</a></p>
<h2>Version 0.49.0</h2>
<h2>Added</h2>
<ul>
<li>Add <code>encoding</code> parameter to <code>Config</code> class <a
href="https://redirect.github.com/Kludex/starlette/pull/2996">#2996</a>.</li>
<li>Support multiple cookie headers in <code>Request.cookies</code> <a
href="https://redirect.github.com/Kludex/starlette/pull/3029">#3029</a>.</li>
<li>Use <code>Literal</code> type for <code>WebSocketEndpoint</code>
encoding values <a
href="https://redirect.github.com/Kludex/starlette/pull/3027">#3027</a>.</li>
</ul>
<h2>Changed</h2>
<ul>
<li>Do not pollute exception context in <code>Middleware</code> when
using <code>BaseHTTPMiddleware</code> <a
href="https://redirect.github.com/Kludex/starlette/pull/2976">#2976</a>.</li>
</ul>
<hr />
<h2>New Contributors</h2>
<ul>
<li><a
href="https://github.com/TheWesDias"><code>@​TheWesDias</code></a> made
their first contribution in <a
href="https://redirect.github.com/Kludex/starlette/pull/3017">Kludex/starlette#3017</a></li>
<li><a href="https://github.com/gmos2104"><code>@​gmos2104</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/starlette/pull/3027">Kludex/starlette#3027</a></li>
<li><a
href="https://github.com/secrett2633"><code>@​secrett2633</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/starlette/pull/2996">Kludex/starlette#2996</a></li>
<li><a
href="https://github.com/adam-sikora"><code>@​adam-sikora</code></a>
made their first contribution in <a
href="https://redirect.github.com/Kludex/starlette/pull/2976">Kludex/starlette#2976</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/Kludex/starlette/compare/0.48.0...0.49.0">https://github.com/Kludex/starlette/compare/0.48.0...0.49.0</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/Kludex/starlette/blob/main/docs/release-notes.md">starlette's
changelog</a>.</em></p>
<blockquote>
<h2>0.49.1 (October 28, 2025)</h2>
<p>This release fixes a security vulnerability in the parsing logic of
the <code>Range</code> header in <code>FileResponse</code>.</p>
<p>You can view the full security advisory: <a
href="https://github.com/Kludex/starlette/security/advisories/GHSA-7f5h-v6xp-fcq8">GHSA-7f5h-v6xp-fcq8</a></p>
<h4>Fixed</h4>
<ul>
<li>Optimize the HTTP ranges parsing logic <a
href="https://github.com/Kludex/starlette/commit/4ea6e22b489ec388d6004cfbca52dd5b147127c5">4ea6e22b489ec388d6004cfbca52dd5b147127c5</a></li>
</ul>
<h2>0.49.0 (October 28, 2025)</h2>
<h4>Added</h4>
<ul>
<li>Add <code>encoding</code> parameter to <code>Config</code> class <a
href="https://redirect.github.com/Kludex/starlette/pull/2996">#2996</a>.</li>
<li>Support multiple cookie headers in <code>Request.cookies</code> <a
href="https://redirect.github.com/Kludex/starlette/pull/3029">#3029</a>.</li>
<li>Use <code>Literal</code> type for <code>WebSocketEndpoint</code>
encoding values <a
href="https://redirect.github.com/Kludex/starlette/pull/3027">#3027</a>.</li>
</ul>
<h4>Changed</h4>
<ul>
<li>Do not pollute exception context in <code>Middleware</code> when
using <code>BaseHTTPMiddleware</code> <a
href="https://redirect.github.com/Kludex/starlette/pull/2976">#2976</a>.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/Kludex/starlette/commit/7e4b7428f273dbdc875dcd036d20804bcfc7b2ee"><code>7e4b742</code></a>
Version 0.49.1 (<a
href="https://redirect.github.com/Kludex/starlette/issues/3047">#3047</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/4ea6e22b489ec388d6004cfbca52dd5b147127c5"><code>4ea6e22</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/Kludex/starlette/commit/7d88ea6f8ec8aa99cdb5fc7a10b88db5aadfdfee"><code>7d88ea6</code></a>
Version 0.49.0 (<a
href="https://redirect.github.com/Kludex/starlette/issues/3046">#3046</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/26d66bbfb05c7bbecbbb57106c65f33682f8174e"><code>26d66bb</code></a>
Do not pollute exception context in Middleware (<a
href="https://redirect.github.com/Kludex/starlette/issues/2976">#2976</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/a59397db889e3a96c4f34b1406957a3b92e1e8b5"><code>a59397d</code></a>
Set encodings when reading config files (<a
href="https://redirect.github.com/Kludex/starlette/issues/2996">#2996</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/3b7f0cbf598be305528a498a35089ce723060372"><code>3b7f0cb</code></a>
test: add test for unknown status (<a
href="https://redirect.github.com/Kludex/starlette/issues/3035">#3035</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/b09ce1a99d352ee6f5b896597f03a1a57507afcd"><code>b09ce1a</code></a>
docs: fix legibility issues on sponsorship page (<a
href="https://redirect.github.com/Kludex/starlette/issues/3039">#3039</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/0f0edcf8007412d9536bf8714c5815ce8f5dba4b"><code>0f0edcf</code></a>
Revert &quot;Add Marcelo Trylesinski to the license (<a
href="https://redirect.github.com/Kludex/starlette/issues/3025">#3025</a>)&quot;
(<a
href="https://redirect.github.com/Kludex/starlette/issues/3044">#3044</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/3912d6313730cc6004dfb4436e37dbc1a81db7c8"><code>3912d63</code></a>
docs: add social icons (<a
href="https://redirect.github.com/Kludex/starlette/issues/3038">#3038</a>)</li>
<li><a
href="https://github.com/Kludex/starlette/commit/4915a9309fcad58ac08b9fa550563d3287b531ad"><code>4915a93</code></a>
Add discord to README/docs (<a
href="https://redirect.github.com/Kludex/starlette/issues/3034">#3034</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/Kludex/starlette/compare/0.48.0...0.49.1">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=starlette&package-manager=pip&previous-version=0.48.0&new-version=0.49.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 00:04:34 -08:00
dependabot[bot] ad24198ad6 Bump the npm_and_yarn group across 3 directories with 2 updates (#862)
Bumps the npm_and_yarn group with 1 update in the
/langserve/chat_playground directory:
[minimatch](https://github.com/isaacs/minimatch).
Bumps the npm_and_yarn group with 1 update in the /langserve/playground
directory: [minimatch](https://github.com/isaacs/minimatch).
Bumps the npm_and_yarn group with 1 update in the
/libs/langserve-playground directory:
[rollup](https://github.com/rollup/rollup).

Updates `minimatch` from 3.1.2 to 3.1.5
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/minimatch/commit/7bba97888a27a6162983056bcce2a6e28f668712"><code>7bba978</code></a>
3.1.5</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/bd259425b2ca17b42897997f93e890314155522d"><code>bd25942</code></a>
docs: add warning about ReDoS</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/1a9c27c75725474dbde57db2995b6281b267756d"><code>1a9c27c</code></a>
fix partial matching of globstar patterns</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/1a2e084af579731af66c221214e3ca8222c9bf23"><code>1a2e084</code></a>
3.1.4</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/ae24656237c3d58067442f790ce17eff84463a47"><code>ae24656</code></a>
update lockfile</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/b1003749228b2a79e1f237963a0d559ef7a0941e"><code>b100374</code></a>
limit recursion for **, improve perf considerably</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/26ffeaa091b9f660833e23f42e07165b33e85c13"><code>26ffeaa</code></a>
lockfile update</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/9eca892a4e5dbb20534f9f30483b85cdeee6c2eb"><code>9eca892</code></a>
lock node version to 14</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/00c323b188b704e5d4bc534ecec2268cfa70a32a"><code>00c323b</code></a>
3.1.3</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/30486b2048929264f44d18822891cfffa02af78b"><code>30486b2</code></a>
update CI matrix and actions</li>
<li>Additional commits viewable in <a
href="https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `minimatch` from 3.1.2 to 3.1.5
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/isaacs/minimatch/commit/7bba97888a27a6162983056bcce2a6e28f668712"><code>7bba978</code></a>
3.1.5</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/bd259425b2ca17b42897997f93e890314155522d"><code>bd25942</code></a>
docs: add warning about ReDoS</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/1a9c27c75725474dbde57db2995b6281b267756d"><code>1a9c27c</code></a>
fix partial matching of globstar patterns</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/1a2e084af579731af66c221214e3ca8222c9bf23"><code>1a2e084</code></a>
3.1.4</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/ae24656237c3d58067442f790ce17eff84463a47"><code>ae24656</code></a>
update lockfile</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/b1003749228b2a79e1f237963a0d559ef7a0941e"><code>b100374</code></a>
limit recursion for **, improve perf considerably</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/26ffeaa091b9f660833e23f42e07165b33e85c13"><code>26ffeaa</code></a>
lockfile update</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/9eca892a4e5dbb20534f9f30483b85cdeee6c2eb"><code>9eca892</code></a>
lock node version to 14</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/00c323b188b704e5d4bc534ecec2268cfa70a32a"><code>00c323b</code></a>
3.1.3</li>
<li><a
href="https://github.com/isaacs/minimatch/commit/30486b2048929264f44d18822891cfffa02af78b"><code>30486b2</code></a>
update CI matrix and actions</li>
<li>Additional commits viewable in <a
href="https://github.com/isaacs/minimatch/compare/v3.1.2...v3.1.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `rollup` from 4.57.1 to 4.59.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/rollup/rollup/releases">rollup's
releases</a>.</em></p>
<blockquote>
<h2>v4.59.0</h2>
<h2>4.59.0</h2>
<p><em>2026-02-22</em></p>
<h3>Features</h3>
<ul>
<li>Throw when the generated bundle contains paths that would leave the
output directory (<a
href="https://redirect.github.com/rollup/rollup/issues/6276">#6276</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6275">#6275</a>:
Validate bundle stays within output dir (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
<h2>v4.58.0</h2>
<h2>4.58.0</h2>
<p><em>2026-02-20</em></p>
<h3>Features</h3>
<ul>
<li>Also support <code>__NO_SIDE_EFFECTS__</code> annotation before
variable declarations declaring function expressions (<a
href="https://redirect.github.com/rollup/rollup/issues/6272">#6272</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6256">#6256</a>:
docs: document PreRenderedChunk properties including isDynamicEntry and
isImplicitEntry (<a
href="https://github.com/njg7194"><code>@​njg7194</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6259">#6259</a>:
docs: Correct typo and improve sentence structure in docs for
<code>output.experimentalMinChunkSize</code> (<a
href="https://github.com/millerick"><code>@​millerick</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6260">#6260</a>:
fix(deps): update rust crate swc_compiler_base to v47 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6261">#6261</a>:
fix(deps): lock file maintenance minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6262">#6262</a>:
Avoid unnecessary cloning of the code string (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6263">#6263</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6265">#6265</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6267">#6267</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6268">#6268</a>:
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6269">#6269</a>:
chore(deps): update dependency lru-cache to v11 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6270">#6270</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6272">#6272</a>:
forward NO_SIDE_EFFECTS annotations to function expressions in variable
declarations (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/rollup/rollup/blob/master/CHANGELOG.md">rollup's
changelog</a>.</em></p>
<blockquote>
<h2>4.59.0</h2>
<p><em>2026-02-22</em></p>
<h3>Features</h3>
<ul>
<li>Throw when the generated bundle contains paths that would leave the
output directory (<a
href="https://redirect.github.com/rollup/rollup/issues/6276">#6276</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6275">#6275</a>:
Validate bundle stays within output dir (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
<h2>4.58.0</h2>
<p><em>2026-02-20</em></p>
<h3>Features</h3>
<ul>
<li>Also support <code>__NO_SIDE_EFFECTS__</code> annotation before
variable declarations declaring function expressions (<a
href="https://redirect.github.com/rollup/rollup/issues/6272">#6272</a>)</li>
</ul>
<h3>Pull Requests</h3>
<ul>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6256">#6256</a>:
docs: document PreRenderedChunk properties including isDynamicEntry and
isImplicitEntry (<a
href="https://github.com/njg7194"><code>@​njg7194</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6259">#6259</a>:
docs: Correct typo and improve sentence structure in docs for
<code>output.experimentalMinChunkSize</code> (<a
href="https://github.com/millerick"><code>@​millerick</code></a>, <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6260">#6260</a>:
fix(deps): update rust crate swc_compiler_base to v47 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6261">#6261</a>:
fix(deps): lock file maintenance minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6262">#6262</a>:
Avoid unnecessary cloning of the code string (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6263">#6263</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6265">#6265</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6267">#6267</a>:
fix(deps): update minor/patch updates (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6268">#6268</a>:
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot], <a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6269">#6269</a>:
chore(deps): update dependency lru-cache to v11 (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6270">#6270</a>:
chore(deps): lock file maintenance (<a
href="https://github.com/renovate"><code>@​renovate</code></a>[bot])</li>
<li><a
href="https://redirect.github.com/rollup/rollup/pull/6272">#6272</a>:
forward NO_SIDE_EFFECTS annotations to function expressions in variable
declarations (<a
href="https://github.com/lukastaegert"><code>@​lukastaegert</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/rollup/rollup/commit/ae846957f109690a866cc3e4c073613c338d3476"><code>ae84695</code></a>
4.59.0</li>
<li><a
href="https://github.com/rollup/rollup/commit/b39616e9175b3d9fc3977c99153174c490805a93"><code>b39616e</code></a>
Update audit-resolve</li>
<li><a
href="https://github.com/rollup/rollup/commit/c60770d7aaf750e512c1b2774989ea4596e660b2"><code>c60770d</code></a>
Validate bundle stays within output dir (<a
href="https://redirect.github.com/rollup/rollup/issues/6275">#6275</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/33f39c1f205ea2eadaf4b589e493453e2baa3662"><code>33f39c1</code></a>
4.58.0</li>
<li><a
href="https://github.com/rollup/rollup/commit/b61c40803b717854c1c28937e8098e5ad3c7b8ca"><code>b61c408</code></a>
forward NO_SIDE_EFFECTS annotations to function expressions in variable
decla...</li>
<li><a
href="https://github.com/rollup/rollup/commit/7f00689ec90e2cafb11c26eefbcac62343c936f6"><code>7f00689</code></a>
Extend agent instructions</li>
<li><a
href="https://github.com/rollup/rollup/commit/e7b2b85af0901244ecc141b9d792c6db6b527ea4"><code>e7b2b85</code></a>
chore(deps): lock file maintenance (<a
href="https://redirect.github.com/rollup/rollup/issues/6270">#6270</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/2aa5da9baf82211b8207d268c8751630cb766970"><code>2aa5da9</code></a>
fix(deps): update minor/patch updates (<a
href="https://redirect.github.com/rollup/rollup/issues/6267">#6267</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/4319837c5448d0c10d89e9ded118888deec2eeec"><code>4319837</code></a>
chore(deps): update dependency lru-cache to v11 (<a
href="https://redirect.github.com/rollup/rollup/issues/6269">#6269</a>)</li>
<li><a
href="https://github.com/rollup/rollup/commit/c3b6b4bdc4f2ed978fa233132a526957e6513233"><code>c3b6b4b</code></a>
chore(deps): update dependency eslint-plugin-unicorn to v63 (<a
href="https://redirect.github.com/rollup/rollup/issues/6268">#6268</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/rollup/rollup/compare/v4.57.1...v4.59.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-26 00:04:12 -08:00
dependabot[bot] 0b1e78db0b Bump the pip group across 1 directory with 2 updates (#854)
Bumps the pip group with 2 updates in the / directory:
[orjson](https://github.com/ijl/orjson) and
[nbconvert](https://github.com/jupyter/nbconvert).

Updates `orjson` from 3.11.3 to 3.11.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/releases">orjson's
releases</a>.</em></p>
<blockquote>
<h2>3.11.5</h2>
<h3>Changed</h3>
<ul>
<li>Show simple error message instead of traceback when attempting to
build on unsupported Python versions.</li>
</ul>
<h2>3.11.4</h2>
<h3>Changed</h3>
<ul>
<li>ABI compatibility with CPython 3.15 alpha 1.</li>
<li>Publish PyPI wheels for 3.14 and manylinux i686, manylinux arm7,
manylinux ppc64le, manylinux s390x.</li>
<li>Build now requires a C compiler.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ijl/orjson/blob/master/CHANGELOG.md">orjson's
changelog</a>.</em></p>
<blockquote>
<h2>3.11.5 - 2025-12-06</h2>
<h3>Changed</h3>
<ul>
<li>Show simple error message instead of traceback when attempting to
build on unsupported Python versions.</li>
</ul>
<h2>3.11.4 - 2025-10-24</h2>
<h3>Changed</h3>
<ul>
<li>ABI compatibility with CPython 3.15 alpha 1.</li>
<li>Publish PyPI wheels for 3.14 and manylinux i686, manylinux arm7,
manylinux ppc64le, manylinux s390x.</li>
<li>Build now requires a C compiler.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ijl/orjson/commit/fb3eb1f729c7e7b019f780af5695722c99c7c695"><code>fb3eb1f</code></a>
3.11.5</li>
<li><a
href="https://github.com/ijl/orjson/commit/52688e02c51c845cde24a46cd1011a6010d10eb8"><code>52688e0</code></a>
Record contributors in headers</li>
<li><a
href="https://github.com/ijl/orjson/commit/dc083e87d5262e7dde3ba4b1d2a377b5b065a27c"><code>dc083e8</code></a>
Further compatibility and build misc</li>
<li><a
href="https://github.com/ijl/orjson/commit/18f0186d47fbadd53c9db4e39a442d5b04225418"><code>18f0186</code></a>
Compatibility and build misc</li>
<li><a
href="https://github.com/ijl/orjson/commit/a4fdeb3aff125d501ec0dd0577f9b38b2b977b4f"><code>a4fdeb3</code></a>
3.11.4</li>
<li><a
href="https://github.com/ijl/orjson/commit/2e80d68afacafca8751e6a64ca05d0d4087dbd15"><code>2e80d68</code></a>
unlikely to cold_path, remove intrinsics</li>
<li><a
href="https://github.com/ijl/orjson/commit/27edea92f8da2fdfc3f1342474e2f1686f1edf55"><code>27edea9</code></a>
FFI through crate::ffi, partial non-CPython compatibility</li>
<li><a
href="https://github.com/ijl/orjson/commit/416a8c9578da780d0d58b5e6b751793deafc610d"><code>416a8c9</code></a>
Unconditionally build yyjson</li>
<li><a
href="https://github.com/ijl/orjson/commit/c8c1a17dca8436a2fee05ca060febd096e653d98"><code>c8c1a17</code></a>
edition 2024</li>
<li><a
href="https://github.com/ijl/orjson/commit/af4179a1fa0aafffd0f867203b6c36e9a522f165"><code>af4179a</code></a>
build maintenance, panic_immediate_abort break, test 3.15</li>
<li>See full diff in <a
href="https://github.com/ijl/orjson/compare/3.11.3...3.11.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `nbconvert` from 7.16.6 to 7.17.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/jupyter/nbconvert/releases">nbconvert's
releases</a>.</em></p>
<blockquote>
<h2>v7.17.0</h2>
<h2>7.17.0</h2>
<p>(<a
href="https://github.com/jupyter/nbconvert/compare/v7.16.6...c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71">Full
Changelog</a>)</p>
<h3>Enhancements made</h3>
<ul>
<li>Add support for arbitrary browser arguments <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2227">#2227</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<ul>
<li>Fix QtPNGExporter returning empty bytes on macOS <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2264">#2264</a>
(<a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/QuLogic"><code>@​QuLogic</code></a>)</li>
<li>Fix CVE-2025-53000: Secure Inkscape Windows path (registry first +
block CWD) <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2261">#2261</a>
(<a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>, <a
href="https://github.com/mberlanda"><code>@​mberlanda</code></a>, <a
href="https://github.com/minrk"><code>@​minrk</code></a>, <a
href="https://github.com/salmankadaya"><code>@​salmankadaya</code></a>,
<a
href="https://github.com/th3gowtham"><code>@​th3gowtham</code></a>)</li>
<li>Fix get_export_names and get_exporter default args <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2228">#2228</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>PyPA-Compliant Summary <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2226">#2226</a>
(<a
href="https://github.com/hackowitz-af"><code>@​hackowitz-af</code></a>,
<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
</ul>
<h3>Maintenance and upkeep improvements</h3>
<ul>
<li>avoid cov environment on free-threaded Pythons <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2267">#2267</a>
(<a href="https://github.com/minrk"><code>@​minrk</code></a>)</li>
<li>update pre-commit, and fix all issues. <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2238">#2238</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>Drop test on 3.9, test on 3.13, 3.14, 3.14t <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2237">#2237</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>Bump the actions group across 1 directory with 2 updates <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2231">#2231</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>Replace <code>@flaky.flaky</code> decorate with pytest marker <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2229">#2229</a>
(<a href="https://github.com/mgorny"><code>@​mgorny</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>update to mermaid 11.10.0 <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2224">#2224</a>
(<a href="https://github.com/bollwyvl"><code>@​bollwyvl</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>Drop support for Python 3.8, fix the CI tests <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2221">#2221</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/minrk"><code>@​minrk</code></a>)</li>
</ul>
<h3>Documentation improvements</h3>
<ul>
<li>Use <code>intersphinx_registry</code> <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2232">#2232</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>The following people contributed discussions, new ideas, code and
documentation contributions, and review.
See <a
href="https://github-activity.readthedocs.io/en/latest/use/#how-does-this-tool-define-contributions-in-the-reports">our
definition of contributors</a>.</p>
<p>(<a
href="https://github.com/jupyter/nbconvert/graphs/contributors?from=2025-01-28&amp;to=2026-01-29&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a href="https://github.com/bollwyvl"><code>@​bollwyvl</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/Carreau"><code>@​Carreau</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ah3pdesign+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a
href="https://github.com/hackowitz-af"><code>@​hackowitz-af</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ahackowitz-af+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/krassowski"><code>@​krassowski</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akrassowski+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/mberlanda"><code>@​mberlanda</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amberlanda+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/mgorny"><code>@​mgorny</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amgorny+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/minrk"><code>@​minrk</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Aminrk+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/MSeal"><code>@​MSeal</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AMSeal+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/QuLogic"><code>@​QuLogic</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AQuLogic+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a
href="https://github.com/salmankadaya"><code>@​salmankadaya</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Asalmankadaya+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/shreve"><code>@​shreve</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ashreve+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/th3gowtham"><code>@​th3gowtham</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ath3gowtham+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/jupyter/nbconvert/blob/main/CHANGELOG.md">nbconvert's
changelog</a>.</em></p>
<blockquote>
<h2>7.17.0</h2>
<p>(<a
href="https://github.com/jupyter/nbconvert/compare/v7.16.6...c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71">Full
Changelog</a>)</p>
<h3>Enhancements made</h3>
<ul>
<li>Add support for arbitrary browser arguments <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2227">#2227</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Bugs fixed</h3>
<ul>
<li>Fix QtPNGExporter returning empty bytes on macOS <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2264">#2264</a>
(<a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/QuLogic"><code>@​QuLogic</code></a>)</li>
<li>Fix CVE-2025-53000: Secure Inkscape Windows path (registry first +
block CWD) <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2261">#2261</a>
(<a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>, <a
href="https://github.com/mberlanda"><code>@​mberlanda</code></a>, <a
href="https://github.com/minrk"><code>@​minrk</code></a>, <a
href="https://github.com/salmankadaya"><code>@​salmankadaya</code></a>,
<a
href="https://github.com/th3gowtham"><code>@​th3gowtham</code></a>)</li>
<li>Fix get_export_names and get_exporter default args <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2228">#2228</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>PyPA-Compliant Summary <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2226">#2226</a>
(<a
href="https://github.com/hackowitz-af"><code>@​hackowitz-af</code></a>,
<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
</ul>
<h3>Maintenance and upkeep improvements</h3>
<ul>
<li>avoid cov environment on free-threaded Pythons <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2267">#2267</a>
(<a href="https://github.com/minrk"><code>@​minrk</code></a>)</li>
<li>update pre-commit, and fix all issues. <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2238">#2238</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>Drop test on 3.9, test on 3.13, 3.14, 3.14t <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2237">#2237</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>Bump the actions group across 1 directory with 2 updates <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2231">#2231</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>Replace <code>@flaky.flaky</code> decorate with pytest marker <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2229">#2229</a>
(<a href="https://github.com/mgorny"><code>@​mgorny</code></a>, <a
href="https://github.com/Carreau"><code>@​Carreau</code></a>)</li>
<li>update to mermaid 11.10.0 <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2224">#2224</a>
(<a href="https://github.com/bollwyvl"><code>@​bollwyvl</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
<li>Drop support for Python 3.8, fix the CI tests <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2221">#2221</a>
(<a href="https://github.com/shreve"><code>@​shreve</code></a>, <a
href="https://github.com/minrk"><code>@​minrk</code></a>)</li>
</ul>
<h3>Documentation improvements</h3>
<ul>
<li>Use <code>intersphinx_registry</code> <a
href="https://redirect.github.com/jupyter/nbconvert/pull/2232">#2232</a>
(<a href="https://github.com/Carreau"><code>@​Carreau</code></a>, <a
href="https://github.com/krassowski"><code>@​krassowski</code></a>)</li>
</ul>
<h3>Contributors to this release</h3>
<p>The following people contributed discussions, new ideas, code and
documentation contributions, and review.
See <a
href="https://github-activity.readthedocs.io/en/latest/use/#how-does-this-tool-define-contributions-in-the-reports">our
definition of contributors</a>.</p>
<p>(<a
href="https://github.com/jupyter/nbconvert/graphs/contributors?from=2025-01-28&amp;to=2026-01-29&amp;type=c">GitHub
contributors page for this release</a>)</p>
<p><a href="https://github.com/bollwyvl"><code>@​bollwyvl</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Abollwyvl+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/Carreau"><code>@​Carreau</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3ACarreau+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/h3pdesign"><code>@​h3pdesign</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ah3pdesign+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a
href="https://github.com/hackowitz-af"><code>@​hackowitz-af</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ahackowitz-af+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/krassowski"><code>@​krassowski</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Akrassowski+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/mberlanda"><code>@​mberlanda</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amberlanda+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/mgorny"><code>@​mgorny</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Amgorny+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/minrk"><code>@​minrk</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Aminrk+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/MSeal"><code>@​MSeal</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AMSeal+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/QuLogic"><code>@​QuLogic</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3AQuLogic+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a
href="https://github.com/salmankadaya"><code>@​salmankadaya</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Asalmankadaya+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/shreve"><code>@​shreve</code></a> (<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ashreve+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)
| <a href="https://github.com/th3gowtham"><code>@​th3gowtham</code></a>
(<a
href="https://github.com/search?q=repo%3Ajupyter%2Fnbconvert+involves%3Ath3gowtham+updated%3A2025-01-28..2026-01-29&amp;type=Issues">activity</a>)</p>
<!-- raw HTML omitted -->
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/jupyter/nbconvert/commit/21b35d85b46f5ff0956d3d088a52b9bef00e8196"><code>21b35d8</code></a>
Publish 7.17.0</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/c9ac1d1040459ed1ff9eb34e9918ce5a87cf9d71"><code>c9ac1d1</code></a>
Fix CVE-2025-53000: Secure Inkscape Windows path (registry first + block
CWD)...</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/b13276d80ae6fadbfda981304810e26f421c4ced"><code>b13276d</code></a>
avoid cov environment on free-threaded Pythons (<a
href="https://redirect.github.com/jupyter/nbconvert/issues/2267">#2267</a>)</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/7c7055fe833fe9832e6f9a64fa5f67d66692c8d6"><code>7c7055f</code></a>
[pre-commit.ci] auto fixes from pre-commit.com hooks</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/74f3ddd37ef4b7ffb5eee9acbf52062217c15852"><code>74f3ddd</code></a>
Fix QtPNGExporter returning empty bytes on macOS</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/216550b2aae4c329f4dab597a96ae7cac30de79a"><code>216550b</code></a>
fix links</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/39777ac5716350e994171d025a7369c58b0afc8c"><code>39777ac</code></a>
try to comment fialing test</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/7b591ca526f2598dbae3256a53765659c3edcf14"><code>7b591ca</code></a>
ruff-check</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/6ec7638a3dc7a0bc2c533c116202d7f9b07ce9d9"><code>6ec7638</code></a>
parent</li>
<li><a
href="https://github.com/jupyter/nbconvert/commit/59414b36f94e318d4207e8af863167047d936c19"><code>59414b3</code></a>
fix mypy</li>
<li>Additional commits viewable in <a
href="https://github.com/jupyter/nbconvert/compare/v7.16.6...v7.17.0">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-08 08:06:01 -08:00
dependabot[bot] 5eff20817d Bump ruff from 0.1.15 to 0.15.0 (#850)
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.1.15 to 0.15.0.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>0.15.0</h2>
<h2>Release Notes</h2>
<p>Released on 2026-02-03.</p>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.15.0">blog
post</a> for a migration guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<ul>
<li>
<p>Ruff now formats your code according to the 2026 style guide. See the
formatter section below or in the blog post for a detailed list of
changes.</p>
</li>
<li>
<p>The linter now supports block suppression comments. For example, to
suppress <code>N803</code> for all parameters in this function:</p>
<pre lang="python"><code># ruff: disable[N803]
def foo(
    legacyArg1,
    legacyArg2,
    legacyArg3,
    legacyArg4,
): ...
# ruff: enable[N803]
</code></pre>
<p>See the <a
href="https://docs.astral.sh/ruff/linter/#block-level">documentation</a>
for more details.</p>
</li>
<li>
<p>The <code>ruff:alpine</code> Docker image is now based on Alpine 3.23
(up from 3.21).</p>
</li>
<li>
<p>The <code>ruff:debian</code> and <code>ruff:debian-slim</code> Docker
images are now based on Debian 13 &quot;Trixie&quot; instead of Debian
12 &quot;Bookworm.&quot;</p>
</li>
<li>
<p>Binaries for the <code>ppc64</code> (64-bit big-endian PowerPC)
architecture are no longer included in our releases. It should still be
possible to build Ruff manually for this platform, if needed.</p>
</li>
<li>
<p>Ruff now resolves all <code>extend</code>ed configuration files
before falling back on a default Python version.</p>
</li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-httpx-in-async-function"><code>blocking-http-call-httpx-in-async-function</code></a>
(<code>ASYNC212</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-path-method-in-async-function"><code>blocking-path-method-in-async-function</code></a>
(<code>ASYNC240</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-input-in-async-function"><code>blocking-input-in-async-function</code></a>
(<code>ASYNC250</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/map-without-explicit-strict"><code>map-without-explicit-strict</code></a>
(<code>B912</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-exp-instead-of-or-operator"><code>if-exp-instead-of-or-operator</code></a>
(<code>FURB110</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/single-item-membership-test"><code>single-item-membership-test</code></a>
(<code>FURB171</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/missing-maxsplit-arg"><code>missing-maxsplit-arg</code></a>
(<code>PLC0207</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/unnecessary-lambda"><code>unnecessary-lambda</code></a>
(<code>PLW0108</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/unnecessary-empty-iterable-within-deque-call"><code>unnecessary-empty-iterable-within-deque-call</code></a>
(<code>RUF037</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/in-empty-collection"><code>in-empty-collection</code></a>
(<code>RUF060</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/legacy-form-pytest-raises"><code>legacy-form-pytest-raises</code></a>
(<code>RUF061</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/non-octal-permissions"><code>non-octal-permissions</code></a>
(<code>RUF064</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/CHANGELOG.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h2>0.15.0</h2>
<p>Released on 2026-02-03.</p>
<p>Check out the <a href="https://astral.sh/blog/ruff-v0.15.0">blog
post</a> for a migration
guide and overview of the changes!</p>
<h3>Breaking changes</h3>
<ul>
<li>
<p>Ruff now formats your code according to the 2026 style guide. See the
formatter section below or in the blog post for a detailed list of
changes.</p>
</li>
<li>
<p>The linter now supports block suppression comments. For example, to
suppress <code>N803</code> for all parameters in this function:</p>
<pre lang="python"><code># ruff: disable[N803]
def foo(
    legacyArg1,
    legacyArg2,
    legacyArg3,
    legacyArg4,
): ...
# ruff: enable[N803]
</code></pre>
<p>See the <a
href="https://docs.astral.sh/ruff/linter/#block-level">documentation</a>
for more details.</p>
</li>
<li>
<p>The <code>ruff:alpine</code> Docker image is now based on Alpine 3.23
(up from 3.21).</p>
</li>
<li>
<p>The <code>ruff:debian</code> and <code>ruff:debian-slim</code> Docker
images are now based on Debian 13 &quot;Trixie&quot; instead of Debian
12 &quot;Bookworm.&quot;</p>
</li>
<li>
<p>Binaries for the <code>ppc64</code> (64-bit big-endian PowerPC)
architecture are no longer included in our releases. It should still be
possible to build Ruff manually for this platform, if needed.</p>
</li>
<li>
<p>Ruff now resolves all <code>extend</code>ed configuration files
before falling back on a default Python version.</p>
</li>
</ul>
<h3>Stabilization</h3>
<p>The following rules have been stabilized and are no longer in
preview:</p>
<ul>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-http-call-httpx-in-async-function"><code>blocking-http-call-httpx-in-async-function</code></a>
(<code>ASYNC212</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-path-method-in-async-function"><code>blocking-path-method-in-async-function</code></a>
(<code>ASYNC240</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/blocking-input-in-async-function"><code>blocking-input-in-async-function</code></a>
(<code>ASYNC250</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/map-without-explicit-strict"><code>map-without-explicit-strict</code></a>
(<code>B912</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/if-exp-instead-of-or-operator"><code>if-exp-instead-of-or-operator</code></a>
(<code>FURB110</code>)</li>
<li><a
href="https://docs.astral.sh/ruff/rules/single-item-membership-test"><code>single-item-membership-test</code></a>
(<code>FURB171</code>)</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/ce5f7b6127a5d684e96fd0f8e387f73c41c7a1b0"><code>ce5f7b6</code></a>
Bump 0.15.0 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23055">#23055</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b4e40f539cdbafac8afd6e510994ca64c3b317b9"><code>b4e40f5</code></a>
[ty] Fix <code>__contains__</code> to respect descriptors (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23056">#23056</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/848cb72dc14b4c9409bf08e8323b4119d6b90005"><code>848cb72</code></a>
[ty] Fix narrowing of nonlocal variables with conditional assignments
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/22966">#22966</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/da7f33af22c7da3f3cb9321f776dda4131dda3cb"><code>da7f33a</code></a>
[ty] Add a diagnostic for <code>Final</code> without assignment (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23001">#23001</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/e65f9a6b039fa411e5609a7bda9bb7ffd11e9b1a"><code>e65f9a6</code></a>
Document markdown formatting feature (<a
href="https://redirect.github.com/astral-sh/ruff/issues/22990">#22990</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/c0c1b985c9ec4b3570b0a28af69ad6776a3ec401"><code>c0c1b98</code></a>
Format markdown code blocks with line-by-line regex parse (<a
href="https://redirect.github.com/astral-sh/ruff/issues/22996">#22996</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/9f8f3e196bd6d4f2c572075536dd38b769c48087"><code>9f8f3e1</code></a>
Allow positional-only params with defaults in method overrides (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23037">#23037</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/ef83810e118e3e41aa6c63f87f8a8147363a3e56"><code>ef83810</code></a>
[ty] ecosystem-analyzer: Support bare git repositories (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23054">#23054</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/54dfee4cb800c0b0890b2b2c74c64cc45584194c"><code>54dfee4</code></a>
Customize where the <code>fix_title</code> sub-diagnostic appears (<a
href="https://redirect.github.com/astral-sh/ruff/issues/23044">#23044</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/b53460799b592e5276e1d148d8a48469f396032e"><code>b534607</code></a>
2026 Ruff Formatter Style (<a
href="https://redirect.github.com/astral-sh/ruff/issues/22735">#22735</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.1.15...0.15.0">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.1.15&new-version=0.15.0)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: John Kennedy <65985482+jkennedyvz@users.noreply.github.com>
2026-02-07 18:09:10 -08:00
dependabot[bot] 5a6f73cdf6 Bump the npm_and_yarn group across 3 directories with 12 updates (#851)
Bumps the npm_and_yarn group with 6 updates in the
/langserve/chat_playground directory:

| Package | From | To |
| --- | --- | --- |
| [lodash](https://github.com/lodash/lodash) | `4.17.21` | `4.17.23` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) |
`4.5.14` | `5.4.21` |
|
[@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers)
| `7.23.2` | `7.28.6` |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) |
`1.1.11` | `1.1.12` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `4.1.0` | `4.1.1` |
| [micromatch](https://github.com/micromatch/micromatch) | `4.0.5` |
`4.0.8` |

Bumps the npm_and_yarn group with 6 updates in the /langserve/playground
directory:

| Package | From | To |
| --- | --- | --- |
| [lodash](https://github.com/lodash/lodash) | `4.17.21` | `4.17.23` |
| [vite](https://github.com/vitejs/vite/tree/HEAD/packages/vite) |
`4.5.14` | `5.4.21` |
|
[@babel/helpers](https://github.com/babel/babel/tree/HEAD/packages/babel-helpers)
| `7.23.2` | `7.28.6` |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) |
`1.1.11` | `1.1.12` |
| [js-yaml](https://github.com/nodeca/js-yaml) | `4.1.0` | `4.1.1` |
| [micromatch](https://github.com/micromatch/micromatch) | `4.0.5` |
`4.0.8` |

Bumps the npm_and_yarn group with 6 updates in the
/libs/langserve-playground directory:

| Package | From | To |
| --- | --- | --- |
| [brace-expansion](https://github.com/juliangruber/brace-expansion) |
`1.1.11` | `1.1.12` |
| [braces](https://github.com/micromatch/braces) | `3.0.2` | `3.0.3` |
| [cross-spawn](https://github.com/moxystudio/node-cross-spawn) |
`7.0.3` | `7.0.6` |
| [micromatch](https://github.com/micromatch/micromatch) | `4.0.5` |
`4.0.8` |
| [rollup](https://github.com/rollup/rollup) | `3.29.4` | `3.29.5` |
| [tsup](https://github.com/egoist/tsup) | `7.2.0` | `8.3.5` |


Updates `lodash` from 4.17.21 to 4.17.23
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lodash/lodash/commit/dec55b7a3b382da075e2eac90089b4cd00a26cbb"><code>dec55b7</code></a>
Bump main to v4.17.23 (<a
href="https://redirect.github.com/lodash/lodash/issues/6088">#6088</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/19c9251b3631d7cf220b43bc757eb33f1084f117"><code>19c9251</code></a>
fix: setCacheHas JSDoc return type should be boolean (<a
href="https://redirect.github.com/lodash/lodash/issues/6071">#6071</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/b5e672995ae26929d111a6e94589f8d03fb8e578"><code>b5e6729</code></a>
jsdoc: Add -0 and BigInt zeros to _.compact falsey values list (<a
href="https://redirect.github.com/lodash/lodash/issues/6062">#6062</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/edadd452146f7e4bad4ea684e955708931d84d81"><code>edadd45</code></a>
Prevent prototype pollution on baseUnset function</li>
<li><a
href="https://github.com/lodash/lodash/commit/4879a7a7d0a4494b0e83c7fa21bcc9fc6e7f1a6d"><code>4879a7a</code></a>
doc: fix autoLink function, conversion of source links (<a
href="https://redirect.github.com/lodash/lodash/issues/6056">#6056</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/9648f692b0fc7c2f6a7a763d754377200126c2e8"><code>9648f69</code></a>
chore: remove <code>yarn.lock</code> file (<a
href="https://redirect.github.com/lodash/lodash/issues/6053">#6053</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/dfa407db0bf5b200f2c7a9e4f06830ceaf074be9"><code>dfa407d</code></a>
ci: remove legacy configuration files (<a
href="https://redirect.github.com/lodash/lodash/issues/6052">#6052</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/156e1965ae78b121a88f81178ab81632304e8d64"><code>156e196</code></a>
feat: add renovate setup (<a
href="https://redirect.github.com/lodash/lodash/issues/6039">#6039</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/933e1061b8c344d3fc742cdc400175d5ffc99bce"><code>933e106</code></a>
ci: add pipeline for Bun (<a
href="https://redirect.github.com/lodash/lodash/issues/6023">#6023</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/072a807ff7ad8ffc7c1d2c3097266e815d138e20"><code>072a807</code></a>
docs: update links related to Open JS Foundation (<a
href="https://redirect.github.com/lodash/lodash/issues/5968">#5968</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/lodash/lodash/compare/4.17.21...4.17.23">compare
view</a></li>
</ul>
</details>
<br />

Updates `vite` from 4.5.14 to 5.4.21
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.21</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.20</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/ca88ed7398288ce0c60176ac9a6392f10654c67c/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.19</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.21 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)
(<a
href="https://github.com/vitejs/vite/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c">cad1d31</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20968">#20968</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/20970">#20970</a></li>
<li>chore: update CHANGELOG (<a
href="https://github.com/vitejs/vite/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c">ca88ed7</a>)</li>
</ul>
<h2><!-- raw HTML omitted -->5.4.20 (2025-09-08)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)
(<a
href="https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea">482000f</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20736">#20736</a></li>
<li>fix: port sirv@3.0.2 changes to sirv@2.0.4 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20737">#20737</a>)
(<a
href="https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069">4f1c35b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20737">#20737</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.19 (2025-04-30)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>,
check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19966">#19966</a>)
(<a
href="https://github.com/vitejs/vite/commit/766947e7cbf1cdd07df9737394e8c870401b78b0">766947e</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19965">#19965</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19966">#19966</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.18 (2025-04-10)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)
(<a
href="https://github.com/vitejs/vite/commit/823675baff2bd6809c74ba2d9acca0327923a54f">823675b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19830">#19830</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19831">#19831</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.17 (2025-04-03)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19782">#19782</a>,
fs check with svg and relative paths (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19784">#19784</a>)
(<a
href="https://github.com/vitejs/vite/commit/84b2b46ed129be8215108e789a90adbb33a9c42c">84b2b46</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19782">#19782</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19784">#19784</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.16 (2025-03-31)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19761">#19761</a>,
fs check in transform middleware (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19762">#19762</a>)
(<a
href="https://github.com/vitejs/vite/commit/b627c50d359f3bd9b602408fbbf462cf4a2f019c">b627c50</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19761">#19761</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19762">#19762</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.15 (2025-03-24)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19702">#19702</a>,
fs raw query with query separators (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19703">#19703</a>)
(<a
href="https://github.com/vitejs/vite/commit/807d7f06d33ab49c48a2a3501da3eea1906c0d41">807d7f0</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19702">#19702</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19703">#19703</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.14 (2025-01-21)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: <code>preview.allowedHosts</code> with specific values was not
respected (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19246">#19246</a>)
(<a
href="https://github.com/vitejs/vite/commit/9df6e6beabf0d18988ec13b8b742d2aba29662f9">9df6e6b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19246">#19246</a></li>
<li>fix: allow CORS from loopback addresses by default (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19249">#19249</a>)
(<a
href="https://github.com/vitejs/vite/commit/7d1699ccf673e2790704756d89d2e1e4ee478fb4">7d1699c</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19249">#19249</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/adce3c22c64cc9d44cc8f45cc92b543e3e4bf385"><code>adce3c2</code></a>
release: v5.4.21</li>
<li><a
href="https://github.com/vitejs/vite/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c"><code>cad1d31</code></a>
fix(dev): trim trailing slash before <code>server.fs.deny</code> check
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c"><code>ca88ed7</code></a>
chore: update CHANGELOG</li>
<li><a
href="https://github.com/vitejs/vite/commit/997700f01c7199daf7330d33a7fd3a43b2e9e3ba"><code>997700f</code></a>
release: v5.4.20</li>
<li><a
href="https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea"><code>482000f</code></a>
fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/80a333a23103ced0442d4463d1191433d90f5e19"><code>80a333a</code></a>
release: v5.4.19</li>
<li><a
href="https://github.com/vitejs/vite/commit/766947e7cbf1cdd07df9737394e8c870401b78b0"><code>766947e</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>,
check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19966">#19966</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/731b77d19d36f5682a5441b49cb2f6473389ad99"><code>731b77d</code></a>
release: v5.4.18</li>
<li><a
href="https://github.com/vitejs/vite/commit/823675baff2bd6809c74ba2d9acca0327923a54f"><code>823675b</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/0a2518a98d2354c61ee8ef51f7d00fa92aebb511"><code>0a2518a</code></a>
release: v5.4.17</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v5.4.21/packages/vite">compare
view</a></li>
</ul>
</details>
<br />

Updates `@babel/helpers` from 7.23.2 to 7.28.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/babel/babel/releases"><code>@​babel/helpers</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.28.6 (2026-01-12)</h2>
<p>Thanks <a
href="https://github.com/kadhirash"><code>@​kadhirash</code></a> and <a
href="https://github.com/kolvian"><code>@​kolvian</code></a> for your
first PRs!</p>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-code-frame</code>,
<code>babel-core</code>,
<code>babel-helper-check-duplicate-nodes</code>,
<code>babel-helper-fixtures</code>,
<code>babel-helper-plugin-utils</code>, <code>babel-node</code>,
<code>babel-plugin-transform-flow-comments</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-property-mutators</code>,
<code>babel-preset-env</code>, <code>babel-traverse</code>,
<code>babel-types</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17589">#17589</a>
Improve Unicode handling in code-frame tokenizer (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-regenerator</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17556">#17556</a>
fix: <code>transform-regenerator</code> correctly handles scope (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-react-jsx</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17538">#17538</a>
fix: Keep jsx comments (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-core</code>, <code>babel-standalone</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17606">#17606</a>
Polish(standalone): improve message on invalid preset/plugin (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>

<li><code>babel-plugin-bugfix-v8-static-class-fields-redefine-readonly</code>,
<code>babel-plugin-proposal-decorators</code>,
<code>babel-plugin-proposal-import-attributes-to-assertions</code>,
<code>babel-plugin-proposal-import-wasm-source</code>,
<code>babel-plugin-syntax-async-do-expressions</code>,
<code>babel-plugin-syntax-decorators</code>,
<code>babel-plugin-syntax-destructuring-private</code>,
<code>babel-plugin-syntax-do-expressions</code>,
<code>babel-plugin-syntax-explicit-resource-management</code>,
<code>babel-plugin-syntax-export-default-from</code>,
<code>babel-plugin-syntax-flow</code>,
<code>babel-plugin-syntax-function-bind</code>,
<code>babel-plugin-syntax-function-sent</code>,
<code>babel-plugin-syntax-import-assertions</code>,
<code>babel-plugin-syntax-import-attributes</code>,
<code>babel-plugin-syntax-import-defer</code>,
<code>babel-plugin-syntax-import-source</code>,
<code>babel-plugin-syntax-jsx</code>,
<code>babel-plugin-syntax-module-blocks</code>,
<code>babel-plugin-syntax-optional-chaining-assign</code>,
<code>babel-plugin-syntax-partial-application</code>,
<code>babel-plugin-syntax-pipeline-operator</code>,
<code>babel-plugin-syntax-throw-expressions</code>,
<code>babel-plugin-syntax-typescript</code>,
<code>babel-plugin-transform-async-generator-functions</code>,
<code>babel-plugin-transform-async-to-generator</code>,
<code>babel-plugin-transform-class-properties</code>,
<code>babel-plugin-transform-class-static-block</code>,
<code>babel-plugin-transform-dotall-regex</code>,
<code>babel-plugin-transform-duplicate-named-capturing-groups-regex</code>,
<code>babel-plugin-transform-explicit-resource-management</code>,
<code>babel-plugin-transform-exponentiation-operator</code>,
<code>babel-plugin-transform-json-strings</code>,
<code>babel-plugin-transform-logical-assignment-operators</code>,
<code>babel-plugin-transform-nullish-coalescing-operator</code>,
<code>babel-plugin-transform-numeric-separator</code>,
<code>babel-plugin-transform-object-rest-spread</code>,
<code>babel-plugin-transform-optional-catch-binding</code>,
<code>babel-plugin-transform-optional-chaining</code>,
<code>babel-plugin-transform-private-methods</code>,
<code>babel-plugin-transform-private-property-in-object</code>,
<code>babel-plugin-transform-regexp-modifiers</code>,
<code>babel-plugin-transform-unicode-property-regex</code>,
<code>babel-plugin-transform-unicode-sets-regex</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17580">#17580</a>
Allow Babel 8 in compatible Babel 7 plugins (<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏃‍♀️ Performance</h4>
<ul>
<li><code>babel-plugin-transform-react-jsx</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17555">#17555</a>
perf: Use lighter traversal for jsx <code>__source,__self</code> (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 7</h4>
<ul>
<li>Babel Bot (<a
href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
<li>Eliot Pontarelli (<a
href="https://github.com/kolvian"><code>@​kolvian</code></a>)</li>
<li>Huáng Jùnliàng (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Kadhirash Sivakumar (<a
href="https://github.com/kadhirash"><code>@​kadhirash</code></a>)</li>
<li>Nicolò Ribaudo (<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li><a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
<li>coderaiser (<a
href="https://github.com/coderaiser"><code>@​coderaiser</code></a>)</li>
</ul>
<h2>v7.28.5 (2025-10-23)</h2>
<p>Thank you <a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>, <a
href="https://github.com/Olexandr88"><code>@​Olexandr88</code></a>, and
<a href="https://github.com/youthfulhps"><code>@​youthfulhps</code></a>
for your first PRs!</p>
<h4>👓 Spec Compliance</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17446">#17446</a>
Allow <code>Runtime Errors for Function Call Assignment Targets</code>
(<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-validator-identifier</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17501">#17501</a>
fix: update identifier to unicode 17 (<a
href="https://github.com/fisker"><code>@​fisker</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-proposal-destructuring-private</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17534">#17534</a>
Allow mixing private destructuring and rest (<a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17521">#17521</a>
Improve <code>@babel/parser</code> error typing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a
href="https://redirect.github.com/babel/babel/pull/17491">#17491</a>
fix: improve ts-only declaration parsing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-discard-binding</code>,
<code>babel-plugin-transform-destructuring</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/babel/babel/commit/d7f400889567ae18ef9ac41b024b5120f6060e17"><code>d7f4008</code></a>
v7.28.6</li>
<li><a
href="https://github.com/babel/babel/commit/99dcba5e71de3bd81ce14077cfa5b6df58e9b177"><code>99dcba5</code></a>
chore: enable some ts-eslint rules (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17592">#17592</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/c1b55f6ad56523ccc96fa68721de0bed2f2cdb23"><code>c1b55f6</code></a>
Use <code>eslint.config.mts</code> (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17573">#17573</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/35055e392079a65830b7bf5b1d1c1fc4de90a78f"><code>35055e3</code></a>
v7.28.4</li>
<li><a
href="https://github.com/babel/babel/commit/18d88b83c67c8dbbe63e4ac423e6006c4c01b85c"><code>18d88b8</code></a>
Improve <code>@​babel/core</code> typings (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17471">#17471</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/ef155f5ca83c73dbc1ea8d95216830b7dc3b0ac2"><code>ef155f5</code></a>
v7.28.3</li>
<li><a
href="https://github.com/babel/babel/commit/741cbd2381ac0cda3afd42bc04454a87d9d8762a"><code>741cbd2</code></a>
chore: fix various typos across codebase (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17476">#17476</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/cac0ff4c3426eed30b4d27e7971b348da7c9f1e6"><code>cac0ff4</code></a>
v7.28.2</li>
<li><a
href="https://github.com/babel/babel/commit/f743094585b39bd9f7a9e3a3561215b2103e2474"><code>f743094</code></a>
fix: <code>regeneratorDefine</code> compatibility with es5 strict mode
(<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17441">#17441</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/baa4cb8b9f8a551d7dae9042b19ea2f74df6b110"><code>baa4cb8</code></a>
v7.27.6</li>
<li>Additional commits viewable in <a
href="https://github.com/babel/babel/commits/v7.28.6/packages/babel-helpers">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by [GitHub Actions](<a
href="https://www.npmjs.com/~GitHub">https://www.npmjs.com/~GitHub</a>
Actions), a new releaser for <code>@​babel/helpers</code> since your
current version.</p>
</details>
<br />

Updates `brace-expansion` from 1.1.11 to 1.1.12
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/juliangruber/brace-expansion/releases">brace-expansion's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.12</h2>
<ul>
<li>pkg: publish on tag 1.x  c460dbd</li>
<li>fmt  ccb8ac6</li>
<li>Fix potential ReDoS Vulnerability or Inefficient Regular Expression
(<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/65">#65</a>)
c3c73c8</li>
</ul>
<hr />
<p><a
href="https://github.com/juliangruber/brace-expansion/compare/v1.1.11...v1.1.12">https://github.com/juliangruber/brace-expansion/compare/v1.1.11...v1.1.12</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/44f33b47c5c6a965d507421af43e86cf5971d711"><code>44f33b4</code></a>
1.1.12</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/c460dbd68e428d147b2080622d8ce126c7a08570"><code>c460dbd</code></a>
pkg: publish on tag 1.x</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/ccb8ac6d4292b7661b677fe048ba6690c877f51f"><code>ccb8ac6</code></a>
fmt</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/c3c73c8b088defc70851843be88ccc3af08e7217"><code>c3c73c8</code></a>
Fix potential ReDoS Vulnerability or Inefficient Regular Expression (<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/65">#65</a>)</li>
<li>See full diff in <a
href="https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12">compare
view</a></li>
</ul>
</details>
<br />

Updates `esbuild` from 0.18.20 to 0.21.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/releases">esbuild's
releases</a>.</em></p>
<blockquote>
<h2>v0.21.5</h2>
<ul>
<li>
<p>Fix <code>Symbol.metadata</code> on classes without a class decorator
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3781">#3781</a>)</p>
<p>This release fixes a bug with esbuild's support for the <a
href="https://github.com/tc39/proposal-decorator-metadata">decorator
metadata proposal</a>. Previously esbuild only added the
<code>Symbol.metadata</code> property to decorated classes if there was
a decorator on the class element itself. However, the proposal says that
the <code>Symbol.metadata</code> property should be present on all
classes that have any decorators at all, not just those with a decorator
on the class element itself.</p>
</li>
<li>
<p>Allow unknown import attributes to be used with the <code>copy</code>
loader (<a
href="https://redirect.github.com/evanw/esbuild/issues/3792">#3792</a>)</p>
<p>Import attributes (the <code>with</code> keyword on
<code>import</code> statements) are allowed to alter how that path is
loaded. For example, esbuild cannot assume that it knows how to load
<code>./bagel.js</code> as type <code>bagel</code>:</p>
<pre lang="js"><code>// This is an error with &quot;--bundle&quot;
without also using &quot;--external:./bagel.js&quot;
import tasty from &quot;./bagel.js&quot; with { type: &quot;bagel&quot;
}
</code></pre>
<p>Because of that, bundling this code with esbuild is an error unless
the file <code>./bagel.js</code> is external to the bundle (such as with
<code>--bundle --external:./bagel.js</code>).</p>
<p>However, there is an additional case where it's ok for esbuild to
allow this: if the file is loaded using the <code>copy</code> loader.
That's because the <code>copy</code> loader behaves similarly to
<code>--external</code> in that the file is left external to the bundle.
The difference is that the <code>copy</code> loader copies the file into
the output folder and rewrites the import path while
<code>--external</code> doesn't. That means the following will now work
with the <code>copy</code> loader (such as with <code>--bundle
--loader:.bagel=copy</code>):</p>
<pre lang="js"><code>// This is no longer an error with
&quot;--bundle&quot; and &quot;--loader:.bagel=copy&quot;
import tasty from &quot;./tasty.bagel&quot; with { type:
&quot;bagel&quot; }
</code></pre>
</li>
<li>
<p>Support import attributes with glob-style imports (<a
href="https://redirect.github.com/evanw/esbuild/issues/3797">#3797</a>)</p>
<p>This release adds support for import attributes (the
<code>with</code> option) to glob-style imports (dynamic imports with
certain string literal patterns as paths). These imports previously
didn't support import attributes due to an oversight. So code like this
will now work correctly:</p>
<pre lang="ts"><code>async function loadLocale(locale: string): Locale {
const data = await import(`./locales/${locale}.data`, { with: { type:
'json' } })
  return unpackLocale(locale, data)
}
</code></pre>
<p>Previously this didn't work even though esbuild normally supports
forcing the JSON loader using an import attribute. Attempting to do this
used to result in the following error:</p>
<pre><code>✘ [ERROR] No loader is configured for &quot;.data&quot;
files: locales/en-US.data
<pre><code>example.ts:2:28:
2 │ const data = await import(`./locales/${locale}.data`, { with: {
type: 'json' } })
    ╵                             ~~~~~~~~~~~~~~~~~~~~~~~~~~
</code></pre>
<p></code></pre></p>
<p>In addition, this change means plugins can now access the contents of
<code>with</code> for glob-style imports.</p>
</li>
<li>
<p>Support <code>${configDir}</code> in <code>tsconfig.json</code> files
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3782">#3782</a>)</p>
<p>This adds support for a new feature from the upcoming TypeScript 5.5
release. The character sequence <code>${configDir}</code> is now
respected at the start of <code>baseUrl</code> and <code>paths</code>
values, which are used by esbuild during bundling to correctly map
import paths to file system paths. This feature lets base
<code>tsconfig.json</code> files specified via <code>extends</code>
refer to the directory of the top-level <code>tsconfig.json</code> file.
Here is an example:</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/blob/main/CHANGELOG-2023.md">esbuild's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog: 2023</h1>
<p>This changelog documents all esbuild versions published in the year
2023 (versions 0.16.13 through 0.19.11).</p>
<h2>0.19.11</h2>
<ul>
<li>
<p>Fix TypeScript-specific class transform edge case (<a
href="https://redirect.github.com/evanw/esbuild/issues/3559">#3559</a>)</p>
<p>The previous release introduced an optimization that avoided
transforming <code>super()</code> in the class constructor for
TypeScript code compiled with <code>useDefineForClassFields</code> set
to <code>false</code> if all class instance fields have no initializers.
The rationale was that in this case, all class instance fields are
omitted in the output so no changes to the constructor are needed.
However, if all of this is the case <em>and</em> there are
<code>#private</code> instance fields with initializers, those private
instance field initializers were still being moved into the constructor.
This was problematic because they were being inserted before the call to
<code>super()</code> (since <code>super()</code> is now no longer
transformed in that case). This release introduces an additional
optimization that avoids moving the private instance field initializers
into the constructor in this edge case, which generates smaller code,
matches the TypeScript compiler's output more closely, and avoids this
bug:</p>
<pre lang="ts"><code>// Original code
class Foo extends Bar {
  #private = 1;
  public: any;
  constructor() {
    super();
  }
}
<p>// Old output (with esbuild v0.19.9)
class Foo extends Bar {
constructor() {
super();
this.#private = 1;
}
#private;
}</p>
<p>// Old output (with esbuild v0.19.10)
class Foo extends Bar {
constructor() {
this.#private = 1;
super();
}
#private;
}</p>
<p>// New output
class Foo extends Bar {
#private = 1;
constructor() {
super();
}
}
</code></pre></p>
</li>
<li>
<p>Minifier: allow reording a primitive past a side-effect (<a
href="https://redirect.github.com/evanw/esbuild/issues/3568">#3568</a>)</p>
<p>The minifier previously allowed reordering a side-effect past a
primitive, but didn't handle the case of reordering a primitive past a
side-effect. This additional case is now handled:</p>
</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/evanw/esbuild/commit/fc37c2fa9de2ad77476a6d4a8f1516196b90187e"><code>fc37c2f</code></a>
publish 0.21.5 to npm</li>
<li><a
href="https://github.com/evanw/esbuild/commit/cb119249a19603b12fdf8df1c5a81c21420a1cb0"><code>cb11924</code></a>
fix <code>Symbol.metadata</code> errors in decorator tests</li>
<li><a
href="https://github.com/evanw/esbuild/commit/b93a2a95ac697f4aa01471e0a383a25626f1998e"><code>b93a2a9</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3781">#3781</a>:
add metadata to all decorated classes</li>
<li><a
href="https://github.com/evanw/esbuild/commit/953dae945b265df7d9728dbd961f7a27dce941cd"><code>953dae9</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3797">#3797</a>:
import attributes and glob-style import</li>
<li><a
href="https://github.com/evanw/esbuild/commit/98cb2ed72cfc4187f45fe1a6abe5417ad613356b"><code>98cb2ed</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3782">#3782</a>:
support <code>${configDir}</code> in tsconfig.json</li>
<li><a
href="https://github.com/evanw/esbuild/commit/8e6603b83f6be8de8204a7c5af755874f8b8da68"><code>8e6603b</code></a>
run <code>make update-compat-table</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/db1b8ca20f26091fbaebd5b4a8ce950de984e750"><code>db1b8ca</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3792">#3792</a>:
import attributes and the <code>copy</code> loader</li>
<li><a
href="https://github.com/evanw/esbuild/commit/de572d0e5363fef5457d3581ec340e481b139152"><code>de572d0</code></a>
fix non-deterministic import attribute plugin test</li>
<li><a
href="https://github.com/evanw/esbuild/commit/ae8d1b4f307b290bde0f17aceb51dd6f62eac64c"><code>ae8d1b4</code></a>
fix <a
href="https://redirect.github.com/evanw/esbuild/issues/3794">#3794</a>:
<code>--supported:object-accessors=false</code></li>
<li><a
href="https://github.com/evanw/esbuild/commit/67cbf87a4909d87a902ca8c3b69ab5330defab0a"><code>67cbf87</code></a>
publish 0.21.4 to npm</li>
<li>Additional commits viewable in <a
href="https://github.com/evanw/esbuild/compare/v0.18.20...v0.21.5">compare
view</a></li>
</ul>
</details>
<br />

Updates `js-yaml` from 4.1.0 to 4.1.1
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md">js-yaml's
changelog</a>.</em></p>
<blockquote>
<h2>[4.1.1] - 2025-11-12</h2>
<h3>Security</h3>
<ul>
<li>Fix prototype pollution issue in yaml merge (&lt;&lt;)
operator.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/nodeca/js-yaml/commit/cc482e775913e6625137572a3712d2826170e53a"><code>cc482e7</code></a>
4.1.1 released</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/50968b862e75866ef90e626572fe0b2f97b55f9f"><code>50968b8</code></a>
dist rebuild</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/d092d866031751cb27c12d93f3e2470ad74d678b"><code>d092d86</code></a>
lint fix</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/383665ff4248ec2192d1274e934462bb30426879"><code>383665f</code></a>
fix prototype pollution in merge (&lt;&lt;)</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/0d3ca7a27b03a6c974790a30a89e456007d62976"><code>0d3ca7a</code></a>
README.md: HTTP =&gt; HTTPS (<a
href="https://redirect.github.com/nodeca/js-yaml/issues/678">#678</a>)</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/49baadd52af887d2991e2c39a6639baa56d6c71b"><code>49baadd</code></a>
doc: 'empty' style option for !!null</li>
<li><a
href="https://github.com/nodeca/js-yaml/commit/ba3460eb9d3e4478edcbc29edabe17c2157fc9ce"><code>ba3460e</code></a>
Fix demo link (<a
href="https://redirect.github.com/nodeca/js-yaml/issues/618">#618</a>)</li>
<li>See full diff in <a
href="https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `micromatch` from 4.0.5 to 4.0.8
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/micromatch/releases">micromatch's
releases</a>.</em></p>
<blockquote>
<h2>4.0.8</h2>
<p>Ultimate release that fixes both CVE-2024-4067 and CVE-2024-4068. We
consider the issues low-priority, so even if you see automated scanners
saying otherwise, don't be scared.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/micromatch/micromatch/blob/master/CHANGELOG.md">micromatch's
changelog</a>.</em></p>
<blockquote>
<h2>[4.0.8] - 2024-08-22</h2>
<ul>
<li>backported CVE-2024-4067 fix (from v4.0.6) over to 4.x branch</li>
</ul>
<h2>[4.0.7] - 2024-05-22</h2>
<ul>
<li>this is basically v4.0.5, with some README updates</li>
<li><strong>it is vulnerable to CVE-2024-4067</strong></li>
<li>Updated braces to v3.0.3 to avoid CVE-2024-4068</li>
<li>does NOT break API compatibility</li>
</ul>
<h2>[4.0.6] - 2024-05-21</h2>
<ul>
<li>Added <code>hasBraces</code> to check if a pattern contains
braces.</li>
<li>Fixes CVE-2024-4067</li>
<li><strong>BREAKS API COMPATIBILITY</strong></li>
<li>Should be labeled as a major release, but it's not.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/micromatch/micromatch/commit/8bd704ec0d9894693d35da425d827819916be920"><code>8bd704e</code></a>
4.0.8</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/a0e68416a44da10f3e4e30845ab95af4fd286d5a"><code>a0e6841</code></a>
run verb to generate README documentation</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/4ec288484f6e8cccf597ad3d43529c31d0f7a02a"><code>4ec2884</code></a>
Merge branch 'v4' into hauserkristof-feature/v4.0.8</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/03aa8052171e878897eee5d7bb2ae0ae83ec2ade"><code>03aa805</code></a>
Merge pull request <a
href="https://redirect.github.com/micromatch/micromatch/issues/266">#266</a>
from hauserkristof/feature/v4.0.8</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/814f5f70efcd100ca9d29198867812a3d6ab91a8"><code>814f5f7</code></a>
lint</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/67fcce6a1077c2faf5ad0c5f998fa70202cc5dae"><code>67fcce6</code></a>
fix: CHANGELOG about braces &amp; CVE-2024-4068, v4.0.5</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/113f2e3fa7cb30b429eda7c4c38475a8e8ba1b30"><code>113f2e3</code></a>
fix: CVE numbers in CHANGELOG</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/d9dbd9a266686f44afb38da26fe016f96d1ec04f"><code>d9dbd9a</code></a>
feat: updated CHANGELOG</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/2ab13157f416679f54e3a32b1425e184bd16749e"><code>2ab1315</code></a>
fix: use actions/setup-node@v4</li>
<li><a
href="https://github.com/micromatch/micromatch/commit/1406ea38f3e24b29f4d4f46908d5cffcb3e6c4ce"><code>1406ea3</code></a>
feat: rework test to work on macos with node 10,12 and 14</li>
<li>Additional commits viewable in <a
href="https://github.com/micromatch/micromatch/compare/4.0.5...4.0.8">compare
view</a></li>
</ul>
</details>
<br />

Updates `nanoid` from 3.3.6 to 3.3.11
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/ai/nanoid/releases">nanoid's
releases</a>.</em></p>
<blockquote>
<h2>3.3.11</h2>
<ul>
<li>Fixed React Native support.</li>
</ul>
<h2>3.3.10</h2>
<ul>
<li>Fixed React Native support (by <a
href="https://github.com/steida"><code>@​steida</code></a>).</li>
</ul>
<h2>3.3.9</h2>
<ul>
<li>Reduced npm package size.</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/ai/nanoid/blob/main/CHANGELOG.md">nanoid's
changelog</a>.</em></p>
<blockquote>
<h2>3.3.11</h2>
<ul>
<li>Fixed React Native support.</li>
</ul>
<h2>3.3.10</h2>
<ul>
<li>Fixed React Native support (by <a
href="https://github.com/steida"><code>@​steida</code></a>).</li>
</ul>
<h2>3.3.9</h2>
<ul>
<li>Reduced npm package size.</li>
</ul>
<h2>3.3.8</h2>
<ul>
<li>Fixed a way to break Nano ID by passing non-integer size (by <a
href="https://github.com/myndzi"><code>@​myndzi</code></a>).</li>
</ul>
<h2>3.3.7</h2>
<ul>
<li>Fixed <code>node16</code> TypeScript support (by Saadi
Myftija).</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/ai/nanoid/commit/37289ceee51a3194a1f121a1e5d2bbb864076b74"><code>37289ce</code></a>
Release 3.3.11 version</li>
<li><a
href="https://github.com/ai/nanoid/commit/23690b77719ec8043c2509d28c1d74b0e2295b75"><code>23690b7</code></a>
Fix CI</li>
<li><a
href="https://github.com/ai/nanoid/commit/c147962de7f5da3311a0e731030a28f49c5266a3"><code>c147962</code></a>
Fix RN support</li>
<li><a
href="https://github.com/ai/nanoid/commit/a83734e28fa071f51fe3614a5fb891f08a4b91b2"><code>a83734e</code></a>
Move to manually ESM/CJS dual package</li>
<li><a
href="https://github.com/ai/nanoid/commit/bb12e8a6f9c37ebe0b5ff2c697b8f9dcf34c8948"><code>bb12e8a</code></a>
Release 3.3.10 version</li>
<li><a
href="https://github.com/ai/nanoid/commit/8f44264cd724080447f40620974163f1daca4612"><code>8f44264</code></a>
Fix Expo support</li>
<li><a
href="https://github.com/ai/nanoid/commit/adf9b0c05eeeebbbf391c16bbd93da2fc275e235"><code>adf9b0c</code></a>
Release 3.3.9 version</li>
<li><a
href="https://github.com/ai/nanoid/commit/1c6f08825b4f17c4462bd1c19dbc3f1c5626b76f"><code>1c6f088</code></a>
Remove dev file from npm package</li>
<li><a
href="https://github.com/ai/nanoid/commit/3044cd5e73f4cf31795f61f6e6b961c8c0a5c744"><code>3044cd5</code></a>
Release 3.3.8 version</li>
<li><a
href="https://github.com/ai/nanoid/commit/4fe34959c34e5b3573889ed4f24fe91d1d3e7231"><code>4fe3495</code></a>
Update size limit</li>
<li>Additional commits viewable in <a
href="https://github.com/ai/nanoid/compare/3.3.6...3.3.11">compare
view</a></li>
</ul>
</details>
<br />

Updates `lodash` from 4.17.21 to 4.17.23
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/lodash/lodash/commit/dec55b7a3b382da075e2eac90089b4cd00a26cbb"><code>dec55b7</code></a>
Bump main to v4.17.23 (<a
href="https://redirect.github.com/lodash/lodash/issues/6088">#6088</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/19c9251b3631d7cf220b43bc757eb33f1084f117"><code>19c9251</code></a>
fix: setCacheHas JSDoc return type should be boolean (<a
href="https://redirect.github.com/lodash/lodash/issues/6071">#6071</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/b5e672995ae26929d111a6e94589f8d03fb8e578"><code>b5e6729</code></a>
jsdoc: Add -0 and BigInt zeros to _.compact falsey values list (<a
href="https://redirect.github.com/lodash/lodash/issues/6062">#6062</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/edadd452146f7e4bad4ea684e955708931d84d81"><code>edadd45</code></a>
Prevent prototype pollution on baseUnset function</li>
<li><a
href="https://github.com/lodash/lodash/commit/4879a7a7d0a4494b0e83c7fa21bcc9fc6e7f1a6d"><code>4879a7a</code></a>
doc: fix autoLink function, conversion of source links (<a
href="https://redirect.github.com/lodash/lodash/issues/6056">#6056</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/9648f692b0fc7c2f6a7a763d754377200126c2e8"><code>9648f69</code></a>
chore: remove <code>yarn.lock</code> file (<a
href="https://redirect.github.com/lodash/lodash/issues/6053">#6053</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/dfa407db0bf5b200f2c7a9e4f06830ceaf074be9"><code>dfa407d</code></a>
ci: remove legacy configuration files (<a
href="https://redirect.github.com/lodash/lodash/issues/6052">#6052</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/156e1965ae78b121a88f81178ab81632304e8d64"><code>156e196</code></a>
feat: add renovate setup (<a
href="https://redirect.github.com/lodash/lodash/issues/6039">#6039</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/933e1061b8c344d3fc742cdc400175d5ffc99bce"><code>933e106</code></a>
ci: add pipeline for Bun (<a
href="https://redirect.github.com/lodash/lodash/issues/6023">#6023</a>)</li>
<li><a
href="https://github.com/lodash/lodash/commit/072a807ff7ad8ffc7c1d2c3097266e815d138e20"><code>072a807</code></a>
docs: update links related to Open JS Foundation (<a
href="https://redirect.github.com/lodash/lodash/issues/5968">#5968</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/lodash/lodash/compare/4.17.21...4.17.23">compare
view</a></li>
</ul>
</details>
<br />

Updates `vite` from 4.5.14 to 5.4.21
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/releases">vite's
releases</a>.</em></p>
<blockquote>
<h2>v5.4.21</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.20</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/ca88ed7398288ce0c60176ac9a6392f10654c67c/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
<h2>v5.4.19</h2>
<p>Please refer to <a
href="https://github.com/vitejs/vite/blob/v5.4.19/packages/vite/CHANGELOG.md">CHANGELOG.md</a>
for details.</p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/vitejs/vite/blob/v5.4.21/packages/vite/CHANGELOG.md">vite's
changelog</a>.</em></p>
<blockquote>
<h2><!-- raw HTML omitted -->5.4.21 (2025-10-20)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix(dev): trim trailing slash before <code>server.fs.deny</code>
check (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)
(<a
href="https://github.com/vitejs/vite/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c">cad1d31</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20968">#20968</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/20970">#20970</a></li>
<li>chore: update CHANGELOG (<a
href="https://github.com/vitejs/vite/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c">ca88ed7</a>)</li>
</ul>
<h2><!-- raw HTML omitted -->5.4.20 (2025-09-08)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)
(<a
href="https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea">482000f</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20736">#20736</a></li>
<li>fix: port sirv@3.0.2 changes to sirv@2.0.4 (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20737">#20737</a>)
(<a
href="https://github.com/vitejs/vite/commit/4f1c35bcbb5830290c694aa14b6789e07450f069">4f1c35b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/20737">#20737</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.19 (2025-04-30)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>,
check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19966">#19966</a>)
(<a
href="https://github.com/vitejs/vite/commit/766947e7cbf1cdd07df9737394e8c870401b78b0">766947e</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19965">#19965</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19966">#19966</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.18 (2025-04-10)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)
(<a
href="https://github.com/vitejs/vite/commit/823675baff2bd6809c74ba2d9acca0327923a54f">823675b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19830">#19830</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19831">#19831</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.17 (2025-04-03)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19782">#19782</a>,
fs check with svg and relative paths (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19784">#19784</a>)
(<a
href="https://github.com/vitejs/vite/commit/84b2b46ed129be8215108e789a90adbb33a9c42c">84b2b46</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19782">#19782</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19784">#19784</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.16 (2025-03-31)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19761">#19761</a>,
fs check in transform middleware (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19762">#19762</a>)
(<a
href="https://github.com/vitejs/vite/commit/b627c50d359f3bd9b602408fbbf462cf4a2f019c">b627c50</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19761">#19761</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19762">#19762</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.15 (2025-03-24)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19702">#19702</a>,
fs raw query with query separators (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19703">#19703</a>)
(<a
href="https://github.com/vitejs/vite/commit/807d7f06d33ab49c48a2a3501da3eea1906c0d41">807d7f0</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19702">#19702</a>
<a
href="https://redirect.github.com/vitejs/vite/issues/19703">#19703</a></li>
</ul>
<h2><!-- raw HTML omitted -->5.4.14 (2025-01-21)<!-- raw HTML omitted
--></h2>
<ul>
<li>fix: <code>preview.allowedHosts</code> with specific values was not
respected (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19246">#19246</a>)
(<a
href="https://github.com/vitejs/vite/commit/9df6e6beabf0d18988ec13b8b742d2aba29662f9">9df6e6b</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19246">#19246</a></li>
<li>fix: allow CORS from loopback addresses by default (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19249">#19249</a>)
(<a
href="https://github.com/vitejs/vite/commit/7d1699ccf673e2790704756d89d2e1e4ee478fb4">7d1699c</a>),
closes <a
href="https://redirect.github.com/vitejs/vite/issues/19249">#19249</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/vitejs/vite/commit/adce3c22c64cc9d44cc8f45cc92b543e3e4bf385"><code>adce3c2</code></a>
release: v5.4.21</li>
<li><a
href="https://github.com/vitejs/vite/commit/cad1d31d0635dd8fd4ddfe6e5a92eb9ff13cd06c"><code>cad1d31</code></a>
fix(dev): trim trailing slash before <code>server.fs.deny</code> check
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20968">#20968</a>)
(<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20970">#20970</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/ca88ed7398288ce0c60176ac9a6392f10654c67c"><code>ca88ed7</code></a>
chore: update CHANGELOG</li>
<li><a
href="https://github.com/vitejs/vite/commit/997700f01c7199daf7330d33a7fd3a43b2e9e3ba"><code>997700f</code></a>
release: v5.4.20</li>
<li><a
href="https://github.com/vitejs/vite/commit/482000f57f56fe6ff2e905305100cfe03043ddea"><code>482000f</code></a>
fix: apply <code>fs.strict</code> check to HTML files (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/20736">#20736</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/80a333a23103ced0442d4463d1191433d90f5e19"><code>80a333a</code></a>
release: v5.4.19</li>
<li><a
href="https://github.com/vitejs/vite/commit/766947e7cbf1cdd07df9737394e8c870401b78b0"><code>766947e</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19965">#19965</a>,
check static serve file inside sirv (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19966">#19966</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/731b77d19d36f5682a5441b49cb2f6473389ad99"><code>731b77d</code></a>
release: v5.4.18</li>
<li><a
href="https://github.com/vitejs/vite/commit/823675baff2bd6809c74ba2d9acca0327923a54f"><code>823675b</code></a>
fix: backport <a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19830">#19830</a>,
reject requests with <code>#</code> in request-target (<a
href="https://github.com/vitejs/vite/tree/HEAD/packages/vite/issues/19831">#19831</a>)</li>
<li><a
href="https://github.com/vitejs/vite/commit/0a2518a98d2354c61ee8ef51f7d00fa92aebb511"><code>0a2518a</code></a>
release: v5.4.17</li>
<li>Additional commits viewable in <a
href="https://github.com/vitejs/vite/commits/v5.4.21/packages/vite">compare
view</a></li>
</ul>
</details>
<br />

Updates `@babel/helpers` from 7.23.2 to 7.28.6
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/babel/babel/releases"><code>@​babel/helpers</code>'s
releases</a>.</em></p>
<blockquote>
<h2>v7.28.6 (2026-01-12)</h2>
<p>Thanks <a
href="https://github.com/kadhirash"><code>@​kadhirash</code></a> and <a
href="https://github.com/kolvian"><code>@​kolvian</code></a> for your
first PRs!</p>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-cli</code>, <code>babel-code-frame</code>,
<code>babel-core</code>,
<code>babel-helper-check-duplicate-nodes</code>,
<code>babel-helper-fixtures</code>,
<code>babel-helper-plugin-utils</code>, <code>babel-node</code>,
<code>babel-plugin-transform-flow-comments</code>,
<code>babel-plugin-transform-modules-commonjs</code>,
<code>babel-plugin-transform-property-mutators</code>,
<code>babel-preset-env</code>, <code>babel-traverse</code>,
<code>babel-types</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17589">#17589</a>
Improve Unicode handling in code-frame tokenizer (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-regenerator</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17556">#17556</a>
fix: <code>transform-regenerator</code> correctly handles scope (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-transform-react-jsx</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17538">#17538</a>
fix: Keep jsx comments (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>💅 Polish</h4>
<ul>
<li><code>babel-core</code>, <code>babel-standalone</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17606">#17606</a>
Polish(standalone): improve message on invalid preset/plugin (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏠 Internal</h4>
<ul>

<li><code>babel-plugin-bugfix-v8-static-class-fields-redefine-readonly</code>,
<code>babel-plugin-proposal-decorators</code>,
<code>babel-plugin-proposal-import-attributes-to-assertions</code>,
<code>babel-plugin-proposal-import-wasm-source</code>,
<code>babel-plugin-syntax-async-do-expressions</code>,
<code>babel-plugin-syntax-decorators</code>,
<code>babel-plugin-syntax-destructuring-private</code>,
<code>babel-plugin-syntax-do-expressions</code>,
<code>babel-plugin-syntax-explicit-resource-management</code>,
<code>babel-plugin-syntax-export-default-from</code>,
<code>babel-plugin-syntax-flow</code>,
<code>babel-plugin-syntax-function-bind</code>,
<code>babel-plugin-syntax-function-sent</code>,
<code>babel-plugin-syntax-import-assertions</code>,
<code>babel-plugin-syntax-import-attributes</code>,
<code>babel-plugin-syntax-import-defer</code>,
<code>babel-plugin-syntax-import-source</code>,
<code>babel-plugin-syntax-jsx</code>,
<code>babel-plugin-syntax-module-blocks</code>,
<code>babel-plugin-syntax-optional-chaining-assign</code>,
<code>babel-plugin-syntax-partial-application</code>,
<code>babel-plugin-syntax-pipeline-operator</code>,
<code>babel-plugin-syntax-throw-expressions</code>,
<code>babel-plugin-syntax-typescript</code>,
<code>babel-plugin-transform-async-generator-functions</code>,
<code>babel-plugin-transform-async-to-generator</code>,
<code>babel-plugin-transform-class-properties</code>,
<code>babel-plugin-transform-class-static-block</code>,
<code>babel-plugin-transform-dotall-regex</code>,
<code>babel-plugin-transform-duplicate-named-capturing-groups-regex</code>,
<code>babel-plugin-transform-explicit-resource-management</code>,
<code>babel-plugin-transform-exponentiation-operator</code>,
<code>babel-plugin-transform-json-strings</code>,
<code>babel-plugin-transform-logical-assignment-operators</code>,
<code>babel-plugin-transform-nullish-coalescing-operator</code>,
<code>babel-plugin-transform-numeric-separator</code>,
<code>babel-plugin-transform-object-rest-spread</code>,
<code>babel-plugin-transform-optional-catch-binding</code>,
<code>babel-plugin-transform-optional-chaining</code>,
<code>babel-plugin-transform-private-methods</code>,
<code>babel-plugin-transform-private-property-in-object</code>,
<code>babel-plugin-transform-regexp-modifiers</code>,
<code>babel-plugin-transform-unicode-property-regex</code>,
<code>babel-plugin-transform-unicode-sets-regex</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17580">#17580</a>
Allow Babel 8 in compatible Babel 7 plugins (<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
</ul>
</li>
</ul>
<h4>🏃‍♀️ Performance</h4>
<ul>
<li><code>babel-plugin-transform-react-jsx</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17555">#17555</a>
perf: Use lighter traversal for jsx <code>__source,__self</code> (<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
</ul>
<h4>Committers: 7</h4>
<ul>
<li>Babel Bot (<a
href="https://github.com/babel-bot"><code>@​babel-bot</code></a>)</li>
<li>Eliot Pontarelli (<a
href="https://github.com/kolvian"><code>@​kolvian</code></a>)</li>
<li>Huáng Jùnliàng (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li>Kadhirash Sivakumar (<a
href="https://github.com/kadhirash"><code>@​kadhirash</code></a>)</li>
<li>Nicolò Ribaudo (<a
href="https://github.com/nicolo-ribaudo"><code>@​nicolo-ribaudo</code></a>)</li>
<li><a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a></li>
<li>coderaiser (<a
href="https://github.com/coderaiser"><code>@​coderaiser</code></a>)</li>
</ul>
<h2>v7.28.5 (2025-10-23)</h2>
<p>Thank you <a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>, <a
href="https://github.com/Olexandr88"><code>@​Olexandr88</code></a>, and
<a href="https://github.com/youthfulhps"><code>@​youthfulhps</code></a>
for your first PRs!</p>
<h4>👓 Spec Compliance</h4>
<ul>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17446">#17446</a>
Allow <code>Runtime Errors for Function Call Assignment Targets</code>
(<a
href="https://github.com/liuxingbaoyu"><code>@​liuxingbaoyu</code></a>)</li>
</ul>
</li>
<li><code>babel-helper-validator-identifier</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17501">#17501</a>
fix: update identifier to unicode 17 (<a
href="https://github.com/fisker"><code>@​fisker</code></a>)</li>
</ul>
</li>
</ul>
<h4>🐛 Bug Fix</h4>
<ul>
<li><code>babel-plugin-proposal-destructuring-private</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17534">#17534</a>
Allow mixing private destructuring and rest (<a
href="https://github.com/CO0Ki3"><code>@​CO0Ki3</code></a>)</li>
</ul>
</li>
<li><code>babel-parser</code>
<ul>
<li><a
href="https://redirect.github.com/babel/babel/pull/17521">#17521</a>
Improve <code>@babel/parser</code> error typing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
<li><a
href="https://redirect.github.com/babel/babel/pull/17491">#17491</a>
fix: improve ts-only declaration parsing (<a
href="https://github.com/JLHwung"><code>@​JLHwung</code></a>)</li>
</ul>
</li>
<li><code>babel-plugin-proposal-discard-binding</code>,
<code>babel-plugin-transform-destructuring</code></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/babel/babel/commit/d7f400889567ae18ef9ac41b024b5120f6060e17"><code>d7f4008</code></a>
v7.28.6</li>
<li><a
href="https://github.com/babel/babel/commit/99dcba5e71de3bd81ce14077cfa5b6df58e9b177"><code>99dcba5</code></a>
chore: enable some ts-eslint rules (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17592">#17592</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/c1b55f6ad56523ccc96fa68721de0bed2f2cdb23"><code>c1b55f6</code></a>
Use <code>eslint.config.mts</code> (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17573">#17573</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/35055e392079a65830b7bf5b1d1c1fc4de90a78f"><code>35055e3</code></a>
v7.28.4</li>
<li><a
href="https://github.com/babel/babel/commit/18d88b83c67c8dbbe63e4ac423e6006c4c01b85c"><code>18d88b8</code></a>
Improve <code>@​babel/core</code> typings (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17471">#17471</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/ef155f5ca83c73dbc1ea8d95216830b7dc3b0ac2"><code>ef155f5</code></a>
v7.28.3</li>
<li><a
href="https://github.com/babel/babel/commit/741cbd2381ac0cda3afd42bc04454a87d9d8762a"><code>741cbd2</code></a>
chore: fix various typos across codebase (<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17476">#17476</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/cac0ff4c3426eed30b4d27e7971b348da7c9f1e6"><code>cac0ff4</code></a>
v7.28.2</li>
<li><a
href="https://github.com/babel/babel/commit/f743094585b39bd9f7a9e3a3561215b2103e2474"><code>f743094</code></a>
fix: <code>regeneratorDefine</code> compatibility with es5 strict mode
(<a
href="https://github.com/babel/babel/tree/HEAD/packages/babel-helpers/issues/17441">#17441</a>)</li>
<li><a
href="https://github.com/babel/babel/commit/baa4cb8b9f8a551d7dae9042b19ea2f74df6b110"><code>baa4cb8</code></a>
v7.27.6</li>
<li>Additional commits viewable in <a
href="https://github.com/babel/babel/commits/v7.28.6/packages/babel-helpers">compare
view</a></li>
</ul>
</details>
<details>
<summary>Maintainer changes</summary>
<p>This version was pushed to npm by [GitHub Actions](<a
href="https://www.npmjs.com/~GitHub">https://www.npmjs.com/~GitHub</a>
Actions), a new releaser for <code>@​babel/helpers</code> since your
current version.</p>
</details>
<br />

Updates `brace-expansion` from 1.1.11 to 1.1.12
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/juliangruber/brace-expansion/releases">brace-expansion's
releases</a>.</em></p>
<blockquote>
<h2>v1.1.12</h2>
<ul>
<li>pkg: publish on tag 1.x  c460dbd</li>
<li>fmt  ccb8ac6</li>
<li>Fix potential ReDoS Vulnerability or Inefficient Regular Expression
(<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/65">#65</a>)
c3c73c8</li>
</ul>
<hr />
<p><a
href="https://github.com/juliangruber/brace-expansion/compare/v1.1.11...v1.1.12">https://github.com/juliangruber/brace-expansion/compare/v1.1.11...v1.1.12</a></p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/44f33b47c5c6a965d507421af43e86cf5971d711"><code>44f33b4</code></a>
1.1.12</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/c460dbd68e428d147b2080622d8ce126c7a08570"><code>c460dbd</code></a>
pkg: publish on tag 1.x</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/ccb8ac6d4292b7661b677fe048ba6690c877f51f"><code>ccb8ac6</code></a>
fmt</li>
<li><a
href="https://github.com/juliangruber/brace-expansion/commit/c3c73c8b088defc70851843be88ccc3af08e7217"><code>c3c73c8</code></a>
Fix potential ReDoS Vulnerability or Inefficient Regular Expression (<a
href="https://redirect.github.com/juliangruber/brace-expansion/issues/65">#65</a>)</li>
<li>See full diff in <a
href="https://github.com/juliangruber/brace-expansion/compare/1.1.11...v1.1.12">compare
view</a></li>
</ul>
</details>
<br />

Updates `esbuild` from 0.18.20 to 0.21.5
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/evanw/esbuild/releases">esbuild's
releases</a>.</em></p>
<blockquote>
<h2>v0.21.5</h2>
<ul>
<li>
<p>Fix <code>Symbol.metadata</code> on classes without a class decorator
(<a
href="https://redirect.github.com/evanw/esbuild/issues/3781">#3781</a>)</p>
<p>This release fixes a bug with esbuild's support for the <a
href="https://github.com/tc39/proposal-decorator-metadata">decorator
metadata proposal</a>. Previously esbuild only added the
<code>Symbol.metadata</code> property to decorated classes if there was
a decorator on the class element itself. However, the proposal says that
the <code>Symbol.metadata</code> property should be present on all
classes that have any decorators at all, not just those with a decorator
on the class element itself.</p>
</li>
<li>
<p>Allow unknown import attributes to be used with the <code>copy</code>
loader (<a href="https://redirect.github.com/ev...

_Description has been truncated_

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:59:34 -08:00
dependabot[bot] 243b9ed35e Bump langchain-core from 0.3.78 to 0.3.83 (#849)
Bumps [langchain-core](https://github.com/langchain-ai/langchain) from
0.3.78 to 0.3.83.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/langchain-ai/langchain/releases">langchain-core's
releases</a>.</em></p>
<blockquote>
<h2>langchain-core==0.3.83</h2>
<p>Changes since langchain-core==0.3.82</p>
<p>release(core): 0.3.83 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34733">#34733</a>)
feat(core,langchain,text-splitters): (v0.3) use uuid7 for run ids (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34732">#34732</a>)</p>
<h2>langchain-core==0.3.82</h2>
<p>Changes since langchain-core==0.3.81</p>
<p>release(core): 0.3.82 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34688">#34688</a>)
fix(core): defer persisting traces for iterator inputs (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34687">#34687</a>)
feat(core): add <code>usage_metadata</code> to metadata in
<code>LangChainTracer</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34686">#34686</a>)</p>
<h2>langchain-core==0.3.81</h2>
<p>Changes since langchain-core==0.3.80</p>
<p>release(core): 0.3.81 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34459">#34459</a>)
fix(core): serialization patch (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34458">#34458</a>)</p>
<h2>langchain-core==0.3.80</h2>
<p>Changes since langchain-core==0.3.79</p>
<p>release(core): 0.3.80 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34039">#34039</a>)
fix(core): fix validation for input variables in f-string templates,
restrict functionality supported by jinja2, mustache templates
(GHSA-6qv9-48xg-fc7f) (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34038">#34038</a>)</p>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/langchain-ai/langchain/commit/c0e2f08f789feac9447325583fef0efbd85eb858"><code>c0e2f08</code></a>
release(core): 0.3.83 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34733">#34733</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/4dab5fafc01cfaddfeac6f5b139b4d58bacb1a40"><code>4dab5fa</code></a>
feat(core,langchain,text-splitters): (v0.3) use uuid7 for run ids (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34732">#34732</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/e6dde2b99c7aadd42d348288540954dded975bb3"><code>e6dde2b</code></a>
release(core): 0.3.82 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34688">#34688</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/126a337082bd019a39a9eee84264a2de556aca29"><code>126a337</code></a>
fix(core): defer persisting traces for iterator inputs (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34687">#34687</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/13c13c4bac6f94a08120b4c7cef58af9dfff105c"><code>13c13c4</code></a>
feat(core): add <code>usage_metadata</code> to metadata in
<code>LangChainTracer</code> (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34686">#34686</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/6dc06da1bb2f3781844895c259a67e40bc598f19"><code>6dc06da</code></a>
release(core): 0.3.81 (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34459">#34459</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/d9ec4c5cc78960abd37da79b0250f5642e6f0ce6"><code>d9ec4c5</code></a>
fix(core): serialization patch (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34458">#34458</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/d62d77925cce59a15bcb8287babe1ad10f1cbe18"><code>d62d779</code></a>
fix(docs): add redirects (<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34411">#34411</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/7ab4a7841a2fe77e3b305c876e3e1eb31d2a9fce"><code>7ab4a78</code></a>
chore(infra): properly disable testing for 0.3 against latest packages
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34041">#34041</a>)</li>
<li><a
href="https://github.com/langchain-ai/langchain/commit/6e968fd23c76e0676d29776ff48bd583ad1e1839"><code>6e968fd</code></a>
chore(infra): disable integration tests temporarily when releasing v0.3
(<a
href="https://redirect.github.com/langchain-ai/langchain/issues/34040">#34040</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/langchain-ai/langchain/compare/langchain-core==0.3.78...langchain-core==0.3.83">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=langchain-core&package-manager=pip&previous-version=0.3.78&new-version=0.3.83)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:59:15 -08:00
dependabot[bot] 7a89867dd2 Bump fastapi from 0.118.0 to 0.128.4 (#847)
Bumps [fastapi](https://github.com/fastapi/fastapi) from 0.118.0 to
0.128.4.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/fastapi/fastapi/releases">fastapi's
releases</a>.</em></p>
<blockquote>
<h2>0.128.4</h2>
<h3>Refactors</h3>
<ul>
<li>♻️ Refactor internals, simplify Pydantic v2/v1 utils,
<code>create_model_field</code>, better types for
<code>lenient_issubclass</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14860">#14860</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>♻️ Simplify internals, remove Pydantic v1 only logic, no longer
needed. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14857">#14857</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>♻️ Refactor internals, cleanup unneeded Pydantic v1 specific logic.
PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14856">#14856</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Translations</h3>
<ul>
<li>🌐 Update translations for fr (outdated pages). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14839">#14839</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
<li>🌐 Update translations for tr (outdated and missing). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14838">#14838</a>
by <a
href="https://github.com/YuriiMotov"><code>@​YuriiMotov</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>⬆️ Upgrade development dependencies. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14854">#14854</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h2>0.128.3</h2>
<h3>Refactors</h3>
<ul>
<li>♻️ Re-implement <code>on_event</code> in FastAPI for compatibility
with the next Starlette, while keeping backwards compatibility. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14851">#14851</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Upgrades</h3>
<ul>
<li>⬆️ Upgrade Starlette supported version range to
<code>starlette&gt;=0.40.0,&lt;1.0.0</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14853">#14853</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Translations</h3>
<ul>
<li>🌐 Update translations for ru (update-outdated). PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14834">#14834</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h3>Internal</h3>
<ul>
<li>👷 Run tests with Starlette from git. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14849">#14849</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>👷 Run tests with lower bound uv sync, upgrade
<code>fastapi[all]</code> minimum dependencies: <code>ujson
&gt;=5.8.0</code>, <code>orjson &gt;=3.9.3</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14846">#14846</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
</ul>
<h2>0.128.2</h2>
<h3>Features</h3>
<ul>
<li> Add support for PEP695 <code>TypeAliasType</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/13920">#13920</a>
by <a href="https://github.com/cstruct"><code>@​cstruct</code></a>.</li>
<li> Allow <code>Response</code> type hint as dependency annotation. PR
<a
href="https://redirect.github.com/fastapi/fastapi/pull/14794">#14794</a>
by <a
href="https://github.com/jonathan-fulton"><code>@​jonathan-fulton</code></a>.</li>
</ul>
<h3>Fixes</h3>
<ul>
<li>🐛 Fix using <code>Json[list[str]]</code> type (issue <a
href="https://redirect.github.com/fastapi/fastapi/issues/10997">#10997</a>).
PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14616">#14616</a>
by <a
href="https://github.com/mkanetsuna"><code>@​mkanetsuna</code></a>.</li>
</ul>
<h3>Docs</h3>
<ul>
<li>📝 Update docs for translations. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14830">#14830</a>
by <a
href="https://github.com/tiangolo"><code>@​tiangolo</code></a>.</li>
<li>📝 Fix duplicate word in <code>advanced-dependencies.md</code>. PR <a
href="https://redirect.github.com/fastapi/fastapi/pull/14815">#14815</a>
by <a
href="https://github.com/Rayyan-Oumlil"><code>@​Rayyan-Oumlil</code></a>.</li>
</ul>
<h3>Translations</h3>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/fastapi/fastapi/commit/8eac94bd91c212a2aab676acd7f8e94cd3097dd0"><code>8eac94b</code></a>
🔖 Release version 0.128.4</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/58cdfc7f4b1ad22a4e6450319affb42d185775d9"><code>58cdfc7</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/d59fbc3494940c9afe675cc89271bd0fa744574f"><code>d59fbc3</code></a>
♻️ Refactor internals, simplify Pydantic v2/v1 utils,
<code>create_model_field</code>, b...</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/cc6ced6345f6be18038437b73866294697294f3e"><code>cc6ced6</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/cf55bade7ea6e4bf85a167e8aed1c6167e7a4196"><code>cf55bad</code></a>
♻️ Simplify internals, remove Pydantic v1 only logic, no longer needed
(<a
href="https://redirect.github.com/fastapi/fastapi/issues/14857">#14857</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/ac8362c447b94247e9f7268c3d1e2807818647ae"><code>ac8362c</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/3c49346238643287780d9f0d673f88b0d02df109"><code>3c49346</code></a>
♻️ Refactor internals, cleanup unneeded Pydantic v1 specific logic (<a
href="https://redirect.github.com/fastapi/fastapi/issues/14856">#14856</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/512c3ad88c8f03a03154df317c65aa0ca4f1f78d"><code>512c3ad</code></a>
📝 Update release notes</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/cba537ab717ff205857a0eb877c69e79cfd06a51"><code>cba537a</code></a>
🌐 Update translations for fr (outdated pages) (<a
href="https://redirect.github.com/fastapi/fastapi/issues/14839">#14839</a>)</li>
<li><a
href="https://github.com/fastapi/fastapi/commit/2eb454ab04e81325ed430a036103e4aede299d61"><code>2eb454a</code></a>
📝 Update release notes</li>
<li>Additional commits viewable in <a
href="https://github.com/fastapi/fastapi/compare/0.118.0...0.128.4">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=fastapi&package-manager=pip&previous-version=0.118.0&new-version=0.128.4)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:58:59 -08:00
dependabot[bot] 56e0d5dc9c Bump jupyterlab from 3.6.8 to 4.5.3 (#845)
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=jupyterlab&package-manager=pip&previous-version=3.6.8&new-version=4.5.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:51:15 -08:00
dependabot[bot] 6c255acd8f Bump actions/checkout from 3 to 6 (#842)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to
6.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/releases">actions/checkout's
releases</a>.</em></p>
<blockquote>
<h2>v6.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>v6-beta by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2298">actions/checkout#2298</a></li>
<li>update readme/changelog for v6 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2311">actions/checkout#2311</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5.0.0...v6.0.0">https://github.com/actions/checkout/compare/v5.0.0...v6.0.0</a></p>
<h2>v6-beta</h2>
<h2>What's Changed</h2>
<p>Updated persist-credentials to store the credentials under
<code>$RUNNER_TEMP</code> instead of directly in the local git
config.</p>
<p>This requires a minimum Actions Runner version of <a
href="https://github.com/actions/runner/releases/tag/v2.329.0">v2.329.0</a>
to access the persisted credentials for <a
href="https://docs.github.com/en/actions/tutorials/use-containerized-services/create-a-docker-container-action">Docker
container action</a> scenarios.</p>
<h2>v5.0.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v5...v5.0.1">https://github.com/actions/checkout/compare/v5...v5.0.1</a></p>
<h2>v5.0.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
<li>Prepare v5.0.0 release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2238">actions/checkout#2238</a></li>
</ul>
<h2>⚠️ Minimum Compatible Runner Version</h2>
<p><strong>v2.327.1</strong><br />
<a
href="https://github.com/actions/runner/releases/tag/v2.327.1">Release
Notes</a></p>
<p>Make sure your runner is updated to this version or newer to use this
release.</p>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4...v5.0.0">https://github.com/actions/checkout/compare/v4...v5.0.0</a></p>
<h2>v4.3.1</h2>
<h2>What's Changed</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/checkout/compare/v4...v4.3.1">https://github.com/actions/checkout/compare/v4...v4.3.1</a></p>
<h2>v4.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/checkout/blob/main/CHANGELOG.md">actions/checkout's
changelog</a>.</em></p>
<blockquote>
<h1>Changelog</h1>
<h2>v6.0.2</h2>
<ul>
<li>Fix tag handling: preserve annotations and explicit fetch-tags by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2356">actions/checkout#2356</a></li>
</ul>
<h2>v6.0.1</h2>
<ul>
<li>Add worktree support for persist-credentials includeIf by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2327">actions/checkout#2327</a></li>
</ul>
<h2>v6.0.0</h2>
<ul>
<li>Persist creds to a separate file by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2286">actions/checkout#2286</a></li>
<li>Update README to include Node.js 24 support details and requirements
by <a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2248">actions/checkout#2248</a></li>
</ul>
<h2>v5.0.1</h2>
<ul>
<li>Port v6 cleanup to v5 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2301">actions/checkout#2301</a></li>
</ul>
<h2>v5.0.0</h2>
<ul>
<li>Update actions checkout to use node 24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2226">actions/checkout#2226</a></li>
</ul>
<h2>v4.3.1</h2>
<ul>
<li>Port v6 cleanup to v4 by <a
href="https://github.com/ericsciple"><code>@​ericsciple</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2305">actions/checkout#2305</a></li>
</ul>
<h2>v4.3.0</h2>
<ul>
<li>docs: update README.md by <a
href="https://github.com/motss"><code>@​motss</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1971">actions/checkout#1971</a></li>
<li>Add internal repos for checking out multiple repositories by <a
href="https://github.com/mouismail"><code>@​mouismail</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1977">actions/checkout#1977</a></li>
<li>Documentation update - add recommended permissions to Readme by <a
href="https://github.com/benwells"><code>@​benwells</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2043">actions/checkout#2043</a></li>
<li>Adjust positioning of user email note and permissions heading by <a
href="https://github.com/joshmgross"><code>@​joshmgross</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2044">actions/checkout#2044</a></li>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2194">actions/checkout#2194</a></li>
<li>Update CODEOWNERS for actions by <a
href="https://github.com/TingluoHuang"><code>@​TingluoHuang</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/2224">actions/checkout#2224</a></li>
<li>Update package dependencies by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/2236">actions/checkout#2236</a></li>
</ul>
<h2>v4.2.2</h2>
<ul>
<li><code>url-helper.ts</code> now leverages well-known environment
variables by <a href="https://github.com/jww3"><code>@​jww3</code></a>
in <a
href="https://redirect.github.com/actions/checkout/pull/1941">actions/checkout#1941</a></li>
<li>Expand unit test coverage for <code>isGhes</code> by <a
href="https://github.com/jww3"><code>@​jww3</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1946">actions/checkout#1946</a></li>
</ul>
<h2>v4.2.1</h2>
<ul>
<li>Check out other refs/* by commit if provided, fall back to ref by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1924">actions/checkout#1924</a></li>
</ul>
<h2>v4.2.0</h2>
<ul>
<li>Add Ref and Commit outputs by <a
href="https://github.com/lucacome"><code>@​lucacome</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1180">actions/checkout#1180</a></li>
<li>Dependency updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a>- <a
href="https://redirect.github.com/actions/checkout/pull/1777">actions/checkout#1777</a>,
<a
href="https://redirect.github.com/actions/checkout/pull/1872">actions/checkout#1872</a></li>
</ul>
<h2>v4.1.7</h2>
<ul>
<li>Bump the minor-npm-dependencies group across 1 directory with 4
updates by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1739">actions/checkout#1739</a></li>
<li>Bump actions/checkout from 3 to 4 by <a
href="https://github.com/dependabot"><code>@​dependabot</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1697">actions/checkout#1697</a></li>
<li>Check out other refs/* by commit by <a
href="https://github.com/orhantoy"><code>@​orhantoy</code></a> in <a
href="https://redirect.github.com/actions/checkout/pull/1774">actions/checkout#1774</a></li>
<li>Pin actions/checkout's own workflows to a known, good, stable
version. by <a href="https://github.com/jww3"><code>@​jww3</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1776">actions/checkout#1776</a></li>
</ul>
<h2>v4.1.6</h2>
<ul>
<li>Check platform to set archive extension appropriately by <a
href="https://github.com/cory-miller"><code>@​cory-miller</code></a> in
<a
href="https://redirect.github.com/actions/checkout/pull/1732">actions/checkout#1732</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/checkout/commit/de0fac2e4500dabe0009e67214ff5f5447ce83dd"><code>de0fac2</code></a>
Fix tag handling: preserve annotations and explicit fetch-tags (<a
href="https://redirect.github.com/actions/checkout/issues/2356">#2356</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/064fe7f3312418007dea2b49a19844a9ee378f49"><code>064fe7f</code></a>
Add orchestration_id to git user-agent when ACTIONS_ORCHESTRATION_ID is
set (...</li>
<li><a
href="https://github.com/actions/checkout/commit/8e8c483db84b4bee98b60c0593521ed34d9990e8"><code>8e8c483</code></a>
Clarify v6 README (<a
href="https://redirect.github.com/actions/checkout/issues/2328">#2328</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/033fa0dc0b82693d8986f1016a0ec2c5e7d9cbb1"><code>033fa0d</code></a>
Add worktree support for persist-credentials includeIf (<a
href="https://redirect.github.com/actions/checkout/issues/2327">#2327</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/c2d88d3ecc89a9ef08eebf45d9637801dcee7eb5"><code>c2d88d3</code></a>
Update all references from v5 and v4 to v6 (<a
href="https://redirect.github.com/actions/checkout/issues/2314">#2314</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/1af3b93b6815bc44a9784bd300feb67ff0d1eeb3"><code>1af3b93</code></a>
update readme/changelog for v6 (<a
href="https://redirect.github.com/actions/checkout/issues/2311">#2311</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/71cf2267d89c5cb81562390fa70a37fa40b1305e"><code>71cf226</code></a>
v6-beta (<a
href="https://redirect.github.com/actions/checkout/issues/2298">#2298</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/069c6959146423d11cd0184e6accf28f9d45f06e"><code>069c695</code></a>
Persist creds to a separate file (<a
href="https://redirect.github.com/actions/checkout/issues/2286">#2286</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493"><code>ff7abcd</code></a>
Update README to include Node.js 24 support details and requirements (<a
href="https://redirect.github.com/actions/checkout/issues/2248">#2248</a>)</li>
<li><a
href="https://github.com/actions/checkout/commit/08c6903cd8c0fde910a37f88322edcfb5dd907a8"><code>08c6903</code></a>
Prepare v5.0.0 release (<a
href="https://redirect.github.com/actions/checkout/issues/2238">#2238</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/checkout/compare/v3...v6">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/checkout&package-manager=github_actions&previous-version=3&new-version=6)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:32:46 -08:00
dependabot[bot] 8aa1e86ab3 Bump pytest from 7.4.4 to 8.4.2 (#844)
Bumps [pytest](https://github.com/pytest-dev/pytest) from 7.4.4 to
8.4.2.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pytest-dev/pytest/releases">pytest's
releases</a>.</em></p>
<blockquote>
<h2>8.4.2</h2>
<h1>pytest 8.4.2 (2025-09-03)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13478">#13478</a>:
Fixed a crash when using
<code>console_output_style</code>{.interpreted-text
role=&quot;confval&quot;} with <code>times</code> and a module is
skipped.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13530">#13530</a>:
Fixed a crash when using <code>pytest.approx</code>{.interpreted-text
role=&quot;func&quot;} and
<code>decimal.Decimal</code>{.interpreted-text role=&quot;class&quot;}
instances with the <code>decimal.FloatOperation</code>{.interpreted-text
role=&quot;class&quot;} trap set.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13549">#13549</a>:
No longer evaluate type annotations in Python <code>3.14</code> when
inspecting function signatures.</p>
<p>This prevents crashes during module collection when modules do not
explicitly use <code>from __future__ import annotations</code> and
import types for annotations within a <code>if TYPE_CHECKING:</code>
block.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13559">#13559</a>:
Added missing [int]{.title-ref} and [float]{.title-ref} variants to the
[Literal]{.title-ref} type annotation of the [type]{.title-ref}
parameter in <code>pytest.Parser.addini</code>{.interpreted-text
role=&quot;meth&quot;}.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13563">#13563</a>:
<code>pytest.approx</code>{.interpreted-text role=&quot;func&quot;} now
only imports <code>numpy</code> if NumPy is already in
<code>sys.modules</code>. This fixes unconditional import behavior
introduced in [8.4.0]{.title-ref}.</p>
</li>
</ul>
<h2>Improved documentation</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13577">#13577</a>:
Clarify that <code>pytest_generate_tests</code> is discovered in test
modules/classes; other hooks must be in <code>conftest.py</code> or
plugins.</li>
</ul>
<h2>Contributor-facing changes</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13480">#13480</a>:
Self-testing: fixed a few test failures when run with
<code>-Wdefault</code> or a similar override.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13547">#13547</a>:
Self-testing: corrected expected message for
<code>test_doctest_unexpected_exception</code> in Python
<code>3.14</code>.</li>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13684">#13684</a>:
Make pytest's own testsuite insensitive to the presence of the
<code>CI</code> environment variable -- by
<code>ogrisel</code>{.interpreted-text role=&quot;user&quot;}.</li>
</ul>
<h2>8.4.1</h2>
<h1>pytest 8.4.1 (2025-06-17)</h1>
<h2>Bug fixes</h2>
<ul>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13461">#13461</a>:
Corrected <code>_pytest.terminal.TerminalReporter.isatty</code> to
support
being called as a method. Before it was just a boolean which could
break correct code when using <code>-o log_cli=true</code>).</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13477">#13477</a>:
Reintroduced
<code>pytest.PytestReturnNotNoneWarning</code>{.interpreted-text
role=&quot;class&quot;} which was removed by accident in pytest
[8.4]{.title-ref}.</p>
<p>This warning is raised when a test functions returns a value other
than <code>None</code>, which is often a mistake made by beginners.</p>
<p>See <code>return-not-none</code>{.interpreted-text
role=&quot;ref&quot;} for more information.</p>
</li>
<li>
<p><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13497">#13497</a>:
Fixed compatibility with <code>Twisted 25+</code>.</p>
</li>
</ul>
<h2>Improved documentation</h2>
<ul>
<li><a
href="https://redirect.github.com/pytest-dev/pytest/issues/13492">#13492</a>:
Fixed outdated warning about <code>faulthandler</code> not working on
Windows.</li>
</ul>
<h2>8.4.0</h2>
<h1>pytest 8.4.0 (2025-06-02)</h1>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pytest-dev/pytest/commit/bfae4224fd554d3d7f2c277a4cc092b6ec6af3ae"><code>bfae422</code></a>
Prepare release version 8.4.2</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/89905381a163be30ae87d62e5f750e902d750c5f"><code>8990538</code></a>
Fix passenv CI in tox ini and make tests insensitive to the presence of
the C...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/ca676bfe005aebcb12f4146d1b0f1d2772e2cd5d"><code>ca676bf</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13687">#13687</a>
from pytest-dev/patchback/backports/8.4.x/e63f6e51c...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/975a60a63ce385a44655596e254c1899feaa53e4"><code>975a60a</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13686">#13686</a>
from pytest-dev/patchback/backports/8.4.x/12bde8af6...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/7723ce84b87ab08f86ddafcb342acc28ba5ec99d"><code>7723ce8</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13683">#13683</a>
from even-even/fix_Exeption_to_Exception_in_errorMe...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/b7f05680d1301e0969b30bcb3c4b27433c9ee2b7"><code>b7f0568</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13685">#13685</a>
from CoretexShadow/fix/docs-pytest-generate-tests</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/2c94c4a6948ba53440818389298157fa5d5f94cd"><code>2c94c4a</code></a>
add missing colon (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13640">#13640</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13641">#13641</a>)</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/c3d7684bc01c8c48d05145a30c5211ca8656c68c"><code>c3d7684</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13606">#13606</a>
from pytest-dev/patchback/backports/8.4.x/5f9938563...</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/dc6e3be2ddc75a149b6d102d9b7c82ee47a00cfa"><code>dc6e3be</code></a>
Merge pull request <a
href="https://redirect.github.com/pytest-dev/pytest/issues/13605">#13605</a>
from The-Compiler/training-update-2025-07</li>
<li><a
href="https://github.com/pytest-dev/pytest/commit/f87289c36c8dbe7740e3020f5546b6f8b0861ff0"><code>f87289c</code></a>
Fix crash with <code>times</code> output style and skipped module (<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13573">#13573</a>)
(<a
href="https://redirect.github.com/pytest-dev/pytest/issues/13579">#13579</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pytest-dev/pytest/compare/7.4.4...8.4.2">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=pytest&package-manager=pip&previous-version=7.4.4&new-version=8.4.2)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:30:22 -08:00
dependabot[bot] 3fc780e472 Bump actions/cache from 3 to 5 (#843)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 5.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/releases">actions/cache's
releases</a>.</em></p>
<blockquote>
<h2>v5.0.0</h2>
<blockquote>
<p>[!IMPORTANT]
<strong><code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of
<code>2.327.1</code>.</strong></p>
<p>If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<hr />
<h2>What's Changed</h2>
<ul>
<li>Upgrade to use node24 by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1630">actions/cache#1630</a></li>
<li>Prepare v5.0.0 release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1684">actions/cache#1684</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.3.0...v5.0.0">https://github.com/actions/cache/compare/v4.3.0...v5.0.0</a></p>
<h2>v4.3.0</h2>
<h2>What's Changed</h2>
<ul>
<li>Add note on runner versions by <a
href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
<li>Prepare <code>v4.3.0</code> release by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1655">actions/cache#1655</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/GhadimiR"><code>@​GhadimiR</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1642">actions/cache#1642</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.3.0">https://github.com/actions/cache/compare/v4...v4.3.0</a></p>
<h2>v4.2.4</h2>
<h2>What's Changed</h2>
<ul>
<li>Update README.md by <a
href="https://github.com/nebuk89"><code>@​nebuk89</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
<li>Upgrade <code>@actions/cache</code> to <code>4.0.5</code> and move
<code>@protobuf-ts/plugin</code> to dev depdencies by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1634">actions/cache#1634</a></li>
<li>Prepare release <code>4.2.4</code> by <a
href="https://github.com/Link"><code>@​Link</code></a>- in <a
href="https://redirect.github.com/actions/cache/pull/1636">actions/cache#1636</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/nebuk89"><code>@​nebuk89</code></a> made
their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1620">actions/cache#1620</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4...v4.2.4">https://github.com/actions/cache/compare/v4...v4.2.4</a></p>
<h2>v4.2.3</h2>
<h2>What's Changed</h2>
<ul>
<li>Update to use <code>@​actions/cache</code> 4.0.3 package &amp;
prepare for new release by <a
href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a> in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a>
(SAS tokens for cache entries are now masked in debug logs)</li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/salmanmkc"><code>@​salmanmkc</code></a>
made their first contribution in <a
href="https://redirect.github.com/actions/cache/pull/1577">actions/cache#1577</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/actions/cache/compare/v4.2.2...v4.2.3">https://github.com/actions/cache/compare/v4.2.2...v4.2.3</a></p>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/actions/cache/blob/main/RELEASES.md">actions/cache's
changelog</a>.</em></p>
<blockquote>
<h1>Releases</h1>
<h2>How to prepare a release</h2>
<blockquote>
<p>[!NOTE]<br />
Relevant for maintainers with write access only.</p>
</blockquote>
<ol>
<li>Switch to a new branch from <code>main</code>.</li>
<li>Run <code>npm test</code> to ensure all tests are passing.</li>
<li>Update the version in <a
href="https://github.com/actions/cache/blob/main/package.json"><code>https://github.com/actions/cache/blob/main/package.json</code></a>.</li>
<li>Run <code>npm run build</code> to update the compiled files.</li>
<li>Update this <a
href="https://github.com/actions/cache/blob/main/RELEASES.md"><code>https://github.com/actions/cache/blob/main/RELEASES.md</code></a>
with the new version and changes in the <code>## Changelog</code>
section.</li>
<li>Run <code>licensed cache</code> to update the license report.</li>
<li>Run <code>licensed status</code> and resolve any warnings by
updating the <a
href="https://github.com/actions/cache/blob/main/.licensed.yml"><code>https://github.com/actions/cache/blob/main/.licensed.yml</code></a>
file with the exceptions.</li>
<li>Commit your changes and push your branch upstream.</li>
<li>Open a pull request against <code>main</code> and get it reviewed
and merged.</li>
<li>Draft a new release <a
href="https://github.com/actions/cache/releases">https://github.com/actions/cache/releases</a>
use the same version number used in <code>package.json</code>
<ol>
<li>Create a new tag with the version number.</li>
<li>Auto generate release notes and update them to match the changes you
made in <code>RELEASES.md</code>.</li>
<li>Toggle the set as the latest release option.</li>
<li>Publish the release.</li>
</ol>
</li>
<li>Navigate to <a
href="https://github.com/actions/cache/actions/workflows/release-new-action-version.yml">https://github.com/actions/cache/actions/workflows/release-new-action-version.yml</a>
<ol>
<li>There should be a workflow run queued with the same version
number.</li>
<li>Approve the run to publish the new version and update the major tags
for this action.</li>
</ol>
</li>
</ol>
<h2>Changelog</h2>
<h3>5.0.3</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v5.0.5 (Resolves: <a
href="https://github.com/actions/cache/security/dependabot/33">https://github.com/actions/cache/security/dependabot/33</a>)</li>
<li>Bump <code>@actions/core</code> to v2.0.3</li>
</ul>
<h3>5.0.2</h3>
<ul>
<li>Bump <code>@actions/cache</code> to v5.0.3 <a
href="https://redirect.github.com/actions/cache/pull/1692">#1692</a></li>
</ul>
<h3>5.0.1</h3>
<ul>
<li>Update <code>@azure/storage-blob</code> to <code>^12.29.1</code> via
<code>@actions/cache@5.0.1</code> <a
href="https://redirect.github.com/actions/cache/pull/1685">#1685</a></li>
</ul>
<h3>5.0.0</h3>
<blockquote>
<p>[!IMPORTANT]
<code>actions/cache@v5</code> runs on the Node.js 24 runtime and
requires a minimum Actions Runner version of <code>2.327.1</code>.
If you are using self-hosted runners, ensure they are updated before
upgrading.</p>
</blockquote>
<h3>4.3.0</h3>
<ul>
<li>Bump <code>@actions/cache</code> to <a
href="https://redirect.github.com/actions/toolkit/pull/2132">v4.1.0</a></li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/actions/cache/commit/cdf6c1fa76f9f475f3d7449005a359c84ca0f306"><code>cdf6c1f</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1695">#1695</a>
from actions/Link-/prepare-5.0.3</li>
<li><a
href="https://github.com/actions/cache/commit/a1bee22673bee4afb9ce4e0a1dc3da1c44060b7d"><code>a1bee22</code></a>
Add review for the <code>@​actions/http-client</code> license</li>
<li><a
href="https://github.com/actions/cache/commit/46957638dc5c5ff0c34c0143f443c07d3a7c769f"><code>4695763</code></a>
Add licensed output</li>
<li><a
href="https://github.com/actions/cache/commit/dc73bb9f7bf74a733c05ccd2edfd1f2ac9e5f502"><code>dc73bb9</code></a>
Upgrade dependencies and address security warnings</li>
<li><a
href="https://github.com/actions/cache/commit/345d5c2f761565bace4b6da356737147e9041e3a"><code>345d5c2</code></a>
Add 5.0.3 builds</li>
<li><a
href="https://github.com/actions/cache/commit/8b402f58fbc84540c8b491a91e594a4576fec3d7"><code>8b402f5</code></a>
Merge pull request <a
href="https://redirect.github.com/actions/cache/issues/1692">#1692</a>
from GhadimiR/main</li>
<li><a
href="https://github.com/actions/cache/commit/304ab5a0701ee61908ccb4b5822347949a2e2002"><code>304ab5a</code></a>
license for httpclient</li>
<li><a
href="https://github.com/actions/cache/commit/609fc19e67cd310e97eb36af42355843ffcb35be"><code>609fc19</code></a>
Update licensed record for cache</li>
<li><a
href="https://github.com/actions/cache/commit/b22231e43df11a67538c05e88835f1fa097599c5"><code>b22231e</code></a>
Build</li>
<li><a
href="https://github.com/actions/cache/commit/93150cdfb36a9d84d4e8628c8870bec84aedcf8a"><code>93150cd</code></a>
Add PR link to releases</li>
<li>Additional commits viewable in <a
href="https://github.com/actions/cache/compare/v3...v5">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=actions/cache&package-manager=github_actions&previous-version=3&new-version=5)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:30:00 -08:00
dependabot[bot] 404cab2506 Bump aiohttp from 3.12.15 to 3.13.3 in the pip group across 1 directory (#841)
[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=aiohttp&package-manager=pip&previous-version=3.12.15&new-version=3.13.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:27:51 -08:00
dependabot[bot] db4c41fcb3 Bump urllib3 from 2.5.0 to 2.6.3 in the pip group across 1 directory (#840)
Bumps the pip group with 1 update in the / directory:
[urllib3](https://github.com/urllib3/urllib3).

Updates `urllib3` from 2.5.0 to 2.6.3
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/urllib3/urllib3/releases">urllib3's
releases</a>.</em></p>
<blockquote>
<h2>2.6.3</h2>
<h2>🚀 urllib3 is fundraising for HTTP/2 support</h2>
<p><a
href="https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support">urllib3
is raising ~$40,000 USD</a> to release HTTP/2 support and ensure
long-term sustainable maintenance of the project after a sharp decline
in financial support. If your company or organization uses Python and
would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and
thousands of other projects <a
href="https://opencollective.com/urllib3">please consider contributing
financially</a> to ensure HTTP/2 support is developed sustainably and
maintained for the long-haul.</p>
<p>Thank you for your support.</p>
<h2>Changes</h2>
<ul>
<li>Fixed a security issue where decompression-bomb safeguards of the
streaming API were bypassed when HTTP redirects were followed.
(CVE-2026-21441 reported by <a
href="https://github.com/D47A"><code>@​D47A</code></a>, 8.9 High,
GHSA-38jv-5279-wg99)</li>
<li>Started treating <code>Retry-After</code> times greater than 6 hours
as 6 hours by default. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3743">urllib3/urllib3#3743</a>)</li>
<li>Fixed <code>urllib3.connection.VerifiedHTTPSConnection</code> on
Emscripten. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3752">urllib3/urllib3#3752</a>)</li>
</ul>
<h2>2.6.2</h2>
<h2>🚀 urllib3 is fundraising for HTTP/2 support</h2>
<p><a
href="https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support">urllib3
is raising ~$40,000 USD</a> to release HTTP/2 support and ensure
long-term sustainable maintenance of the project after a sharp decline
in financial support. If your company or organization uses Python and
would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and
thousands of other projects <a
href="https://opencollective.com/urllib3">please consider contributing
financially</a> to ensure HTTP/2 support is developed sustainably and
maintained for the long-haul.</p>
<p>Thank you for your support.</p>
<h2>Changes</h2>
<ul>
<li>Fixed <code>HTTPResponse.read_chunked()</code> to properly handle
leftover data in the decoder's buffer when reading compressed chunked
responses. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3734">urllib3/urllib3#3734</a>)</li>
</ul>
<h2>2.6.1</h2>
<h2>🚀 urllib3 is fundraising for HTTP/2 support</h2>
<p><a
href="https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support">urllib3
is raising ~$40,000 USD</a> to release HTTP/2 support and ensure
long-term sustainable maintenance of the project after a sharp decline
in financial support. If your company or organization uses Python and
would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and
thousands of other projects <a
href="https://opencollective.com/urllib3">please consider contributing
financially</a> to ensure HTTP/2 support is developed sustainably and
maintained for the long-haul.</p>
<p>Thank you for your support.</p>
<h2>Changes</h2>
<ul>
<li>Restore previously removed <code>HTTPResponse.getheaders()</code>
and <code>HTTPResponse.getheader()</code> methods. (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3731">#3731</a>)</li>
</ul>
<h2>2.6.0</h2>
<h2>🚀 urllib3 is fundraising for HTTP/2 support</h2>
<p><a
href="https://sethmlarson.dev/urllib3-is-fundraising-for-http2-support">urllib3
is raising ~$40,000 USD</a> to release HTTP/2 support and ensure
long-term sustainable maintenance of the project after a sharp decline
in financial support. If your company or organization uses Python and
would benefit from HTTP/2 support in Requests, pip, cloud SDKs, and
thousands of other projects <a
href="https://opencollective.com/urllib3">please consider contributing
financially</a> to ensure HTTP/2 support is developed sustainably and
maintained for the long-haul.</p>
<p>Thank you for your support.</p>
<h2>Security</h2>
<ul>
<li>Fixed a security issue where streaming API could improperly handle
highly compressed HTTP content (&quot;decompression bombs&quot;) leading
to excessive resource consumption even when a small amount of data was
requested. Reading small chunks of compressed data is safer and much
more efficient now. (CVE-2025-66471 reported by <a
href="https://github.com/Cycloctane"><code>@​Cycloctane</code></a>, 8.9
High, GHSA-2xpw-w6gg-jr37)</li>
<li>Fixed a security issue where an attacker could compose an HTTP
response with virtually unlimited links in the
<code>Content-Encoding</code> header, potentially leading to a denial of
service (DoS) attack by exhausting system resources during decoding. The
number of allowed chained encodings is now limited to 5. (CVE-2025-66418
reported by <a
href="https://github.com/illia-v"><code>@​illia-v</code></a>, 8.9 High,
GHSA-gm62-xv2j-4w53)</li>
</ul>
<blockquote>
<p>[!IMPORTANT]</p>
<ul>
<li>If urllib3 is not installed with the optional
<code>urllib3[brotli]</code> extra, but your environment contains a
Brotli/brotlicffi/brotlipy package anyway, make sure to upgrade it to at
least Brotli 1.2.0 or brotlicffi 1.2.0.0 to benefit from the security
fixes and avoid warnings. Prefer using <code>urllib3[brotli]</code> to
install a compatible Brotli package automatically.</li>
</ul>
</blockquote>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/urllib3/urllib3/blob/main/CHANGES.rst">urllib3's
changelog</a>.</em></p>
<blockquote>
<h1>2.6.3 (2026-01-07)</h1>
<ul>
<li>Fixed a high-severity security issue where decompression-bomb
safeguards of
the streaming API were bypassed when HTTP redirects were followed.
(<code>GHSA-38jv-5279-wg99
&lt;https://github.com/urllib3/urllib3/security/advisories/GHSA-38jv-5279-wg99&gt;</code>__)</li>
<li>Started treating <code>Retry-After</code> times greater than 6 hours
as 6 hours by
default. (<code>[#3743](https://github.com/urllib3/urllib3/issues/3743)
&lt;https://github.com/urllib3/urllib3/issues/3743&gt;</code>__)</li>
<li>Fixed <code>urllib3.connection.VerifiedHTTPSConnection</code> on
Emscripten.
(<code>[#3752](https://github.com/urllib3/urllib3/issues/3752)
&lt;https://github.com/urllib3/urllib3/issues/3752&gt;</code>__)</li>
</ul>
<h1>2.6.2 (2025-12-11)</h1>
<ul>
<li>Fixed <code>HTTPResponse.read_chunked()</code> to properly handle
leftover data in
the decoder's buffer when reading compressed chunked responses.
(<code>[#3734](https://github.com/urllib3/urllib3/issues/3734)
&lt;https://github.com/urllib3/urllib3/issues/3734&gt;</code>__)</li>
</ul>
<h1>2.6.1 (2025-12-08)</h1>
<ul>
<li>Restore previously removed <code>HTTPResponse.getheaders()</code>
and
<code>HTTPResponse.getheader()</code> methods.
(<code>[#3731](https://github.com/urllib3/urllib3/issues/3731)
&lt;https://github.com/urllib3/urllib3/issues/3731&gt;</code>__)</li>
</ul>
<h1>2.6.0 (2025-12-05)</h1>
<h2>Security</h2>
<ul>
<li>Fixed a security issue where streaming API could improperly handle
highly
compressed HTTP content (&quot;decompression bombs&quot;) leading to
excessive resource
consumption even when a small amount of data was requested. Reading
small
chunks of compressed data is safer and much more efficient now.
(<code>GHSA-2xpw-w6gg-jr37
&lt;https://github.com/urllib3/urllib3/security/advisories/GHSA-2xpw-w6gg-jr37&gt;</code>__)</li>
<li>Fixed a security issue where an attacker could compose an HTTP
response with
virtually unlimited links in the <code>Content-Encoding</code> header,
potentially
leading to a denial of service (DoS) attack by exhausting system
resources
during decoding. The number of allowed chained encodings is now limited
to 5.
(<code>GHSA-gm62-xv2j-4w53
&lt;https://github.com/urllib3/urllib3/security/advisories/GHSA-gm62-xv2j-4w53&gt;</code>__)</li>
</ul>
<p>.. caution::</p>
<ul>
<li>If urllib3 is not installed with the optional
<code>urllib3[brotli]</code> extra, but
your environment contains a Brotli/brotlicffi/brotlipy package anyway,
make
sure to upgrade it to at least Brotli 1.2.0 or brotlicffi 1.2.0.0 to
benefit from the security fixes and avoid warnings. Prefer using</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/urllib3/urllib3/commit/0248277dd7ac0239204889ca991353ad3e3a1ddc"><code>0248277</code></a>
Release 2.6.3</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/8864ac407bba8607950025e0979c4c69bc7abc7b"><code>8864ac4</code></a>
Merge commit from fork</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/70cecb27ca99d56aaaeb63ac27ee270ef2b24c5c"><code>70cecb2</code></a>
Fix Scorecard issues related to vulnerable dev dependencies (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3755">#3755</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/41f249abe1ef3e20768588969c4035aba060a359"><code>41f249a</code></a>
Move &quot;v2.0 Migration Guide&quot; to the end of the table of
contents (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3747">#3747</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/fd4dffd2fc544166b76151a2fa3d7b7c0eab540c"><code>fd4dffd</code></a>
Patch <code>VerifiedHTTPSConnection</code> for Emscripten (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3752">#3752</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/13f0bfd55e4468fe1ea9c6f809d3a87b0f93ebab"><code>13f0bfd</code></a>
Handle massive values in Retry-After when calculating time to sleep for
(<a
href="https://redirect.github.com/urllib3/urllib3/issues/3743">#3743</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/8c480bf87bcefd321b3a1ae47f04e908b6b2ed7b"><code>8c480bf</code></a>
Bump actions/upload-artifact from 5.0.0 to 6.0.0 (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3748">#3748</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/4b40616e959c0a2c466e8075f2a785a9f99bb0c1"><code>4b40616</code></a>
Bump actions/cache from 4.3.0 to 5.0.1 (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3750">#3750</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/82b8479663d037d220c883f1584dd01a43bb273b"><code>82b8479</code></a>
Bump actions/download-artifact from 6.0.0 to 7.0.0 (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3749">#3749</a>)</li>
<li><a
href="https://github.com/urllib3/urllib3/commit/34284cb01700bb7d4fdd472f909e22393e9174e2"><code>34284cb</code></a>
Mention experimental features in the security policy (<a
href="https://redirect.github.com/urllib3/urllib3/issues/3746">#3746</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/urllib3/urllib3/compare/2.5.0...2.6.3">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=urllib3&package-manager=pip&previous-version=2.5.0&new-version=2.6.3)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions
You can disable automated security fix PRs for this repo from the
[Security Alerts
page](https://github.com/langchain-ai/langserve/network/alerts).

</details>

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2026-02-07 17:27:30 -08:00
John Kennedy d592a8abd9 chore: workflow perms (#846) 2026-02-07 17:25:35 -08:00
John Kennedy 8721a82087 chore: dependabot (#838) 2026-02-07 17:22:28 -08:00
Eugene Yurtsev 0c1cb7f800 release: 0.3.3 for compatibility with langchain-core 1 (#830)
Release for compatibility with langchain > 1
2025-10-17 11:07:22 -04:00
joaquin-borggio-lc f0d86287ab ci: drop python 3.8 (#825) 2025-09-17 15:38:01 -04:00
joaquin-borggio-lc 168c9ff90e chore: bump patch version (#823)
bump patched version so i can release
2025-09-17 15:31:09 -04:00
joaquin-borggio-lc a87125d0b8 chore: bump some package versions (#821)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2025-09-17 15:03:09 -04:00
Eugene Yurtsev 1de17fa799 Add new contributor to .clabot configuration (#822) 2025-09-17 15:01:18 -04:00
ResearchAI 1a08f2740c Update Chroma import to avoid deprecation warning. (#741) 2025-07-09 17:19:18 -04:00
Yash Jivani 06c3c3691e Update README.md Grammatical Errors (#733) 2025-07-09 17:15:01 -04:00
Eugene Yurtsev d20eab45f2 ci: add workflow dispatch to _release (#805) 2024-12-26 21:37:14 -05:00
Eugene Yurtsev 321b7aa3b1 Release 0.3.1 (#801) 2024-12-19 10:33:17 -05:00
Eugene Yurtsev aa4aea4a81 lint (#803) 2024-12-19 10:19:16 -05:00
Eugene Yurtsev 1aaec1189c Update _lint.yml (#802) 2024-12-18 22:10:43 -05:00
アリス 0d7601781d update ssl verifying part to work with httpx 0.28.0 (#798)
As the new httpx 0.28.0 removes VerifyTypes, we should update to follow
their change
See [issue](https://github.com/langchain-ai/langserve/issues/796)

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-12-18 22:08:58 -05:00
Eugene Yurtsev 0ad075fb67 Update .clabot (#800) 2024-12-18 22:04:39 -05:00
Mingqi Hu b007300b06 docs: Remove templates in readme (#792)
docs: Remove templates in readme

Issue: 404 when you click the [LangChain
Templates](https://github.com/langchain-ai/langchain/blob/master/templates/README.md)
in readme. As templates dir has been removed on latest langchain master.
<img width="368" alt="image"
src="https://github.com/user-attachments/assets/8dfa7e82-c6df-458c-ba42-2b9f0fd67d8d">


Fix: Just remove it to avoid 404 as example dirs is enough, look like
(my local vs code)
<img width="423" alt="image"
src="https://github.com/user-attachments/assets/b65fc053-ed62-47e4-8404-fbfbcb4b17d5">

Signed-off-by: Mingqi <mingqi.hu@intel.com>
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-11-22 10:21:02 -05:00
Eugene Yurtsev 9df7e88bb9 Update .clabot (#793) 2024-11-22 10:20:11 -05:00
Eugene Yurtsev c626cde08c Update MIGRATION.md (#789) 2024-11-18 11:06:37 -05:00
ccurme c4a8925b00 docs: update local link in readme (#788)
LangChain doc builds are currently
[broken](https://vercel.com/langchain/langchain/ExxE3a6SSZVa7RSRUDB3mzHDpsvV?filter=errors).

- LangChain docs page hosts LangServe readme:
https://python.langchain.com/docs/langserve/;
- The readme is [downloaded from
github](https://github.com/langchain-ai/langchain/blob/22a8652eccd9023cd41ea0f6924575ce87c28756/docs/Makefile#L49)
when docs are built;
- A
[script](https://github.com/langchain-ai/langchain/blob/master/docs/scripts/resolve_local_links.py)
resolves local links in the readme to point to the LangServe github.

This script assumes local links are prefixed with `./`
2024-11-18 11:05:19 -05:00
Eugene Yurtsev 80f949b62e migration guide (#787) 2024-11-16 22:36:31 -05:00
Eugene Yurtsev c27923a7d1 Update README.md (#773) 2024-09-18 13:33:52 -04:00
Eugene Yurtsev f3b9c43106 Update README.md (#771) 2024-09-16 13:22:26 -04:00
Eugene Yurtsev 6b1a0d97ef Update README (#769) 2024-09-16 11:56:41 -04:00
Eugene Yurtsev dc04672537 examples: update clients (#768) 2024-09-14 14:32:41 -04:00
Eugene Yurtsev 42b61a664b v0.3 release (#767) 2024-09-14 14:14:45 -04:00
Eugene Yurtsev 1e24edce08 Add ability to specify custom serializer (#764)
Allow users to define a custom serializer
2024-09-14 14:06:08 -04:00
Eugene Yurtsev c747e20c1e Fix issue with callback events sent from server (#765)
This properly propagates the name of the runs from the server to the client if one enables callbacks.
2024-09-14 13:46:10 -04:00
Eugene Yurtsev 8b4d8dff6c propagate astream events from add_route (#763)
Propagate the parameter to APIHandler
2024-09-12 17:02:35 -04:00
Eugene Yurtsev 2c957bdd78 mark include callback events as a beta api (#761) 2024-09-12 14:58:33 -04:00
Eugene Yurtsev 36f945e494 improve error messages when models fail to hash (#762) 2024-09-12 14:58:25 -04:00
Eugene Yurtsev 43683b3671 add ability to control version of astream events API (#760)
add ability to control version of astream events API server side
2024-09-12 14:33:21 -04:00
Eugene Yurtsev 59b3c81189 Release 0.30dev2 (#758) 2024-09-11 21:08:56 -04:00
Eugene Yurtsev 36e9919c17 serialization fix for defaults (#757)
Fix serialization issue when there are defaults
2024-09-11 21:07:30 -04:00
Eugene Yurtsev ff94f96dc8 update serialization to work with older pydantic versions (#756)
* Serialization to work with pydantic 2.7, 2.8
* Add constraint on min pydantic version for langserve to be 2.7 for now
2024-09-11 12:55:53 -04:00
Eugene Yurtsev 8c852935e5 Update doc-string, remove unused function (#754) 2024-09-10 14:05:51 -04:00
Eugene Yurtsev 04236b0cf2 more run time warnings (#753)
This PR resolves most of the remaining run time warnings
2024-09-10 11:41:03 -04:00
Eugene Yurtsev 54eee64faf update claude model in examples (#750) 2024-09-10 10:34:31 -04:00
Eugene Yurtsev 72c200ff81 first pass at removing deprecated usaged (#751)
Reduces a significant number of run time warnings when running unit
tests (down to ~350)
2024-09-10 10:34:16 -04:00
Eugene Yurtsev 21c2e3da2a resolve more warnings in unit tests (#752)
Migrated using gritql 

`AsyncClient(app=$y, $x)` => `AsyncClient($x, transport=
httpx.ASGITransport(app=$y))`
2024-09-09 18:40:04 -04:00
Eugene Yurtsev 6e7a9ee3f5 0.3.0.dev1 release (#748) 2024-09-09 16:09:34 -04:00
Eugene Yurtsev 81c0285af2 update default playground to handle oneOf type (#747)
Update the default playground to handle the oneOf type which appears as
the input into language models.

This change stems from the upgrade to pydantic 2.
2024-09-09 16:06:36 -04:00
Eugene Yurtsev b62b925825 chat-playground: update to handle oneOf (resulted from pydantic upgrade) (#746)
Update the chat playground to handle the oneOf type which appears as the
input into language models.

This change stems from the upgrade to pydantic 2.
2024-09-09 16:06:29 -04:00
Eugene Yurtsev b528955b60 migrate examples to pydantic 2 (#745)
Migrate examples to pydantic 2
2024-09-09 11:03:26 -04:00
Eugene Yurtsev 5aedbf7083 upgrade to pydantic 2 (#744)
This PR upgrades langserve to pydantic 2.

* Added a failing unit test that has 2 known failures (that need to be
fixed in langchain-core)
* Deprecation warnings will be resolved separately.
2024-09-09 10:23:16 -04:00
Eugene Yurtsev 41a9d798aa Update unit tests to catch up with langchain-core (#743)
Updating the unit tests to catch up with langchain-core. No adjustements
should be necessary to user code, the issues manifest themselves only with the
given test set up (e.g., snapshots). langchain-core changes were either
additive or self-consistent.
2024-09-06 13:55:23 -04:00
Erick Friis d4704c2b45 infra: release permissions (#738) 2024-09-01 22:09:28 -04:00
Eugene Yurtsev c259ec3e4d Release 0.2.3 (#737) 2024-09-01 21:55:23 -04:00
William FH 62e648a2bf Support correction when creating feedback with token (#736)
Closes https://github.com/langchain-ai/langserve/issues/735

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-09-01 21:43:50 -04:00
Eugene Yurtsev a74e072486 Add langgraph compatibility section (#718) 2024-07-26 14:29:38 -04:00
Erick Friis 1487bf1ce5 Add instructions to address pydantic v2 incompatibility (#713) 2024-07-22 14:40:03 -04:00
ccurme 050a0cc674 update readme (#697) 2024-06-28 11:02:32 -04:00
Eugene Yurtsev 3fc76eca05 0.2.2 release (#675) 2024-06-10 14:41:50 -04:00
Dennis Rall df3aa45ef8 chore: add fastapi to client extra (#666)
Just a quickfix for #212.

It would be better not to have to install fastapi only for using the
client, but in my opinion this is still better then getting errors when
importing the `RemoteRunnable` after a `pip install
"langserve[client]"`.

Otherwise at least the readme should be updated.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-06-10 13:05:47 -04:00
Eugene Yurtsev 577dcc779f Update .clabot (#674) 2024-06-10 12:35:17 -04:00
jakerachleff 1b389f0751 Update hosted langserve waitlist form (#664) 2024-05-24 15:30:26 -07:00
Eugene Yurtsev 6ef3aca359 release 0.2.1 (#663) 2024-05-24 13:09:19 -04:00
Eugene Yurtsev 81a633e0f4 patch: Use correct attribute for token url (#662)
Use correct attribute
2024-05-24 13:09:06 -04:00
ccurme bb74431183 set default model for Anthropic (#655)
`ChatAnthropic()` raises ValidationError.

Also set model for ChatOpenAI where it appears alongside anthropic.

Best to be explicit about model, otherwise new defaults will cause
unexpected changes.

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-05-21 13:41:21 -04:00
Eugene Yurtsev 4be04bda6d Update .clabot (#656) 2024-05-21 13:40:49 -04:00
Eugene Yurtsev bba7122986 Release 0.2.0 (#651) 2024-05-17 16:39:34 -04:00
Eugene Yurtsev ee250d20f2 update poetry.lock file after version bump (#647)
Forgot to relock
2024-05-15 16:25:29 -04:00
Eugene Yurtsev 21bf92f80c fix upper version for core to 0.3 instead of 3 (#646) 2024-05-15 16:20:18 -04:00
Eugene Yurtsev 37f41e54ce 0.2.0rc1 (#645) 2024-05-15 16:18:52 -04:00
Eugene Yurtsev 075bdd0cfc Update to allow core 0.2.0 (#644)
Prepare for 0.2.x release for core
2024-05-15 16:17:43 -04:00
Eugene Yurtsev 08d4bdd61a Migrate to locations of imports (#625)
Migrate to new locations of imports
2024-04-29 11:14:52 -04:00
Eugene Yurtsev 5fe83e33b8 Release 0.1.1 (#621)
See release notes
2024-04-25 11:40:38 -04:00
Eugene Yurtsev 153616bb99 patch: fix feedback in astream log and astream events (#620)
Code was checking if feedback was enabled rather than token feedback.
2024-04-25 11:37:51 -04:00
Nuno Campos 109445b25e Changes to readme (#614)
- remove pulumi links which are 404
- fix stream_events mention
- run markdown formatter
2024-04-22 14:42:17 -07:00
Eugene Yurtsev ee9b4e78d6 Release 0.1.0 (#608) 2024-04-15 12:41:12 -04:00
Eugene Yurtsev fbdb5a4c20 0.1.0rc2 release (#594)
rc2 release to test API for feedback token integration
2024-04-03 16:20:12 -04:00
Eugene Yurtsev 8439937acb Fixes associated with feedback endpoint (#593)
- Fixes langsmith client not being enabled if token feedback was
specified
- Add unit test for token feedback endpoint
- Fix schema for token feedback to accept a str in addition to a UUID
- Add metadata even to astream log with token feedback information
2024-04-03 16:11:26 -04:00
Eugene Yurtsev 1765f632d3 0.1.0 RC1 (#584) 2024-04-01 13:54:11 -04:00
Eugene Yurtsev 014acfcfb7 LangServe: Raise invalid request exceptions (#581)
* This PR removes dependency on httpx sse
* After this PR invalid requests will be returned as having a status
code of 422 using a non streaming request
2024-04-01 12:52:51 -04:00
Eugene Yurtsev 2c7fceff02 Update .clabot (#582) 2024-04-01 12:51:53 -04:00
Eugene Yurtsev e591ccc1b5 Add tests to check playground is served with api router configurations (#579) 2024-04-01 09:46:24 -04:00
Eugene Yurtsev 00e637ad46 Improve error message if user isn't passing a Runnable to add_routes (#577)
After this PR a better error message will be surfaced to add_routes if a
user passes something that's not a runnable.

This currently occurs a lot when using the langchain cli as the lanchain
cli creates an empty app with a palceholder value of NotImplemented for
the runnable.
2024-03-30 21:21:44 -04:00
Eugene Yurtsev 7240d31671 Tests: add token_feedback endpoint to test that verifies enabled/disabled config (#573)
Add test to verify that token_feedback endpoint gets registered
correctly
2024-03-29 17:10:33 -04:00
Eugene Yurtsev daa312c071 Allow accepting run ids by the server (#576)
This PR allows to turn on a configuration that makes the server accept
client provided run ids.

The server needs to be started with

`add_routes(..., config_keys=['run_id'])`

And a client will then be able to make a request with `config={"run_id":
uuid4}`
2024-03-29 17:10:12 -04:00
Eugene Yurtsev e554f6c32b Expose Feedback Tokens as part of add_routes and APIHandler (#571)
This PR exposes the ability to configure feedback tokens for the APIHandler and add_routes
2024-03-29 15:37:06 -04:00
Eugene Yurtsev 5d7e119725 langserve: Create token feedback endpoint, update schema for feedback (#570)
* Create an endpoint to accept token based feedback
* Update the format of returned feedback (since it's scoped by key)
2024-03-29 14:47:18 -04:00
Eugene Yurtsev 04b9c95028 Scoped Feedback: Plumb through scoped feedback (#568)
After this PR most of the scaffolding code is in place to support scoped
feedback.

After this PR the remaining work to be done:

1. Expose configuration in APIHandler / add_routes
2. Determine how to support with the existing feedback endpoint (or
change to a new endpoint)
3. Surface in RemoteRunnable
2024-03-28 16:08:09 -04:00
Eugene Yurtsev f518776096 Only surface callback events in response schema if callbacks are enabled (#566)
This change cleans up the schema surfaced via openapi docs to not include callback event schema if the server does not respond with it.
2024-03-28 09:29:33 -04:00
Rahil Vora 5a629af7df [minor][doc] Updates setup instruction for LangServe app (#549)
Add `Setup` instruction to run `langserve` app locally.
2024-03-28 09:21:26 -04:00
Eugene Yurtsev d1863fdd8b Transition to langchain-core ^0.1 (#564)
Swap out to use only langchain_core
2024-03-28 09:07:46 -04:00
Eugene Yurtsev 31004e9d90 Update splashscreen (#563)
Update splash screen to take into account information about whether the
playground is enabled/disabled
2024-03-27 17:20:12 -04:00
Warren Markham 4e1993c945 doc: link server example to server.py instead of client.ipynb (#553)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-03-26 17:07:36 -04:00
Eugene Yurtsev 3db9f6b98a Update .clabot (#558) 2024-03-26 17:07:11 -04:00
donbr 002902dfdd Refactor Anthropic import to langchain_anthropic and update model to v3 (#524)
- Transition Anthropic API import to the langchain_anthropic package for
enhanced compatibility.
- Upgrade the AI model to claude-3-sonnet-20240229 for improved
performance and features.

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-03-15 15:11:24 -04:00
Eugene Yurtsev daa7e0c633 Update SECURITY.md (#541) 2024-03-15 14:56:42 -04:00
Eugene Yurtsev 3a5013b76b Update .clabot (#538) 2024-03-14 11:32:05 -04:00
Eugene Yurtsev a1dfd25b15 Document add_routes (#523)
Document add routes
2024-03-12 11:41:01 -04:00
jakerachleff 1aa93b4b1f Update README.md with correct form (#533) 2024-03-12 08:24:38 -07:00
Jacob Lee 3916faa633 Release 0.0.51 (#530) 2024-03-11 23:15:38 -07:00
Jacob Lee bd5f8db2ac Fix regenerate in chat playground for legacy inputs (#529) 2024-03-11 23:13:44 -07:00
Jacob Lee 317356e245 Release 0.0.50 (#527)
@eyurtsev
2024-03-11 18:22:28 -07:00
Jacob Lee 1428ac0951 Add support for older chat input schemas to chat playground (#526)
CC @eyurtsev @efriis
2024-03-11 18:19:42 -07:00
Jacob Lee 4bf7b0f438 Release 0.0.49 (#525)
CC @eyurtsev
2024-03-11 15:51:20 -07:00
Eugene Yurtsev e83dc5aaa4 Add output schemas to the playgrounds (#522)
Add output schema information to the playgrounds



![image](https://github.com/langchain-ai/langserve/assets/3205522/ce0e2ef4-3fa8-4ecd-8c21-08e1319879d5)

---------

Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
2024-03-11 15:47:46 -07:00
Eugene Yurtsev 3f1fc38fff Remove deadcode and lint (#521)
Forgot to remove some deadcode
2024-03-11 15:16:26 -04:00
Jacob Lee ee5cdedf26 Update docs for new chat playground flow (#520) 2024-03-11 15:16:06 -04:00
Eugene Yurtsev f0171fa67a Expose playground type in add_routes and APIHandler (#519)
This PR adds a playground_type parameter to add_routes and APIHandler that creates a new playground that's specialized for chat applications

Co-authored-by: jacoblee93 <jacoblee93@gmail.com>
2024-03-11 15:01:58 -04:00
Jacob Lee 3fa47b2ac6 Release 0.0.48 (#517)
@eyurtsev
2024-03-10 20:46:21 -07:00
Jacob Lee 51969be441 Allow editing of prior messages in the chat playground (#516)
CC @eyurtsev
2024-03-10 20:42:37 -07:00
Jacob Lee a9b5b59a6c Show line-breaks in chat message content (#515)
CC @baskaryan @eyurtsev
2024-03-10 16:56:56 -07:00
Jacob Lee 1dea5f1643 Add env var docs (#513)
CC @eyurtsev
2024-03-08 18:26:42 -08:00
Jacob Lee af9d14e1a4 Release 0.0.47 (#512) 2024-03-08 17:31:10 -08:00
Jacob Lee dc48c2ef1a Adds chat interface (#509)
CC @dqbd @eyurtsev
2024-03-08 17:28:59 -08:00
Jacob Lee 5e592462f5 Adds opt-in public trace view endpoint (#511)
@eyurtsev
2024-03-08 13:32:41 -08:00
Jacob Lee 120c449c6b Improve LangSmith feedback endpoint error message (#510)
@eyurtsev

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-03-08 11:44:29 -08:00
Bagatur e757c838b8 add py.typed (#505) 2024-03-04 16:13:39 -05:00
Eugene Yurtsev 9023b56254 Release 0.0.46 (#501)
See release notes
2024-03-01 10:58:34 -05:00
Eugene Yurtsev 39d6af19d8 Rebuild assets for playground for local dev (#502)
Rebuild assets for playground for local dev
2024-03-01 10:17:37 -05:00
Jacob Lee 81ebc7cbbe Add streaming support for tuple chat widget (#499)
CC @eyurtsev
2024-03-01 10:13:41 -05:00
Eugene Yurtsev b6ec1e86bd Release 0.0.45 (#498)
Improvements for playground
2024-02-28 14:03:18 -05:00
Jacob Lee ce727fcbf4 Adds playground chat widget for message list inputs, additional global callback for chunks (#489)
Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-02-28 13:39:54 -05:00
Eugene Yurtsev 8ea0cb4b53 Release 0.0.44 (#494)
See release notes
2024-02-28 12:19:17 -05:00
Engin Diri af98fed73b docs: add IaC section to the docs with first examples for Pulumi. (#491)
This PR introduces a new subsection under the Deployment section titled
"Deploy using Infrastructure as Code"

In this subsection, we will outline methods for utilizing IaC tools such
as Pulumi, OpenTofu, and AWS CDK, among others.

I have initiated with examples in Pulumi and AWS. Examples for other
cloud providers are expected to be added shortly.

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-02-28 12:12:24 -05:00
Eugene Yurtsev bcc1cd6d89 Update .clabot (#493) 2024-02-28 12:11:57 -05:00
Nat Noordanus 827229fd2d Exclude playground asset paths from OpenAPI docs (#488) 2024-02-28 11:53:42 -05:00
Jacob Lee ff07eec3d2 Update JS docs links (#490)
@eyurtsev
2024-02-28 00:37:26 -08:00
Nat Noordanus a01ab330ac Make playground work with apps behind a proxy with root_path (#472)
Make the playground respect the
[root_path](https://fastapi.tiangolo.com/advanced/behind-a-proxy/) from
the request scope.

Also streamline some related code in APIHandler around normalizing
trailing slashes on paths.
2024-02-27 21:51:51 -05:00
jakerachleff c1d52441f6 Update Hosted LangServe Signup Link (#485) 2024-02-26 14:31:02 -08:00
Eugene Yurtsev 53f265a0f8 Release 0.0.43 (#484)
See release notes
2024-02-26 13:19:48 -05:00
Eugene Yurtsev 25ebe634f2 Fix: Pass dependencies to doc endpont for stream (#483)
This PR fixes a bug that wasn't making dependency information
show up for the documentation of the stream endpoint.

The dependencies were correctly applied for the endpoint itself,
so only the documentation is affected for /stream endpoint.
2024-02-26 13:19:18 -05:00
Eugene Yurtsev 594527e90b Update .clabot (#480) 2024-02-22 10:22:16 -05:00
Eugene Yurtsev ddb6ecbdbf release version 0.0.42 (#477)
see release notes
2024-02-22 10:11:45 -05:00
Eugene Yurtsev e1cec832da patch: name used for tracing should take into account APIRouter path (#476)
If there is a router at path /foo, and a runnable is added to that
router at
path /bar, the name of the runnable should be /foo/bar for logging
purposes.
2024-02-22 10:09:02 -05:00
Eugene Yurtsev 54725a91ed Examples: Add multiple servers example (#469)
Adds an example of using multiple servers
2024-02-14 13:11:55 -05:00
Eugene Yurtsev d46017048e Update Readme to include path information when disabling the playground (#464)
Clarify how to disable/enable endpoints -- i.e., it's provided as an
extra argument when invoking add_routes
2024-02-13 11:56:54 -05:00
Eugene Yurtsev 03183ebda4 Examples: Remove duplicated examples (#455)
Remove duplicated example
2024-02-06 14:21:05 -05:00
Eugene Yurtsev 1b990368fb Example: Add custom agent streaming (#453)
Show how to implement custom agent streaming
2024-02-06 13:53:13 -05:00
Eugene Yurtsev 3bed90105c Examples: Add chat widget to agent (#452)
* Adds a chat widget to the agent
* Adds chat widget to the chat with history persisted on the user side (but  this is not yet supported by the playground)
2024-02-06 12:30:04 -05:00
Eugene Yurtsev 0561555718 Examples: Improve agent with history example to show astream events usage (#451)
Show how astream events can be used on the server side.
2024-02-06 12:11:13 -05:00
Eugene Yurtsev fa1951f436 Examples: Update agent example to include astream events (#448)
This PR shows an example of astream events on the client side.
2024-02-06 11:33:16 -05:00
Eugene Yurtsev 5f1b2dab8d README.md: fix typos in with_types arguments (#446) 2024-02-06 10:39:39 -05:00
Eugene Yurtsev 853274c286 Update README.md to include absolute link to langserve (#445) 2024-02-06 10:38:18 -05:00
Eugene Yurtsev 90bf613711 Example: Add ollama example for a local LLM (#436) 2024-02-01 19:18:36 -08:00
Eugene Yurtsev 956f0376d8 Release 0.0.41 (#426)
See release notes
2024-01-27 00:12:27 -05:00
Eugene Yurtsev 1828f91bda Fix: Drop non json serializable values in the config prior to sending it to the server (#425)
This PR drops all non json serializable values in the config prior to sending the config to the server.

This seems like the correct behavior in general, which is why it's being merged without exposing a way to control it.

Any non serializable value seem to be used only locallly by the runnable or something that wraps. Server side configurable runnables are supposed to only exposed configuration that is trivially json serializable because that's how configurable runnables were designed.
2024-01-27 00:07:23 -05:00
Eugene Yurtsev 534009a591 Readme: Add information about astream_events (#424)
Add information about astream_events
2024-01-26 16:15:19 -05:00
Eugene Yurtsev 6c77437158 Bump version for release 0.0.40 (#423)
See release notes
2024-01-26 15:52:57 -05:00
Eugene Yurtsev 02319e5a8f Add StreamEventRequest type, update OpenAPIDocs (#422)
This PR adds a type for StreamEventsRequest and updates OpenAPI docs.
2024-01-26 15:41:49 -05:00
Eugene Yurtsev f41fb26daa Tests: inlclude astream events endpoint in testing enabled/disabled endpoint config (#421)
This PR will make sure that enabled/disabled config for astream events
works correctly.
2024-01-26 14:39:07 -05:00
Eugene Yurtsev 65f50b333d Tests: test stream events with chat model output (#420)
Verify that serialization with chat model output works
2024-01-26 14:34:37 -05:00
Eugene Yurtsev 5a9adbbf0b Tests: re-organize utilities and chat model utility (#419)
Add utility code to mock a chat model
2024-01-26 14:20:10 -05:00
Eugene Yurtsev 0c6faa37c5 astream events: Add serializtion path tests (#418)
Add tests on the serialization path for astream events
2024-01-26 14:19:54 -05:00
Eugene Yurtsev a8cbaf57e2 patch: rename internal function name (#417)
Rename name of function that cleans up metadata before sending to user
2024-01-26 12:06:01 -05:00
Eugene Yurtsev e7315e3ee1 Strip internal keys from metadata (#416)
This PR will make sure that we strip internal information from the event metadata.
2024-01-26 12:02:52 -05:00
Eugene Yurtsev 16eb5247bd Add astream_events support to Remote Runnable (#415)
Add astream events to Remote Runnable
2024-01-26 11:42:56 -05:00
Eugene Yurtsev 3dc83cc5a2 Add astream_events support to langserve (#412)
This PR adds initial support to langserve for the new astream events
Runnable method.
2024-01-26 11:09:37 -05:00
Eugene Yurtsev a7c2a94bb7 Update README with new example (#400)
Include new example in readme
2024-01-18 14:42:52 -05:00
Eugene Yurtsev 18b35f8e30 Example: Add agent with history (#399)
Add an example showing an agent with history
2024-01-18 14:36:50 -05:00
Bagatur d5e6a7cd38 docs: fix links README (#391) 2024-01-10 17:33:14 -05:00
Eugene Yurtsev 8ab404d15d Release 0.0.39 (#390)
See release notes
2024-01-10 12:18:10 -05:00
Eugene Yurtsev 047a47e706 Playground: Use 1 and 0 for feedback score instead of 1 and -1 (#388)
Use 1 and 0 for feedback scores instead of 1 and -1
2024-01-10 11:39:34 -05:00
Eugene Yurtsev d3fabc6f0f Example: Add example of configurable runnable used in agent executor (#382)
Adds an example that shows how to create a custom runnable for a more
complex use case.

Shows how to create a workaround for this issue:
https://github.com/langchain-ai/langserve/issues/314 while the
underlying bug is being fixed in langchain.
2024-01-05 22:16:06 -05:00
Eugene Yurtsev 23472f7c5d Update agent client example with streaming/stream log (#379)
This PR updates the notebook and server to show how to stream and stream
log responses from the agent.

The stream log response will contain individual llm tokens after turning
streaming=True on the underlying LLM.
2024-01-05 17:28:03 -05:00
Eugene Yurtsev 3c94bf39b4 README: Add more documentation, some reformatting, add more links to examples (#374)
README updates
2024-01-05 10:53:03 -05:00
Eugene Yurtsev ff5551e651 README.md: Add client links to examples tables (#373)
Add client links to examples table
2024-01-05 10:14:37 -05:00
Eugene Yurtsev a37b50cdf3 Add examples table and reformat README (#372)
Add table with examples
2024-01-05 09:55:35 -05:00
Eugene Yurtsev 470f047c00 Version 0.0.38 (#371)
See release notes
2024-01-05 09:10:26 -05:00
Eugene Yurtsev b45a082b60 Example: Add per user retriever with auth using APIHandler (#370)
This PR adds an example that shows how to implement per user logic with sample Auth using the APIHandler primitive.

Another example for:
https://github.com/langchain-ai/langserve/issues/354
2024-01-04 22:16:57 -05:00
Eugene Yurtsev 39ec0b42ad Bump langchain (#369)
Bump langchain and update some unit tests to keep up with some
improvements in how schema are named.
2024-01-04 16:56:27 -05:00
Eugene Yurtsev 6ab86af83f Example: Per user logic using per request modifier (#368)
Add an example that shows how to implement per user logic using per request modifier.
2024-01-04 16:26:17 -05:00
Eugene Yurtsev b3dd8a6ab3 Improvement: Support awaitable for per request config modifier (#366)
This PR makes sure that users can pass an async per request config
modifier, so one can access different properties of the raw request object.
2024-01-04 10:10:12 -05:00
João Galego 1d6ffbc29f docs: AWS deployment (via Copilot CLI) (#307)
This PR adds a one-liner deployment option to AWS via ECS + Fargate
using the [Copilot CLI](https://github.com/aws/copilot-cli).

**Advanced**
- `*_API_KEY`'s can be managed securely with
[secrets](https://aws.github.io/copilot-cli/docs/developing/secrets/)
- custom resources (like IAM policies granting `bedrock:InvokeModel*`
access to specific models) can be easily handled with [addon
templates](https://aws.github.io/copilot-cli/docs/developing/addons/workload/#what-does-an-addon-template-look-like)

---------

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-01-03 21:21:31 -05:00
Luciano Tonet e26a946e6c Update README.md (#350)
Fix typo

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2024-01-03 21:20:21 -05:00
Eugene Yurtsev 49ee20c75a Update .clabot (#364) 2024-01-03 21:17:45 -05:00
Eugene Yurtsev f044ddb755 Add auth explanations to readme (#363)
This PR updates the README.md file with more information about how to
handle authentication. We still don't have good examples that show how
to handle users w/ per request config modifier or with API Handler.
2024-01-03 14:50:21 -05:00
Eugene Yurtsev f85c1b37dd Add ability to pass path dependencies through add_routes (#361)
This PR adds the ability to specify path dependencies through
add_routes.

This is useful whenever the dependencies need to be solved, but their
return value is not important; e.g., this could be a simple way to do
authentication, assuming all authenticated users have the same authorization privileges.
2024-01-03 13:30:01 -05:00
Eugene Yurtsev 15a3c9b6a1 Example: Add auth using global dependencies (#360)
Add an example that shows how to use FastAPI global dependencies for
auth.

Will follow up with more involved examples.
2024-01-03 12:06:42 -05:00
Eugene Yurtsev 559f990d93 Update link to CLA (#359)
https://github.com/langchain-ai/langserve/issues/357
2024-01-03 11:46:15 -05:00
jakerachleff 76669c2437 update env vars for hosted langserve (#347)
Modifies the env vars we send to hosted langserve to uniquely identify
the piece of code that created the env var
2023-12-24 11:08:08 -08:00
Eugene Yurtsev cf180b81da Version 0.0.37 (#342)
See release notes
2023-12-20 22:05:43 -05:00
Eugene Yurtsev b3e728d95d Only run per request modifier for invoke,batch,stream,astream_log (#341)
This only runs the per request modifier for the endpoints where one
would expect it to be run.

If there is another use case, please file an issue explaining it and
we'll accommodate it.

https://github.com/langchain-ai/langserve/issues/325
2023-12-20 17:44:55 -05:00
Eugene Yurtsev 08b12b3e22 Update README.md with chat widget information (#340)
Add information about chat widgets
2023-12-20 16:24:27 -05:00
Eugene Yurtsev 93490c294d Update widgets example (#339)
This updates the widgets example. One of the chat histories actually
uses a model, which makes it much more obvious what's going on.

![image](https://github.com/langchain-ai/langserve/assets/3205522/0c1182a8-d1cb-4a44-b8c0-0e0f4cbac81b)
2023-12-20 16:24:15 -05:00
Eugene Yurtsev 3c3e872b1d Clean up endpoints (#338)
Remove feedback related endpoints that take a config hash. The feedback
endpoints only care about the run_id and the feedback, so a config hash
should not be needed.

Also removing the `get` version of checking if feedback is enabled. I'll
transition both the UI and the backend in a bit.
2023-12-20 15:31:27 -05:00
Eugene Yurtsev 245ace4779 Expose API Handler (#333)
* Exposes the underlying API handler, so that developers can use it
directly.
* Document more of the API handler methods.
* Adds an optional server_config to each endpoint on the API handler to
provide developers with maximal flexibility in terms of specifying
configuration dynamically.
2023-12-20 15:03:11 -05:00
Eugene Yurtsev aefd94aa50 Update feedback enabled endpoint (#332)
Update feedback endabled endpoint behavior
2023-12-15 12:03:45 -05:00
Eugene Yurtsev 5eaff89403 Update API Handler marking some fields as private (#329)
This PR updates API handler to mark some of its fields as private in
preparation for exposing the underlying API handler as public.

Also fixes some incorrect type annotations.
2023-12-15 11:02:19 -05:00
Eugene Yurtsev 34b96e5aa5 Remove test that seems to cause deadlock for python 3.9 during unit tests (#319)
Check withotu test
2023-12-13 10:46:21 -05:00
Eugene Yurtsev c1e0fb2a64 Release 0.0.36 (#323)
See release notes
2023-12-13 10:12:12 -05:00
Eugene Yurtsev 352b196e7a Add backend persisted chat with user id example (#318)
Adds an example that has chat persistence on backend and user
identification.
2023-12-12 23:00:00 -05:00
Eugene Yurtsev 87b54a3f0d Allow user to configure callbacks server side (#317)
This PR makes it possible for a user to configure server side callbacks.

A user can specify a per request modifier to add callbacks into the
config, without them being over-written by the event aggregator
callback.
2023-12-12 21:40:33 -05:00
Eugene Yurtsev 3c6cce8616 Chat Backend with session_id (#310)
Example with of chat history persisted on backend.

This is using just session id.

Will add another example that mimicks auth for user identification once
new changes to RunnableWithMessageHistory becomes available.
2023-12-10 22:33:18 -05:00
Eugene Yurtsev 5ec58217cf Release 0.0.35 (#309)
See release notes
2023-12-08 22:33:47 -05:00
Bob Lin f66933452e Fix request url path (#304)
Under the current configuration, if the request URL ends with a slash, a
307 jump will actually occur.

for example:

  ```bash
curl --location --request POST 'http://localhost:8000/joke/invoke/' \
     --header 'Content-Type: application/json' \
     --data-raw '{
         "input": {
             "topic": "cats"
         }
     }'
```

In fact, 2 requests were generated:

```bash
INFO: 127.0.0.1:53936 - "POST /joke/invoke/ HTTP/1.1" 307 Temporary
Redirect
INFO: 127.0.0.1:53936 - "POST /joke/invoke HTTP/1.1" 200 OK
```

If this is the case, users should be directed to use the URL directly without the slashes

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-12-08 22:30:49 -05:00
Paul Lockett 7a82f03454 Add a Deploy to Railway Button (#252)
This adds a one click deploy button for railway that deploys LangServe
with the ability to use templates.

Co-authored-by: Eugene Yurtsev <eyurtsev@gmail.com>
2023-12-08 22:08:32 -05:00
Eugene Yurtsev b4f6ba0a10 Update passthrough dict documentation (#306) 2023-12-08 16:33:06 -05:00
jakerachleff 76e9e83540 auto enable feedback for hosted langserve (#302)
This PR makes it so that feedback is on by default for hosted langserve,
but not for OSS langserve.
2023-12-08 13:31:35 -08:00
Eugene Yurtsev 4a8ec72754 Passthrough example (#305)
Including an example to show how to do pass through of arbitrary inputs
to the response
2023-12-08 16:03:31 -05:00
158 changed files with 32181 additions and 5373 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
{
"contributors": ["eyurtsev", "hwchase17", "nfcampos", "efriis", "jacoblee93", "dqbd", "kreneskyp", "adarsh-jha-dev", "harris", "baskaryan", "hinthornw", "bracesproul", "jakerachleff", "craigsdennis", "anhi", "169", "LarchLiu", "PaulLockett", "RCMatthias", "jwynia", "majiayu000", "mpskex", "shivachittamuru", "sinashaloudegi", "sowsan", "akira"],
"message": "Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the username {{usersWithoutCLA}} on file. In order for us to review and merge your code, please complete the Individual Contributor License Agreement here https://forms.gle/Ljhqvt9Gdi1N385W6 .\n\nThis process is done manually on our side, so after signing the form one of the maintainers will add you to the contributors list.\n\nFor more details about why we have a CLA and other contribution guidelines please see: https://github.com/langchain-ai/langserve/blob/main/CONTRIBUTING.md."
"contributors": ["eyurtsev", "hwchase17", "nfcampos", "efriis", "jacoblee93", "dqbd", "kreneskyp", "adarsh-jha-dev", "harris", "baskaryan", "hinthornw", "bracesproul", "jakerachleff", "craigsdennis", "anhi", "169", "LarchLiu", "PaulLockett", "RCMatthias", "jwynia", "majiayu000", "mpskex", "shivachittamuru", "sinashaloudegi", "sowsan", "akira", "lucianotonet", "JGalego", "nat-n", "dirien", "donbr", "rahilvora", "WarrenTheRabbit", "StreetLamb", "ccurme", "dennisrall", "Mingqi2", "xxsl", "joaquin-borggio-lc"],
"message": "Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have the username {{usersWithoutCLA}} on file. In order for us to review and merge your code, please complete the Individual Contributor License Agreement here https://forms.gle/AQFbtkWRoHXUgipM6 .\n\nThis process is done manually on our side, so after signing the form one of the maintainers will add you to the contributors list.\n\nFor more details about why we have a CLA and other contribution guidelines please see: https://github.com/langchain-ai/langserve/blob/main/CONTRIBUTING.md."
}
+19
View File
@@ -0,0 +1,19 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file
version: 2
updates:
- package-ecosystem: "pip" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

+6 -4
View File
@@ -1,4 +1,6 @@
name: lint
permissions:
contents: read
on:
workflow_call:
@@ -31,10 +33,10 @@ jobs:
# Starting new jobs is also relatively slow,
# so linting on fewer versions makes CI faster.
python-version:
- "3.8"
- "3.10"
- "3.11"
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
with:
# Fetch the last FETCH_DEPTH commits, so the mtime-changing script
# can accurately set the mtimes of files modified in the last FETCH_DEPTH commits.
@@ -115,7 +117,7 @@ jobs:
poetry install --with dev,lint,test,typing
- name: Restore black cache
uses: actions/cache@v3
uses: actions/cache@v5
env:
CACHE_BASE: black-${{ runner.os }}-${{ runner.arch }}-py${{ matrix.python-version }}-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/poetry.lock', env.WORKDIR)) }}
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "1"
@@ -128,7 +130,7 @@ jobs:
${{ env.CACHE_BASE }}-
- name: Get .mypy_cache to speed up mypy
uses: actions/cache@v3
uses: actions/cache@v5
env:
SEGMENT_DOWNLOAD_TIMEOUT_MIN: "2"
with:
@@ -1,94 +0,0 @@
name: pydantic v1/v2 compatibility
on:
workflow_call:
inputs:
working-directory:
required: true
type: string
description: "From which folder this pipeline executes"
env:
POETRY_VERSION: "1.5.1"
jobs:
build:
timeout-minutes: 10
defaults:
run:
working-directory: ${{ inputs.working-directory }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
name: Pydantic v1/v2 compatibility - Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
with:
python-version: ${{ matrix.python-version }}
poetry-version: ${{ env.POETRY_VERSION }}
working-directory: ${{ inputs.working-directory }}
cache-key: pydantic-cross-compat
- name: Install dependencies
shell: bash
run: poetry install
- name: Install the opposite major version of pydantic
# If normal tests use pydantic v1, here we'll use v2, and vice versa.
shell: bash
run: |
# Determine the major part of pydantic version
REGULAR_VERSION=$(poetry run python -c "import pydantic; print(pydantic.__version__)" | cut -d. -f1)
if [[ "$REGULAR_VERSION" == "1" ]]; then
PYDANTIC_DEP=">=2.1,<3"
TEST_WITH_VERSION="2"
elif [[ "$REGULAR_VERSION" == "2" ]]; then
PYDANTIC_DEP="<2"
TEST_WITH_VERSION="1"
else
echo "Unexpected pydantic major version '$REGULAR_VERSION', cannot determine which version to use for cross-compatibility test."
exit 1
fi
# Install via `pip` instead of `poetry add` to avoid changing lockfile,
# which would prevent caching from working: the cache would get saved
# to a different key than where it gets loaded from.
poetry run pip install "pydantic${PYDANTIC_DEP}"
# Ensure that the correct pydantic is installed now.
echo "Checking pydantic version... Expecting ${TEST_WITH_VERSION}"
# Determine the major part of pydantic version
CURRENT_VERSION=$(poetry run python -c "import pydantic; print(pydantic.__version__)" | cut -d. -f1)
# Check that the major part of pydantic version is as expected, if not
# raise an error
if [[ "$CURRENT_VERSION" != "$TEST_WITH_VERSION" ]]; then
echo "Error: expected pydantic version ${CURRENT_VERSION} to have been installed, but found: ${TEST_WITH_VERSION}"
exit 1
fi
echo "Found pydantic version ${CURRENT_VERSION}, as expected"
- name: Run pydantic compatibility tests
shell: bash
run: make test
- name: Ensure the tests did not create any additional files
shell: bash
run: |
set -eu
STATUS="$(git status)"
echo "$STATUS"
# grep will exit non-zero if the target message isn't found,
# and `set -e` above will cause the step to fail.
echo "$STATUS" | grep 'nothing to commit, working tree clean'
+7 -1
View File
@@ -7,6 +7,12 @@ on:
required: true
type: string
description: "From which folder this pipeline executes"
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
inputs:
working-directory:
required: true
type: string
description: "From which folder this pipeline executes"
env:
POETRY_VERSION: "1.5.1"
@@ -30,7 +36,7 @@ jobs:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
+1 -3
View File
@@ -20,13 +20,11 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
name: Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
+1 -1
View File
@@ -25,7 +25,7 @@ jobs:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
+5 -10
View File
@@ -18,6 +18,10 @@ on:
- 'Makefile'
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
# This workflow only needs to read the repo contents.
permissions:
contents: read
# If another push to the same PR or branch happens while this workflow is still running,
# cancel the earlier run in favor of the next run.
#
@@ -39,13 +43,6 @@ jobs:
with:
working-directory: .
secrets: inherit
pydantic-compatibility:
uses:
./.github/workflows/_pydantic_compatibility.yml
with:
working-directory: .
secrets: inherit
test:
timeout-minutes: 10
runs-on: ubuntu-latest
@@ -55,13 +52,11 @@ jobs:
strategy:
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
name: Python ${{ matrix.python-version }} tests
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }} + Poetry ${{ env.POETRY_VERSION }}
uses: "./.github/actions/poetry_setup"
+8
View File
@@ -4,10 +4,18 @@ name: Release
on:
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
permissions:
contents: read
jobs:
release:
uses:
./.github/workflows/_release.yml
with:
working-directory: .
permissions:
# Trusted publishing to PyPI
id-token: write
# Creating GitHub releases
contents: write
secrets: inherit
@@ -4,10 +4,16 @@ name: Test Release
on:
workflow_dispatch: # Allows to trigger the workflow manually in GitHub UI
permissions:
contents: read
jobs:
release:
uses:
./.github/workflows/_test_release.yml
with:
working-directory: .
permissions:
# Trusted publishing to TestPyPI
id-token: write
secrets: inherit
+3
View File
@@ -160,3 +160,6 @@ cython_debug/
#.idea/
.envrc
# IntelliJ IDE's
.idea
+29
View File
@@ -49,3 +49,32 @@ To run linting for this project:
```sh
make lint
```
## Frontend Playground Development
Here are a few tips to keep in mind when developing the LangServe playgrounds:
### Setup
Switch directories to `langserve/playground` or `langserve/chat_playground`, then run `yarn` to install required
dependencies. `yarn dev` will start the playground at `http://localhost:5173/____LANGSERVE_BASE_URL/` in dev mode.
You can run one of the chains in the `examples/` repo using `poetry run python path/to/file.py`.
### Setting CORS
You may need to add the following to an example route when developing the playground in dev mode to handle CORS:
```python
from fastapi.middleware.cors import CORSMiddleware
# Set all CORS enabled origins
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["*"],
)
```
+222
View File
@@ -0,0 +1,222 @@
# LangGraph Platform Migration Guide
We have [recently announced](https://blog.langchain.dev/langgraph-platform-announce/) LangGraph Platform, a ***significantly*** enhanced solution for deploying agentic applications at scale.
LangGraph Platform incorporates [key design patterns and capabilities](https://langchain-ai.github.io/langgraph/concepts/langgraph_platform/#option-2-leveraging-langgraph-platform-for-complex-deployments) essential for production-level deployment of large language model (LLM) applications.
In contrast to LangServe, LangGraph Platform provides comprehensive, out-of-the-box support for [persistence](https://langchain-ai.github.io/langgraph/concepts/application_structure/), [memory](https://langchain-ai.github.io/langgraph/concepts/assistants/), [double-texting handling](https://langchain-ai.github.io/langgraph/concepts/double_texting/), [human-in-the-loop workflows](https://langchain-ai.github.io/langgraph/concepts/assistants/), [cron job scheduling](https://langchain-ai.github.io/langgraph/concepts/langgraph_server/#cron-jobs), [webhooks](https://langchain-ai.github.io/langgraph/concepts/langgraph_server/#webhooks), high-load management, advanced streaming, support for long-running tasks, background task processing, and much more.
The LangGraph Platform ecosystem includes the following components:
- [LangGraph Server](https://langchain-ai.github.io/langgraph/concepts/langgraph_server/): Provides an [Assistants API](https://langchain-ai.github.io/langgraph/cloud/reference/api/api_ref.html) for LLM applications (graphs) built with [LangGraph](https://langchain-ai.github.io/langgraph/). Available in both Python and JavaScript/TypeScript.
- [LangGraph Studio](https://langchain-ai.github.io/langgraph/concepts/langgraph_studio/): A specialized IDE for real-time visualization, debugging, and interaction via a graphical interface. Available as a web application or macOS desktop app, it's a substantial improvement over LangServe's playground.
- [SDK](https://langchain-ai.github.io/langgraph/concepts/sdk/): Enables programmatic interaction with the server, available in Python and JavaScript/TypeScript.
- [RemoteGraph](https://langchain-ai.github.io/langgraph/how-tos/use-remote-graph/): Allows interaction with a remote graph as if it were running locally, serving as LangGraph's equivalent to LangServe's RemoteRunnable. Available in both Python and JavaScript/TypeScript.
## Context
LangServe was built as a deployment solution for LangChain Runnables created using the [LangChain Expression Language (LCEL)](https://python.langchain.com/docs/concepts/lcel). In LangServe, the LCEL was the orchestration layer that managed the execution of the Runnable.
[LangGraph](https://langchain-ai.github.io/langgraph/) is an open source library created by the LangChain team that provides a more flexible orchestration layer that's better suited for creating more complex LLM applications. LangGraph Platform
is the deployment solution for LangGraph applications.
## LangServe Support
We recommend using LangGraph Platform rather than LangServe for new projects.
We will continue to accept bug fixes for LangServe from the community; however, we will not be accepting new feature contributions.
## Migration
If you would like to migrate an existing LangServe application to LangGraph Platform, you have two options:
1. You can wrap the existing `Runnable` that you expose in the LangServe application via `add_routes` in a `LangGraph` node. This is the quickest way to migrate your application to LangGraph Platform.
2. You can do a larger refactor to break up the existing LCEL into appropriate `LangGraph` nodes. This is recommended if you want to take advantage of more advanced features in LangGraph Platform.
### Option 1: Wrap Runnable in LangGraph Node
This option is the quickest way to migrate your application to LangGraph Platform. You can wrap the existing `Runnable` that you expose in the LangServe application via `add_routes` in a `LangGraph` node.
Original LangServe code:
```python
from langserve import add_routes
app = FastAPI()
# Some input schema
class Input(BaseModel):
input: str
foo: Optional[str]
# Some output schema
class Output(BaseModel):
output: Any
runnable = .... # Your existing Runnable
runnable_with_types = runnable.with_types(input_type=Input, output_type=Output)
# Adds routes to the app for using the chain under:
add_routes(
app,
runnable_with_types,
)
```
Migrated LangGraph Platform code:
```python
@dataclass
class InputState: # Equivalent to Input in the original code
"""Defines the input state, representing a narrower interface to the outside world.
This class is used to define the initial state and structure of incoming data.
See: https://langchain-ai.github.io/langgraph/concepts/low_level/#state
for more information.
"""
input: str
foo: Optional[str] = None
@dataclass
class OutputState: # Equivalent to Output in the original code
"""Defines the output state, representing a narrower interface to the outside world.
https://langchain-ai.github.io/langgraph/concepts/low_level/#state
"""
output: Any
@dataclass
class SharedState:
"""The full graph state.
https://langchain-ai.github.io/langgraph/concepts/low_level/#state
"""
input: str
foo: Optional[str] = None
output: Any
runnable = ... # Same code as before
async def my_node(state: InputState, config: RunnableConfig) -> OutputState:
"""Each node does work."""
return await runnable.ainvoke({"input": state.input, "foo": state.foo})
# Define a new graph
builder = StateGraph(
SharedState, config_schema=Configuration, input=InputState, output=OutputState
)
# Add the node to the graph
builder.add_node("my_node", my_node)
# Set the entrypoint as `call_model`
builder.add_edge("__start__", "my_node")
# Compile the workflow into an executable graph
graph = builder.compile()
graph.name = "New Graph" # This defines the custom name in LangSmith
```
### 2. Refactor LCEL into LangGraph Nodes
This option is recommended if you want to take advantage of more advanced features in LangGraph Platform.
#### Memory (alternative to `RunnableWithMessageHistory`)
For example, LangGraph comes with built-in persistence that is more general than LangChain's `RunnableWithMessageHistory`.
Please refer to the guide on [upgrading to LangGraph memory](https://python.langchain.com/docs/versions/migrating_memory/) for more details.
#### Agents
If you're relying on legacy LangChain agents, you can migrate them into the pre-built
LangGraph agents. Please refer to the guide on [migrating agents](https://python.langchain.com/docs/how_to/migrate_agent/) for more details.
#### Custom Chains
If you created a custom chain and used LCEL to orchestrate it, you will usually be able to refactor it into a LangGraph without too much difficulty.
There isn't a one-size-fits-all guide for this, but generally speaking, consider creating
a separate node for any long-running step in your LCEL chain or any step that you would
want to be able to monitor or debug separately.
For example, if you have a simple Retrieval Augmented Generation (RAG) pipeline, you might have a node for the retrieval step and a node for the generation step.
Original LCEL code:
```python
...
rag_chain = (
{"context": retriever | format_docs, "question": RunnablePassthrough()}
| prompt
| llm
| StrOutputParser()
)
rag_chain.with_types(input_type=Input, output_type=Output)
```
Using LangGraph for the same pipeline:
```python
@dataclass
class InputState: # Equivalent to Input in the original code
"""Input question from the user."""
question: str
@dataclass
class OutputState: # Equivalent to Output in the original code
"""The output from the graph."""
answer: str
@dataclass
class SharedState:
question: str
docs: List[str]
response: str
async def retriever_node(state: InputState) -> SharedState:
"""Rettrieve documents based on the user's question."""
documents = await retriever.ainvoke({"context": state.question})
return {
"docs": documents
}
async def generator_node(state: SharedState) -> OutputState:
"""Generate an answer using an LLM based on the retrieved documents and question."""
context = " -- DOCUMENT -- ".join(state.docs)
prompt = [
SystemMessage(
content=(
"Answer the user's question based on the list of documents "
"that were retrieved. Here are the documents: \n\n"
f"{context}"
)
),
HumanMessage(content=state.question),
]
ai_message = await llm.ainvoke(prompt)
return {"answer": ai_message.content}
# Define a new graph
builder = StateGraph(
SharedState, config_schema=Configuration, input=InputState, output=OutputState
)
builder.add_node("retriever", retriever_node)
builder.add_node("generator", generator_node)
builder.add_edge("__start__", "retriever")
builder.add_edge("retriever", "generator")
graph = builder.compile()
graph.name = "RAG Graph"
```
Please see the [LangGraph tutorials](https://langchain-ai.github.io/langgraph/tutorials/)
for tutorials and examples that will help you get started with LangGraph
and LangGraph Platform.
+2 -2
View File
@@ -32,12 +32,12 @@ lint format: PYTHON_FILES=.
lint_diff format_diff: PYTHON_FILES=$(shell git diff --relative=. --name-only --diff-filter=d master | grep -E '\.py$$|\.ipynb$$')
lint lint_diff:
poetry run ruff .
poetry run ruff check .
poetry run ruff format $(PYTHON_FILES) --check
format format_diff:
poetry run ruff format $(PYTHON_FILES)
poetry run ruff --select I --fix $(PYTHON_FILES)
poetry run ruff check --select I --fix $(PYTHON_FILES)
spell_check:
poetry run codespell --toml pyproject.toml
+444 -92
View File
@@ -5,42 +5,69 @@
[![Open Issues](https://img.shields.io/github/issues-raw/langchain-ai/langserve)](https://github.com/langchain-ai/langserve/issues)
[![](https://dcbadge.vercel.app/api/server/6adMQxSpJS?compact=true&style=flat)](https://discord.com/channels/1038097195422978059/1170024642245832774)
🚩 We will be releasing a hosted version of LangServe for one-click deployments of LangChain applications. [Sign up here](https://airtable.com/app0hN6sd93QcKubv/shrAjst60xXa6quV2) to get on the waitlist.
> [!WARNING]
> **DEPRECATED** This project has been deprecated since Nov 18, 2024 (https://github.com/langchain-ai/langserve/issues/791).
>
> We recommend using LangGraph Platform rather than LangServe for new projects.
>
> Please see the [LangGraph Platform Migration Guide](./MIGRATION.md) for more information.
>
> We will continue to accept bug fixes for LangServe from the community; however, we
> will not be accepting new feature contributions.
## Overview
`LangServe` helps developers deploy `LangChain` [runnables and chains](https://python.langchain.com/docs/expression_language/) as a REST API.
[LangServe](https://github.com/langchain-ai/langserve) helps developers
deploy `LangChain` [runnables and chains](https://python.langchain.com/docs/expression_language/)
as a REST API.
This library is integrated with [FastAPI](https://fastapi.tiangolo.com/) and uses [pydantic](https://docs.pydantic.dev/latest/) for data validation.
This library is integrated with [FastAPI](https://fastapi.tiangolo.com/) and
uses [pydantic](https://docs.pydantic.dev/latest/) for data validation.
In addition, it provides a client that can be used to call into runnables deployed on a server.
A javascript client is available in [LangChainJS](https://js.langchain.com/docs/api/runnables_remote/classes/RemoteRunnable).
In addition, it provides a client that can be used to call into runnables deployed on a
server.
A JavaScript client is available
in [LangChain.js](https://js.langchain.com/docs/ecosystem/langserve).
## Features
- Input and Output schemas automatically inferred from your LangChain object, and enforced on every API call, with rich error messages
- Input and Output schemas automatically inferred from your LangChain object, and
enforced on every API call, with rich error messages
- API docs page with JSONSchema and Swagger (insert example link)
- Efficient `/invoke/`, `/batch/` and `/stream/` endpoints with support for many concurrent requests on a single server
- `/stream_log/` endpoint for streaming all (or some) intermediate steps from your chain/agent
- Efficient `/invoke`, `/batch` and `/stream` endpoints with support for many
concurrent requests on a single server
- `/stream_log` endpoint for streaming all (or some) intermediate steps from your
chain/agent
- **new** as of 0.0.40, supports `/stream_events` to make it easier to stream without needing to parse the output of `/stream_log`.
- Playground page at `/playground/` with streaming output and intermediate steps
- Built-in (optional) tracing to [LangSmith](https://www.langchain.com/langsmith), just add your API key (see [Instructions](https://docs.smith.langchain.com/)])
- All built with battle-tested open-source Python libraries like FastAPI, Pydantic, uvloop and asyncio.
- Use the client SDK to call a LangServe server as if it was a Runnable running locally (or call the HTTP API directly)
- Built-in (optional) tracing to [LangSmith](https://www.langchain.com/langsmith), just
add your API key (see [Instructions](https://docs.smith.langchain.com/))
- All built with battle-tested open-source Python libraries like FastAPI, Pydantic,
uvloop and asyncio.
- Use the client SDK to call a LangServe server as if it was a Runnable running
locally (or call the HTTP API directly)
- [LangServe Hub](https://github.com/langchain-ai/langchain/blob/master/templates/README.md)
### Limitations
## ⚠️ LangGraph Compatibility
LangServe is designed to primarily deploy simple Runnables and work with well-known primitives in langchain-core.
If you need a deployment option for LangGraph, you should instead be looking at [LangGraph Cloud (beta)](https://langchain-ai.github.io/langgraph/cloud/) which will
be better suited for deploying LangGraph applications.
## Limitations
- Client callbacks are not yet supported for events that originate on the server
- OpenAPI docs will not be generated when using Pydantic V2. Fast API does not support [mixing pydantic v1 and v2 namespaces](https://github.com/tiangolo/fastapi/issues/10360). See section below for more details.
## Hosted LangServe
We will be releasing a hosted version of LangServe for one-click deployments of LangChain applications. [Sign up here](https://airtable.com/app0hN6sd93QcKubv/shrAjst60xXa6quV2) to get on the waitlist.
- Versions of LangServe <= 0.2.0, will not generate OpenAPI docs properly when using Pydantic V2 as Fast API does not support [mixing pydantic v1 and v2 namespaces](https://github.com/tiangolo/fastapi/issues/10360).
See section below for more details. Either upgrade to LangServe>=0.3.0 or downgrade Pydantic to pydantic 1.
## Security
* Vulnerability in Versions 0.0.13 - 0.0.15 -- playground endpoint allows accessing arbitrary files on server. [Resolved in 0.0.16](https://github.com/langchain-ai/langserve/pull/98).
- Vulnerability in Versions 0.0.13 - 0.0.15 -- playground endpoint allows accessing
arbitrary files on
server. [Resolved in 0.0.16](https://github.com/langchain-ai/langserve/pull/98).
## Installation
For both client and server:
@@ -49,32 +76,81 @@ For both client and server:
pip install "langserve[all]"
```
or `pip install "langserve[client]"` for client code, and `pip install "langserve[server]"` for server code.
or `pip install "langserve[client]"` for client code,
and `pip install "langserve[server]"` for server code.
## LangChain CLI 🛠️
Use the `LangChain` CLI to bootstrap a `LangServe` project quickly.
To use the langchain CLI make sure that you have a recent version of `langchain-cli`
To use the langchain CLI make sure that you have a recent version of `langchain-cli`
installed. You can install it with `pip install -U langchain-cli`.
## Setup
**Note**: We use `poetry` for dependency management. Please follow poetry [doc](https://python-poetry.org/docs/) to learn more about it.
### 1. Create new app using langchain cli command
```sh
langchain app new ../path/to/directory
langchain app new my-app
```
### 2. Define the runnable in add_routes. Go to server.py and edit
```sh
add_routes(app. NotImplemented)
```
### 3. Use `poetry` to add 3rd party packages (e.g., langchain-openai, langchain-anthropic, langchain-mistral, etc).
```sh
poetry add [package-name] // e.g `poetry add langchain-openai`
```
### 4. Set up relevant env variables. For example,
```sh
export OPENAI_API_KEY="sk-..."
```
### 5. Serve your app
```sh
poetry run langchain serve --port=8100
```
## Examples
Get your LangServe instance started quickly with
[LangChain Templates](https://github.com/langchain-ai/langchain/blob/master/templates/README.md).
Get your LangServe instances started quickly with the [examples](https://github.com/langchain-ai/langserve/tree/main/examples)
directory.
For more examples, see the templates
[index](https://github.com/langchain-ai/langchain/blob/master/templates/docs/INDEX.md)
or the [examples](https://github.com/langchain-ai/langserve/tree/main/examples) directory.
| Description | Links |
| :----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **LLMs** Minimal example that reserves OpenAI and Anthropic chat models. Uses async, supports batching and streaming. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/llm/server.py), [client](https://github.com/langchain-ai/langserve/blob/main/examples/llm/client.ipynb) |
| **Retriever** Simple server that exposes a retriever as a runnable. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/retrieval/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/retrieval/client.ipynb) |
| **Conversational Retriever** A [Conversational Retriever](https://python.langchain.com/docs/expression_language/cookbook/retrieval#conversational-retrieval-chain) exposed via LangServe | [server](https://github.com/langchain-ai/langserve/tree/main/examples/conversational_retrieval_chain/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/conversational_retrieval_chain/client.ipynb) |
| **Agent** without **conversation history** based on [OpenAI tools](https://python.langchain.com/docs/modules/agents/agent_types/openai_functions_agent) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/agent/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/agent/client.ipynb) |
| **Agent** with **conversation history** based on [OpenAI tools](https://python.langchain.com/docs/modules/agents/agent_types/openai_functions_agent) | [server](https://github.com/langchain-ai/langserve/blob/main/examples/agent_with_history/server.py), [client](https://github.com/langchain-ai/langserve/blob/main/examples/agent_with_history/client.ipynb) |
| [RunnableWithMessageHistory](https://python.langchain.com/docs/expression_language/how_to/message_history) to implement chat persisted on backend, keyed off a `session_id` supplied by client. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/chat_with_persistence/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/chat_with_persistence/client.ipynb) |
| [RunnableWithMessageHistory](https://python.langchain.com/docs/expression_language/how_to/message_history) to implement chat persisted on backend, keyed off a `conversation_id` supplied by client, and `user_id` (see Auth for implementing `user_id` properly). | [server](https://github.com/langchain-ai/langserve/tree/main/examples/chat_with_persistence_and_user/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/chat_with_persistence_and_user/client.ipynb) |
| [Configurable Runnable](https://python.langchain.com/docs/expression_language/how_to/configure) to create a retriever that supports run time configuration of the index name. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/configurable_retrieval/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/configurable_retrieval/client.ipynb) |
| [Configurable Runnable](https://python.langchain.com/docs/expression_language/how_to/configure) that shows configurable fields and configurable alternatives. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/configurable_chain/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/configurable_chain/client.ipynb) |
| **APIHandler** Shows how to use `APIHandler` instead of `add_routes`. This provides more flexibility for developers to define endpoints. Works well with all FastAPI patterns, but takes a bit more effort. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/api_handler_examples/server.py) |
| **LCEL Example** Example that uses LCEL to manipulate a dictionary input. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/passthrough_dict/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/passthrough_dict/client.ipynb) |
| **Auth** with `add_routes`: Simple authentication that can be applied across all endpoints associated with app. (Not useful on its own for implementing per user logic.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/global_deps/server.py) |
| **Auth** with `add_routes`: Simple authentication mechanism based on path dependencies. (No useful on its own for implementing per user logic.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/path_dependencies/server.py) |
| **Auth** with `add_routes`: Implement per user logic and auth for endpoints that use per request config modifier. (**Note**: At the moment, does not integrate with OpenAPI docs.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/per_req_config_modifier/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/auth/per_req_config_modifier/client.ipynb) |
| **Auth** with `APIHandler`: Implement per user logic and auth that shows how to search only within user owned documents. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/api_handler/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/auth/api_handler/client.ipynb) |
| **Widgets** Different widgets that can be used with playground (file upload and chat) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/widgets/chat/tuples/server.py) |
| **Widgets** File upload widget used for LangServe playground. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing/client.ipynb) |
## Sample Application
### Server
Here's a server that deploys an OpenAI chat model, an Anthropic chat model, and a chain that uses
Here's a server that deploys an OpenAI chat model, an Anthropic chat model, and a chain
that uses
the Anthropic model to tell a joke about a topic.
```python
@@ -84,26 +160,25 @@ from langchain.prompts import ChatPromptTemplate
from langchain.chat_models import ChatAnthropic, ChatOpenAI
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="A simple api server using Langchain's Runnable interfaces",
title="LangChain Server",
version="1.0",
description="A simple api server using Langchain's Runnable interfaces",
)
add_routes(
app,
ChatOpenAI(),
ChatOpenAI(model="gpt-3.5-turbo-0125"),
path="/openai",
)
add_routes(
app,
ChatAnthropic(),
ChatAnthropic(model="claude-3-haiku-20240307"),
path="/anthropic",
)
model = ChatAnthropic()
model = ChatAnthropic(model="claude-3-haiku-20240307")
prompt = ChatPromptTemplate.from_template("tell me a joke about {topic}")
add_routes(
app,
@@ -117,19 +192,39 @@ if __name__ == "__main__":
uvicorn.run(app, host="localhost", port=8000)
```
If you intend to call your endpoint from the browser, you will also need to set CORS headers.
You can use FastAPI's built-in middleware for that:
```python
from fastapi.middleware.cors import CORSMiddleware
# Set all CORS enabled origins
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["*"],
)
```
### Docs
If you've deployed the server above, you can view the generated OpenAPI docs using:
> ⚠️ If using pydantic v2, docs will not be generated for *invoke*, *batch*, *stream*, *stream_log*. See [Pydantic](#pydantic) section below for more details.
> ⚠️ If using LangServe <= 0.2.0 and pydantic v2, docs will not be generated for _invoke_, _batch_, _stream_,
> _stream_log_. See [Pydantic](#pydantic) section below for more details.
> To resolve please upgrade to LangServe 0.3.0.
```sh
curl localhost:8000/docs
```
make sure to **add** the `/docs` suffix.
make sure to **add** the `/docs` suffix.
> ⚠️ Index page `/` is not defined by **design**, so `curl localhost:8000` or visiting the URL
> ⚠️ Index page `/` is not defined by **design**, so `curl localhost:8000` or visiting
> the URL
> will return a 404. If you want content at `/` define an endpoint `@app.get("/")`.
### Client
@@ -171,13 +266,13 @@ chain = prompt | RunnableMap({
"anthropic": anthropic,
})
chain.batch([{ "topic": "parrots" }, { "topic": "cats" }])
chain.batch([{"topic": "parrots"}, {"topic": "cats"}])
```
In TypeScript (requires LangChain.js version 0.0.166 or later):
```typescript
import { RemoteRunnable } from "langchain/runnables/remote";
import { RemoteRunnable } from "@langchain/core/runnables/remote";
const chain = new RemoteRunnable({
url: `http://localhost:8000/joke/`,
@@ -191,8 +286,9 @@ Python using `requests`:
```python
import requests
response = requests.post(
"http://localhost:8000/joke/invoke/",
"http://localhost:8000/joke/invoke",
json={'input': {'topic': 'cats'}}
)
response.json()
@@ -201,7 +297,7 @@ response.json()
You can also use `curl`:
```sh
curl --location --request POST 'http://localhost:8000/joke/invoke/' \
curl --location --request POST 'http://localhost:8000/joke/invoke' \
--header 'Content-Type: application/json' \
--data-raw '{
"input": {
@@ -217,9 +313,9 @@ The following code:
```python
...
add_routes(
app,
runnable,
path="/my_runnable",
app,
runnable,
path="/my_runnable",
)
```
@@ -228,16 +324,24 @@ adds of these endpoints to the server:
- `POST /my_runnable/invoke` - invoke the runnable on a single input
- `POST /my_runnable/batch` - invoke the runnable on a batch of inputs
- `POST /my_runnable/stream` - invoke on a single input and stream the output
- `POST /my_runnable/stream_log` - invoke on a single input and stream the output, including output of intermediate steps as it's generated
- `POST /my_runnable/stream_log` - invoke on a single input and stream the output,
including output of intermediate steps as it's generated
- `POST /my_runnable/astream_events` - invoke on a single input and stream events as they are generated,
including from intermediate steps.
- `GET /my_runnable/input_schema` - json schema for input to the runnable
- `GET /my_runnable/output_schema` - json schema for output of the runnable
- `GET /my_runnable/config_schema` - json schema for config of the runnable
These endpoints match the [LangChain Expression Language interface](https://python.langchain.com/docs/expression_language/interface) -- please reference this documentation for more details.
These endpoints match
the [LangChain Expression Language interface](https://python.langchain.com/docs/expression_language/interface) --
please reference this documentation for more details.
## Playground
You can find a playground page for your runnable at `/my_runnable/playground/`. This exposes a simple UI to [configure](https://python.langchain.com/docs/expression_language/how_to/configure) and invoke your runnable with streaming output and intermediate steps.
You can find a playground page for your runnable at `/my_runnable/playground/`. This
exposes a simple UI
to [configure](https://python.langchain.com/docs/expression_language/how_to/configure)
and invoke your runnable with streaming output and intermediate steps.
<p align="center">
<img src="https://github.com/langchain-ai/langserve/assets/3205522/5ca56e29-f1bb-40f4-84b5-15916384a276" width="50%"/>
@@ -245,34 +349,116 @@ You can find a playground page for your runnable at `/my_runnable/playground/`.
### Widgets
The playground supports [widgets](#playground-widgets) and can be used to test your runnable with different inputs.
In addition, for configurable runnables, the playground will allow you to configure the runnable and share a link with the configuration:
The playground supports [widgets](#playground-widgets) and can be used to test your
runnable with different inputs. See the [widgets](#widgets) section below for more
details.
### Sharing
In addition, for configurable runnables, the playground will allow you to configure the
runnable and share a link with the configuration:
<p align="center">
<img src="https://github.com/langchain-ai/langserve/assets/3205522/86ce9c59-f8e4-4d08-9fa3-62030e0f521d" width="50%"/>
</p>
## Chat playground
LangServe also supports a chat-focused playground that opt into and use under `/my_runnable/playground/`.
Unlike the general playground, only certain types of runnables are supported - the runnable's input schema must
be a `dict` with either:
- a single key, and that key's value must be a list of chat messages.
- two keys, one whose value is a list of messages, and the other representing the most recent message.
We recommend you use the first format.
The runnable must also return either an `AIMessage` or a string.
To enable it, you must set `playground_type="chat",` when adding your route. Here's an example:
```python
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful, professional assistant named Cob."),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = prompt | ChatAnthropic(model="claude-2.1")
class InputChat(BaseModel):
"""Input for the chat endpoint."""
messages: List[Union[HumanMessage, AIMessage, SystemMessage]] = Field(
...,
description="The chat messages representing the current conversation.",
)
add_routes(
app,
chain.with_types(input_type=InputChat),
enable_feedback_endpoint=True,
enable_public_trace_link_endpoint=True,
playground_type="chat",
)
```
If you are using LangSmith, you can also set `enable_feedback_endpoint=True` on your route to enable thumbs-up/thumbs-down buttons
after each message, and `enable_public_trace_link_endpoint=True` to add a button that creates a public traces for runs.
Note that you will also need to set the following environment variables:
```bash
export LANGCHAIN_TRACING_V2="true"
export LANGCHAIN_PROJECT="YOUR_PROJECT_NAME"
export LANGCHAIN_API_KEY="YOUR_API_KEY"
```
Here's an example with the above two options turned on:
<p align="center">
<img src="./.github/img/chat_playground.png" width="50%"/>
</p>
Note: If you enable public trace links, the internals of your chain will be exposed. We recommend only using this setting
for demos or testing.
## Legacy Chains
LangServe works with both Runnables (constructed via [LangChain Expression Language](https://python.langchain.com/docs/expression_language/)) and legacy chains (inheriting from `Chain`).
However, some of the input schemas for legacy chains may be incomplete/incorrect, leading to errors.
LangServe works with both Runnables (constructed
via [LangChain Expression Language](https://python.langchain.com/docs/expression_language/))
and legacy chains (inheriting from `Chain`).
However, some of the input schemas for legacy chains may be incomplete/incorrect,
leading to errors.
This can be fixed by updating the `input_schema` property of those chains in LangChain.
If you encounter any errors, please open an issue on THIS repo, and we will work to address it.
If you encounter any errors, please open an issue on THIS repo, and we will work to
address it.
## Deployment
### Deploy to Azure
### Deploy to AWS
You can deploy to AWS using the [AWS Copilot CLI](https://aws.github.io/copilot-cli/)
```bash
copilot init --app [application-name] --name [service-name] --type 'Load Balanced Web Service' --dockerfile './Dockerfile' --deploy
```
Click [here](https://aws.amazon.com/containers/copilot/) to learn more.
### Deploy to Azure
You can deploy to Azure using Azure Container Apps (Serverless):
```
az containerapp up --name [container-app-name] --source . --resource-group [resource-group-name] --environment [environment-name] --ingress external --target-port 8001 --env-vars=OPENAI_API_KEY=your_key
az containerapp up --name [container-app-name] --source . --resource-group [resource-group-name] --environment [environment-name] --ingress external --target-port 8001 --env-vars=OPENAI_API_KEY=your_key
```
You can find more info [here](https://learn.microsoft.com/en-us/azure/container-apps/containerapp-up)
You can find more
info [here](https://learn.microsoft.com/en-us/azure/container-apps/containerapp-up)
### Deploy to GCP
@@ -282,43 +468,100 @@ You can deploy to GCP Cloud Run using the following command:
gcloud run deploy [your-service-name] --source . --port 8001 --allow-unauthenticated --region us-central1 --set-env-vars=OPENAI_API_KEY=your_key
```
### Community Contributed
#### Deploy to Railway
[Example Railway Repo](https://github.com/PaulLockett/LangServe-Railway/tree/main)
[![Deploy on Railway](https://railway.app/button.svg)](https://railway.app/template/pW9tXP?referralCode=c-aq4K)
## Pydantic
LangServe provides support for Pydantic 2 with some limitations.
LangServe>=0.3 fully supports Pydantic 2.
1. OpenAPI docs will not be generated for invoke/batch/stream/stream_log when using Pydantic V2. Fast API does not support [mixing pydantic v1 and v2 namespaces].
2. LangChain uses the v1 namespace in Pydantic v2. Please read the [following guidelines to ensure compatibility with LangChain](https://github.com/langchain-ai/langchain/discussions/9337)
If you're using an earlier version of LangServe (<= 0.2), then please note that support for Pydantic 2 has the following limitations:
Except for these limitations, we expect the API endpoints, the playground and any other features to work as expected.
1. OpenAPI docs will not be generated for invoke/batch/stream/stream_log when using
Pydantic V2. Fast API does not support [mixing pydantic v1 and v2 namespaces]. To fix this, use `pip install pydantic==1.10.17`.
2. LangChain uses the v1 namespace in Pydantic v2. Please read
the [following guidelines to ensure compatibility with LangChain](https://github.com/langchain-ai/langchain/discussions/9337)
Except for these limitations, we expect the API endpoints, the playground and any other
features to work as expected.
## Advanced
## Handling Authentication
### Handling Authentication
If you need to add authentication to your server,
please reference FastAPI's [security documentation](https://fastapi.tiangolo.com/tutorial/security/)
and [middleware documentation](https://fastapi.tiangolo.com/tutorial/middleware/).
If you need to add authentication to your server, please read Fast API's documentation
about [dependencies](https://fastapi.tiangolo.com/tutorial/dependencies/)
and [security](https://fastapi.tiangolo.com/tutorial/security/).
The below examples show how to wire up authentication logic LangServe endpoints using FastAPI primitives.
You are responsible for providing the actual authentication logic, the users table etc.
If you're not sure what you're doing, you could try using an existing solution [Auth0](https://auth0.com/).
#### Using add_routes
If you're using `add_routes`, see
examples [here](https://github.com/langchain-ai/langserve/tree/main/examples/auth).
| Description | Links |
| :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Auth** with `add_routes`: Simple authentication that can be applied across all endpoints associated with app. (Not useful on its own for implementing per user logic.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/global_deps/server.py) |
| **Auth** with `add_routes`: Simple authentication mechanism based on path dependencies. (No useful on its own for implementing per user logic.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/path_dependencies/server.py) |
| **Auth** with `add_routes`: Implement per user logic and auth for endpoints that use per request config modifier. (**Note**: At the moment, does not integrate with OpenAPI docs.) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/per_req_config_modifier/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/auth/per_req_config_modifier/client.ipynb) |
Alternatively, you can use FastAPI's [middleware](https://fastapi.tiangolo.com/tutorial/middleware/).
Using global dependencies and path dependencies has the advantage that auth will be properly supported in the OpenAPI docs page, but
these are not sufficient for implement per user logic (e.g., making an application that can search only within user owned documents).
If you need to implement per user logic, you can use the `per_req_config_modifier` or `APIHandler` (below) to implement this logic.
**Per User**
If you need authorization or logic that is user dependent,
specify `per_req_config_modifier` when using `add_routes`. Use a callable receives the
raw `Request` object and can extract relevant information from it for authentication and
authorization purposes.
#### Using APIHandler
If you feel comfortable with FastAPI and python, you can use LangServe's [APIHandler](https://github.com/langchain-ai/langserve/blob/main/examples/api_handler_examples/server.py).
| Description | Links |
| :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Auth** with `APIHandler`: Implement per user logic and auth that shows how to search only within user owned documents. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/auth/api_handler/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/auth/api_handler/client.ipynb) |
| **APIHandler** Shows how to use `APIHandler` instead of `add_routes`. This provides more flexibility for developers to define endpoints. Works well with all FastAPI patterns, but takes a bit more effort. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/api_handler_examples/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/api_handler_examples/client.ipynb) |
It's a bit more work, but gives you complete control over the endpoint definitions, so
you can do whatever custom logic you need for auth.
### Files
LLM applications often deal with files. There are different architectures
that can be made to implement file processing; at a high level:
1. The file may be uploaded to the server via a dedicated endpoint and processed using a separate endpoint
2. The file may be uploaded by either value (bytes of file) or reference (e.g., s3 url to file content)
1. The file may be uploaded to the server via a dedicated endpoint and processed using a
separate endpoint
2. The file may be uploaded by either value (bytes of file) or reference (e.g., s3 url
to file content)
3. The processing endpoint may be blocking or non-blocking
4. If significant processing is required, the processing may be offloaded to a dedicated process pool
4. If significant processing is required, the processing may be offloaded to a dedicated
process pool
You should determine what is the appropriate architecture for your application.
Currently, to upload files by value to a runnable, use base64 encoding for the
file (`multipart/form-data` is not supported yet).
Currently, to upload files by value to a runnable, use base64 encoding for the
file (`multipart/form-data` is not supported yet).
Here's an [example](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing) that shows
Here's
an [example](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing)
that shows
how to use base64 encoding to send a file to a remote runnable.
Remember, you can always upload files by reference (e.g., s3 url) or upload them as
@@ -351,7 +594,7 @@ def func(x: Any) -> int:
runnable = RunnableLambda(func).with_types(
input_schema=int,
input_type=int,
)
add_routes(app, runnable)
@@ -359,11 +602,11 @@ add_routes(app, runnable)
### Custom User Types
Inherit from `CustomUserType` if you want the data to de-serialize into a
Inherit from `CustomUserType` if you want the data to de-serialize into a
pydantic model rather than the equivalent dict representation.
At the moment, this type only works *server* side and is used
to specify desired *decoding* behavior. If inheriting from this type
At the moment, this type only works _server_ side and is used
to specify desired _decoding_ behavior. If inheriting from this type
the server will keep the decoded type as a pydantic model instead
of converting it into a dict.
@@ -386,12 +629,13 @@ def func(foo: Foo) -> int:
assert isinstance(foo, Foo)
return foo.bar
# Note that the input and output type are automatically inferred!
# You do not need to specify them.
# runnable = RunnableLambda(func).with_types( # <-- Not needed in this case
# input_schema=Foo,
# output_schema=int,
#
# input_type=Foo,
# output_type=int,
#
add_routes(app, RunnableLambda(func), path="/foo")
```
@@ -399,11 +643,20 @@ add_routes(app, RunnableLambda(func), path="/foo")
The playground allows you to define custom widgets for your runnable from the backend.
- A widget is specified at the field level and shipped as part of the JSON schema of the input type
- A widget must contain a key called `type` with the value being one of a well known list of widgets
- Other widget keys will be associated with values that describe paths in a JSON object
Here are a few examples:
General schema:
| Description | Links |
| :------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Widgets** Different widgets that can be used with playground (file upload and chat) | [server](https://github.com/langchain-ai/langserve/tree/main/examples/widgets/chat/tuples/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/widgets/client.ipynb) |
| **Widgets** File upload widget used for LangServe playground. | [server](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing/server.py), [client](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing/client.ipynb) |
#### Schema
- A widget is specified at the field level and shipped as part of the JSON schema of the
input type
- A widget must contain a key called `type` with the value being one of a well known
list of widgets
- Other widget keys will be associated with values that describe paths in a JSON object
```typescript
type JsonPath = number | string | (number | string)[];
@@ -411,16 +664,29 @@ type NameSpacedPath = { title: string; path: JsonPath }; // Using title to mimic
type OneOfPath = { oneOf: JsonPath[] };
type Widget = {
type: string // Some well known type (e.g., base64file, chat etc.)
[key: string]: JsonPath | NameSpacedPath | OneOfPath;
type: string; // Some well known type (e.g., base64file, chat etc.)
[key: string]: JsonPath | NameSpacedPath | OneOfPath;
};
```
### Available Widgets
There are only two widgets that the user can specify manually right now:
1. File Upload Widget
2. Chat History Widget
See below more information about these widgets.
All other widgets on the playground UI are created and managed automatically by the UI
based on the config schema of the Runnable. When you create Configurable Runnables,
the playground should create appropriate widgets for you to control the behavior.
#### File Upload Widget
Allows creation of a file upload input in the UI playground for files
that are uploaded as base64 encoded strings. Here's the full [example](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing).
that are uploaded as base64 encoded strings. Here's the
full [example](https://github.com/langchain-ai/langserve/tree/main/examples/file_processing).
Snippet:
@@ -444,27 +710,113 @@ class FileProcessingRequest(CustomUserType):
```
Example widget:
Example widget:
<p align="center">
<img src="https://github.com/langchain-ai/langserve/assets/3205522/52199e46-9464-4c2e-8be8-222250e08c3f" width="50%"/>
</p>
### Chat Widget
Look
at the [widget example](https://github.com/langchain-ai/langserve/tree/main/examples/widgets/chat/tuples/server.py).
To define a chat widget, make sure that you pass "type": "chat".
- "input" is JSONPath to the field in the _Request_ that has the new input message.
- "output" is JSONPath to the field in the _Response_ that has new output message(s).
- Don't specify these fields if the entire input or output should be used as they are (
e.g., if the output is a list of chat messages.)
Here's a snippet:
```python
class ChatHistory(CustomUserType):
chat_history: List[Tuple[str, str]] = Field(
...,
examples=[[("human input", "ai response")]],
extra={"widget": {"type": "chat", "input": "question", "output": "answer"}},
)
question: str
def _format_to_messages(input: ChatHistory) -> List[BaseMessage]:
"""Format the input to a list of messages."""
history = input.chat_history
user_input = input.question
messages = []
for human, ai in history:
messages.append(HumanMessage(content=human))
messages.append(AIMessage(content=ai))
messages.append(HumanMessage(content=user_input))
return messages
model = ChatOpenAI()
chat_model = RunnableParallel({"answer": (RunnableLambda(_format_to_messages) | model)})
add_routes(
app,
chat_model.with_types(input_type=ChatHistory),
config_keys=["configurable"],
path="/chat",
)
```
Example widget:
<p align="center">
<img src="https://github.com/langchain-ai/langserve/assets/3205522/a71ff37b-a6a9-4857-a376-cf27c41d3ca4" width="50%"/>
</p>
You can also specify a list of messages as your a parameter directly, as shown in this snippet:
```python
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assisstant named Cob."),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = prompt | ChatAnthropic(model="claude-2.1")
class MessageListInput(BaseModel):
"""Input for the chat endpoint."""
messages: List[Union[HumanMessage, AIMessage]] = Field(
...,
description="The chat messages representing the current conversation.",
extra={"widget": {"type": "chat", "input": "messages"}},
)
add_routes(
app,
chain.with_types(input_type=MessageListInput),
path="/chat",
)
```
See [this sample file](https://github.com/langchain-ai/langserve/tree/main/examples/widgets/chat/message_list/server.py) for an example.
### Enabling / Disabling Endpoints (LangServe >=0.0.33)
You can enable / disable which endpoints are exposed. Use `enabled_endpoints` if you want to make sure to never get a new endpoint when upgrading langserve to a newer verison.
You can enable / disable which endpoints are exposed when adding routes for a given chain.
Enable: The code below will only enable `invoke`, `batch` and the corresponding `config_hash` endpoint variants.
Use `enabled_endpoints` if you want to make sure to never get a new endpoint when upgrading langserve to a newer
verison.
Enable: The code below will only enable `invoke`, `batch` and the
corresponding `config_hash` endpoint variants.
```python
add_routes(app, chain, enabled_endpoints=["invoke", "batch", "config_hashes"])
add_routes(app, chain, enabled_endpoints=["invoke", "batch", "config_hashes"], path="/mychain")
```
Disable: The code below will disable the playground for the chain
```python
add_routes(app, chain, disabled_endpoints=["playground"])
add_routes(app, chain, disabled_endpoints=["playground"], path="/mychain")
```
+58 -3
View File
@@ -1,6 +1,61 @@
# Security Policy
## Reporting a Vulnerability
## Reporting OSS Vulnerabilities
Please report security vulnerabilities by email to `security@langchain.dev`.
This email is an alias to a subset of our maintainers, and will ensure the issue is promptly triaged and acted upon as needed.
LangChain is partnered with [huntr by Protect AI](https://huntr.com/) to provide
a bounty program for our open source projects.
Please report security vulnerabilities associated with the LangChain
open source projects by visiting the following link:
[https://huntr.com/bounties/disclose/](https://huntr.com/bounties/disclose/?target=https%3A%2F%2Fgithub.com%2Flangchain-ai%2Flangchain&validSearch=true)
Before reporting a vulnerability, please review:
1) In-Scope Targets and Out-of-Scope Targets below.
2) The [langchain-ai/langchain](https://python.langchain.com/docs/contributing/repo_structure) monorepo structure.
3) LangChain [security guidelines](https://python.langchain.com/docs/security) to
understand what we consider to be a security vulnerability vs. developer
responsibility.
### In-Scope Targets
The following packages and repositories are eligible for bug bounties:
- langchain-core
- langchain (see exceptions)
- langchain-community (see exceptions)
- langgraph
- langserve
### Out of Scope Targets
All out of scope targets defined by huntr as well as:
- **langchain-experimental**: This repository is for experimental code and is not
eligible for bug bounties, bug reports to it will be marked as interesting or waste of
time and published with no bounty attached.
- **tools**: Tools in either langchain or langchain-community are not eligible for bug
bounties. This includes the following directories
- langchain/tools
- langchain-community/tools
- Please review our [security guidelines](https://python.langchain.com/docs/security)
for more details, but generally tools interact with the real world. Developers are
expected to understand the security implications of their code and are responsible
for the security of their tools.
- Code documented with security notices. This will be decided done on a case by
case basis, but likely will not be eligible for a bounty as the code is already
documented with guidelines for developers that should be followed for making their
application secure.
- Any LangSmith related repositories or APIs see below.
## Reporting LangSmith Vulnerabilities
Please report security vulnerabilities associated with LangSmith by email to `security@langchain.dev`.
- LangSmith site: https://smith.langchain.com
- SDK client: https://github.com/langchain-ai/langsmith-sdk
### Other Security Concerns
For any other security concerns, please contact us at `security@langchain.dev`.
+815 -4
View File
@@ -27,7 +27,8 @@
"data": {
"text/plain": [
"{'output': {'output': 'Eugene thinks that cats like fish.'},\n",
" 'callback_events': []}"
" 'callback_events': [],\n",
" 'metadata': {'run_id': 'f16d95e5-dd8f-48d1-8668-4b33a54023fb'}}"
]
},
"execution_count": 1,
@@ -95,7 +96,7 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": 4,
"metadata": {
"tags": []
},
@@ -106,7 +107,7 @@
"{'output': 'Eugene thinks that cats like fish.'}"
]
},
"execution_count": 6,
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
@@ -114,6 +115,816 @@
"source": [
"remote_runnable.invoke({\"input\": \"what does eugene think of cats?\"})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream\n",
"\n",
"Please note that streaming alternates between actions and observations. It does not stream individual tokens! If you need to stream individual tokens you will need to use astream_log!"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--\n",
"{'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])], 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}\n",
"--\n",
"{'steps': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]), 'observation': [Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]}], 'messages': [FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')]}\n",
"--\n",
"{'output': \"Eugene thinks that cats like fish. Now let me tell you a story about that thought.\\n\\nOnce upon a time, in a small village, there lived a mischievous cat named Whiskers. Whiskers was known for his love for fish. Every day, he would venture out to the nearby river in search of his favorite food.\\n\\nOne sunny day, Whiskers set out on his usual fish-hunting expedition. As he approached the riverbank, he noticed a group of fishermen casting their nets into the water. Whiskers couldn't resist the temptation and decided to join in on the action.\\n\\nWith his agile paws, Whiskers skillfully maneuvered through the fishermen, strategically positioning himself to snatch the fish caught in their nets. The fishermen were amazed by Whiskers' quick reflexes and couldn't help but laugh at the sight of a cat fishing alongside them.\\n\\nWhiskers continued his fish-stealing escapades for several days, becoming somewhat of a local legend. People from neighboring villages would come to witness the incredible sight of a cat outsmarting seasoned fishermen.\\n\\nOne day, as Whiskers was enjoying his stolen fish by the river, he noticed a stray dog named Rover approaching him. Rover had heard about Whiskers' fishing talents and was intrigued by the cat's abilities.\\n\\nCurious, Whiskers decided to share his secret with Rover. He taught him the art of stealth and how to snatch fish from the nets without being noticed. Rover, being a quick learner, soon became Whiskers' partner in crime.\\n\\nTogether, Whiskers and Rover formed an unbeatable duo, leaving the fishermen puzzled and amazed at the disappearing fish. The villagers, entertained by their antics, started leaving fish out for Whiskers and Rover as a token of appreciation.\\n\\nAnd so, Whiskers and Rover continued their fish-stealing adventures, bringing joy and laughter to the village. Eugene's thought about cats and their love for fish certainly came to life in the mischievous and clever Whiskers, who proved that cats truly have a special affinity for fish.\", 'messages': [AIMessage(content=\"Eugene thinks that cats like fish. Now let me tell you a story about that thought.\\n\\nOnce upon a time, in a small village, there lived a mischievous cat named Whiskers. Whiskers was known for his love for fish. Every day, he would venture out to the nearby river in search of his favorite food.\\n\\nOne sunny day, Whiskers set out on his usual fish-hunting expedition. As he approached the riverbank, he noticed a group of fishermen casting their nets into the water. Whiskers couldn't resist the temptation and decided to join in on the action.\\n\\nWith his agile paws, Whiskers skillfully maneuvered through the fishermen, strategically positioning himself to snatch the fish caught in their nets. The fishermen were amazed by Whiskers' quick reflexes and couldn't help but laugh at the sight of a cat fishing alongside them.\\n\\nWhiskers continued his fish-stealing escapades for several days, becoming somewhat of a local legend. People from neighboring villages would come to witness the incredible sight of a cat outsmarting seasoned fishermen.\\n\\nOne day, as Whiskers was enjoying his stolen fish by the river, he noticed a stray dog named Rover approaching him. Rover had heard about Whiskers' fishing talents and was intrigued by the cat's abilities.\\n\\nCurious, Whiskers decided to share his secret with Rover. He taught him the art of stealth and how to snatch fish from the nets without being noticed. Rover, being a quick learner, soon became Whiskers' partner in crime.\\n\\nTogether, Whiskers and Rover formed an unbeatable duo, leaving the fishermen puzzled and amazed at the disappearing fish. The villagers, entertained by their antics, started leaving fish out for Whiskers and Rover as a token of appreciation.\\n\\nAnd so, Whiskers and Rover continued their fish-stealing adventures, bringing joy and laughter to the village. Eugene's thought about cats and their love for fish certainly came to life in the mischievous and clever Whiskers, who proved that cats truly have a special affinity for fish.\")]}\n"
]
}
],
"source": [
"async for chunk in remote_runnable.astream({\"input\": \"what does eugene think of cats? Then tell me a story about that thought.\"}):\n",
" print('--')\n",
" print(chunk)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream Events\n",
"\n",
"The client is looking for a runnable name called `agent` for the chain events. This name was defined on the server side using `runnable.with_config({\"run_name\": \"agent\"}`"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Starting agent: agent with input: {'input': 'what does eugene think of cats? Then tell me a story about that thought.'}\n",
"--\n",
"Starting tool: get_eugene_thoughts with inputs: {'query': 'cats'}\n",
"Done tool: get_eugene_thoughts\n",
"Tool output was: [Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\n",
"--\n",
"E|ug|ene| thinks| that| cats| like| fish|.| Now| let| me| tell| you| a| story| about| that| thought|:\n",
"\n",
"|Once| upon| a| time|,| in| a| small| village|,| there| lived| a| curious| cat| named| Wh|isk|ers|.| Wh|isk|ers| was| known| for| his| love| of| fish|.| Every| day|,| he| would| venture| to| the| nearby| river| in| search| of| his| favorite| meal|.\n",
"\n",
"|One| sunny| morning|,| Wh|isk|ers| set| out| on| his| daily| fish|-h|unting| expedition|.| As| he| approached| the| river|,| he| could| smell| the| fresh| scent| of| the| water| and| feel| the| excitement| building| up| inside| him|.| Wh|isk|ers| knew| that| today| might| be| his| lucky| day|.\n",
"\n",
"|He| carefully| ti|pto|ed| along| the| river|bank|,| his| eyes| fixed| on| the| water|'s| surface|.| Suddenly|,| he| spotted| a| shimmer|ing| fish| swimming| gracefully| through| the| clear| blue| water|.| Wh|isk|ers| c|rou|ched| low|,| ready| to| p|ounce|.\n",
"\n",
"|With| lightning| speed|,| he| le|aped| into| the| air|,| his| p|aws| out|st|retched| towards| the| fish|.| Splash|!| Wh|isk|ers| landed| right| in| the| middle| of| the| river|,| causing| r|ipples| to| spread| in| all| directions|.| But| he| didn|'t| care|.| All| he| wanted| was| that| delicious| fish|.\n",
"\n",
"|Wh|isk|ers| chased| the| fish| with| all| his| might|,| dart|ing| through| the| water| with| elegance| and| precision|.| The| fish| sw|am| gracefully|,| trying| to| escape| Wh|isk|ers|'| determined| pursuit|.| But| the| cat| was| relentless|.\n",
"\n",
"|After| a| few| moments| of| intense| chase|,| Wh|isk|ers| finally| managed| to| catch| the| fish| in| his| p|aws|.| He| triumph|antly| carried| it| to| the| river|bank|,| where| he| enjoyed| his| well|-des|erved| feast|.| The| taste| of| the| fresh| fish| was| heavenly|,| satisfying| his| hunger| and| bringing| a| content|ed| smile| to| his| face|.\n",
"\n",
"|From| that| day| on|,| Wh|isk|ers| became| known| as| the| legendary| fish|-catching| cat| in| the| village|.| People| would| often| gather| by| the| river| to| watch| him| in| action|,| amazed| by| his| agility| and| determination|.| Wh|isk|ers| taught| everyone| the| importance| of| perseverance| and| following| one|'s| passion|,| just| like| he| pursued| his| love| for| fish|.\n",
"\n",
"|And| so|,| Wh|isk|ers| continued| his| fish|-h|unting| adventures|,| spreading| joy| and| inspiration| to| everyone| he| encountered|.| He| proved| that| when| you| have| a| passion| for| something|,| nothing| can| stop| you| from| achieving| it| | just| like| cats| and| their| love| for| fish|.\n",
"\n",
"|The| end|.|\n",
"--\n",
"Done agent: agent with output: Eugene thinks that cats like fish. Now let me tell you a story about that thought:\n",
"\n",
"Once upon a time, in a small village, there lived a curious cat named Whiskers. Whiskers was known for his love of fish. Every day, he would venture to the nearby river in search of his favorite meal.\n",
"\n",
"One sunny morning, Whiskers set out on his daily fish-hunting expedition. As he approached the river, he could smell the fresh scent of the water and feel the excitement building up inside him. Whiskers knew that today might be his lucky day.\n",
"\n",
"He carefully tiptoed along the riverbank, his eyes fixed on the water's surface. Suddenly, he spotted a shimmering fish swimming gracefully through the clear blue water. Whiskers crouched low, ready to pounce.\n",
"\n",
"With lightning speed, he leaped into the air, his paws outstretched towards the fish. Splash! Whiskers landed right in the middle of the river, causing ripples to spread in all directions. But he didn't care. All he wanted was that delicious fish.\n",
"\n",
"Whiskers chased the fish with all his might, darting through the water with elegance and precision. The fish swam gracefully, trying to escape Whiskers' determined pursuit. But the cat was relentless.\n",
"\n",
"After a few moments of intense chase, Whiskers finally managed to catch the fish in his paws. He triumphantly carried it to the riverbank, where he enjoyed his well-deserved feast. The taste of the fresh fish was heavenly, satisfying his hunger and bringing a contented smile to his face.\n",
"\n",
"From that day on, Whiskers became known as the legendary fish-catching cat in the village. People would often gather by the river to watch him in action, amazed by his agility and determination. Whiskers taught everyone the importance of perseverance and following one's passion, just like he pursued his love for fish.\n",
"\n",
"And so, Whiskers continued his fish-hunting adventures, spreading joy and inspiration to everyone he encountered. He proved that when you have a passion for something, nothing can stop you from achieving it just like cats and their love for fish.\n",
"\n",
"The end.\n"
]
}
],
"source": [
"async for event in remote_runnable.astream_events(\n",
" {\"input\": \"what does eugene think of cats? Then tell me a story about that thought.\"},\n",
" version=\"v1\",\n",
"):\n",
" kind = event[\"event\"]\n",
" if kind == \"on_chain_start\":\n",
" if (\n",
" event[\"name\"] == \"agent\"\n",
" ): # Was assigned when creating the agent with `.with_config({\"run_name\": \"Agent\"})`\n",
" print(\n",
" f\"Starting agent: {event['name']} with input: {event['data'].get('input')}\"\n",
" )\n",
" elif kind == \"on_chain_end\":\n",
" if (\n",
" event[\"name\"] == \"agent\"\n",
" ): # Was assigned when creating the agent with `.with_config({\"run_name\": \"Agent\"})`\n",
" print()\n",
" print(\"--\")\n",
" print(\n",
" f\"Done agent: {event['name']} with output: {event['data'].get('output')['output']}\"\n",
" )\n",
" if kind == \"on_chat_model_stream\":\n",
" content = event[\"data\"][\"chunk\"].content\n",
" if content:\n",
" # Empty content in the context of OpenAI means\n",
" # that the model is asking for a tool to be invoked.\n",
" # So we only print non-empty content\n",
" print(content, end=\"|\")\n",
" elif kind == \"on_tool_start\":\n",
" print(\"--\")\n",
" print(\n",
" f\"Starting tool: {event['name']} with inputs: {event['data'].get('input')}\"\n",
" )\n",
" elif kind == \"on_tool_end\":\n",
" print(f\"Done tool: {event['name']}\")\n",
" print(f\"Tool output was: {event['data'].get('output')}\")\n",
" print(\"--\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream log\n",
"\n",
"If you need acccess the individual llm tokens from an agent use `astream_log`. Please make sure that you set **streaming=True** on your LLM (see server code). For this to work, the LLM must also support streaming!"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"--\n",
"RunLogPatch({'op': 'replace',\n",
" 'path': '',\n",
" 'value': {'final_output': None,\n",
" 'id': '1213bf75-c5ff-401a-b3c5-b4663ec7dfca',\n",
" 'logs': {},\n",
" 'streamed_output': []}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '7629fc73-a2fd-48fa-b9a2-c336e270180d',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableSequence',\n",
" 'start_time': '2024-01-05T22:24:50.737+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '72d2e143-d977-4661-b901-430cae1ee739',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableParallel<input,agent_scratchpad>',\n",
" 'start_time': '2024-01-05T22:24:50.738+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:1'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '7ec78a86-596f-4904-9888-45ef67302cb8',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-05T22:24:50.739+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:input'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '281ca194-3e0c-490c-b637-759f5d971769',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-05T22:24:50.739+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:agent_scratchpad'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>/final_output',\n",
" 'value': {'output': 'what does eugene think of cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>/end_time',\n",
" 'value': '2024-01-05T22:24:50.740+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:2/final_output',\n",
" 'value': {'output': []}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:2/end_time',\n",
" 'value': '2024-01-05T22:24:50.740+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>/final_output',\n",
" 'value': {'agent_scratchpad': [],\n",
" 'input': 'what does eugene think of cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>/end_time',\n",
" 'value': '2024-01-05T22:24:50.740+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '68c6ad9d-b9f0-47e0-9ea7-d0f170a22732',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatPromptTemplate',\n",
" 'start_time': '2024-01-05T22:24:50.741+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:2'],\n",
" 'type': 'prompt'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate/final_output',\n",
" 'value': {'messages': [SystemMessage(content='You are a helpful assistant.'),\n",
" HumanMessage(content='what does eugene think of cats?')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate/end_time',\n",
" 'value': '2024-01-05T22:24:50.741+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '883e05a9-6b29-4494-92b3-51c72973cb54',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatOpenAI',\n",
" 'start_time': '2024-01-05T22:24:50.743+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': ''}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '{\\n'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' '}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'query'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\":'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'cats'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\"\\n'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '}'}})})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(generation_info={'finish_reason': 'function_call'}, message=AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI/end_time',\n",
" 'value': '2024-01-05T22:24:51.497+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'f8052926-8eb1-4df1-a701-309ee48fd63c',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'OpenAIFunctionsAgentOutputParser',\n",
" 'start_time': '2024-01-05T22:24:51.498+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:4'],\n",
" 'type': 'parser'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser/final_output',\n",
" 'value': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])},\n",
" {'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser/end_time',\n",
" 'value': '2024-01-05T22:24:51.499+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence/final_output',\n",
" 'value': {'output': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableSequence/end_time',\n",
" 'value': '2024-01-05T22:24:51.500+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}},\n",
" {'op': 'replace',\n",
" 'path': '/final_output',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'e745d7ec-5992-4ab8-a3ef-191342c6470c',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'get_eugene_thoughts',\n",
" 'start_time': '2024-01-05T22:24:51.501+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'tool'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts/final_output',\n",
" 'value': {'output': \"[Document(page_content='cats like fish'), \"\n",
" \"Document(page_content='dogs like sticks')]\"}},\n",
" {'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts/end_time',\n",
" 'value': '2024-01-05T22:24:51.737+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')],\n",
" 'steps': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/steps',\n",
" 'value': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/1',\n",
" 'value': FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '15d4ae13-554b-4144-9aa8-05527a15c042',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableSequence',\n",
" 'start_time': '2024-01-05T22:24:51.739+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '207dab98-d50c-4f2c-934d-291ba3ffd953',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableParallel<input,agent_scratchpad>',\n",
" 'start_time': '2024-01-05T22:24:51.740+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:1'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:3',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '8795a642-3f8e-4e5c-aec6-825b7aac2148',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-05T22:24:51.741+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:input'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:4',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '60be3aac-3718-4386-a941-1dd371b9a3ea',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-05T22:24:51.741+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:agent_scratchpad'],\n",
" 'type': 'chain'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:3/final_output',\n",
" 'value': {'output': 'what does eugene think of cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:3/end_time',\n",
" 'value': '2024-01-05T22:24:51.742+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:4/final_output',\n",
" 'value': {'output': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:4/end_time',\n",
" 'value': '2024-01-05T22:24:51.742+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2/final_output',\n",
" 'value': {'agent_scratchpad': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')],\n",
" 'input': 'what does eugene think of cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2/end_time',\n",
" 'value': '2024-01-05T22:24:51.742+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'f1ff89b0-ae9c-49d1-8a2e-73c7f001f1e7',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatPromptTemplate',\n",
" 'start_time': '2024-01-05T22:24:51.743+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:2'],\n",
" 'type': 'prompt'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2/final_output',\n",
" 'value': {'messages': [SystemMessage(content='You are a helpful assistant.'),\n",
" HumanMessage(content='what does eugene think of cats?'),\n",
" AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2/end_time',\n",
" 'value': '2024-01-05T22:24:51.743+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'c4aeb3d0-33c3-4f46-80e9-d1ffb0f983f2',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatOpenAI',\n",
" 'start_time': '2024-01-05T22:24:51.744+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': 'E'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='E')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': 'ug'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ug')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': 'ene'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ene')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' has'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' has')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' two'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' two')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' thoughts'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' thoughts')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' on'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' on')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' cats'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' cats')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': '.'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='.')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' One'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' One')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' thought'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' thought')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' is'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' is')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' \"'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' \"')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': 'cats'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='cats')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' like'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' like')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' fish'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' fish')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': '\"'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='\"')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' and'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' and')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' the'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' the')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' other'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' other')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' thought'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' thought')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' is'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' is')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' \"'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' \"')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': 'dogs'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='dogs')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' like'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' like')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': ' sticks'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' sticks')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output_str/-',\n",
" 'value': '\".'},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='\".')})\n",
"--\n",
"RunLogPatch({'op': 'add', 'path': '/logs/ChatOpenAI:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(text='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".', generation_info={'finish_reason': 'stop'}, message=AIMessage(content='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".'))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatOpenAI:2/end_time',\n",
" 'value': '2024-01-05T22:24:53.082+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '7074d8c2-df0b-4d18-9890-dd050c2f0ca9',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'OpenAIFunctionsAgentOutputParser',\n",
" 'start_time': '2024-01-05T22:24:53.083+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:4'],\n",
" 'type': 'parser'}})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2/final_output',\n",
" 'value': AgentFinish(return_values={'output': 'Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".'}, log='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".')},\n",
" {'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2/end_time',\n",
" 'value': '2024-01-05T22:24:53.084+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2/final_output',\n",
" 'value': {'output': AgentFinish(return_values={'output': 'Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".'}, log='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".')}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2/end_time',\n",
" 'value': '2024-01-05T22:24:53.084+00:00'})\n",
"--\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [AIMessage(content='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".')],\n",
" 'output': 'Eugene has two thoughts on cats. One thought is \"cats '\n",
" 'like fish\" and the other thought is \"dogs like '\n",
" 'sticks\".'}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/output',\n",
" 'value': 'Eugene has two thoughts on cats. One thought is \"cats like fish\" '\n",
" 'and the other thought is \"dogs like sticks\".'},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/2',\n",
" 'value': AIMessage(content='Eugene has two thoughts on cats. One thought is \"cats like fish\" and the other thought is \"dogs like sticks\".')})\n"
]
}
],
"source": [
"async for chunk in remote_runnable.astream_log({\"input\": \"what does eugene think of cats?\"}):\n",
" print('--')\n",
" print(chunk)"
]
}
],
"metadata": {
@@ -132,7 +943,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
"version": "3.10.8"
}
},
"nbformat": 4,
+47 -12
View File
@@ -1,15 +1,34 @@
#!/usr/bin/env python
"""Example LangChain server exposes a conversational retrieval chain."""
"""Example LangChain server exposes a conversational retrieval agent.
Relevant LangChain documentation:
* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent
* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to/streaming#custom-streaming-with-events
* General streaming documentation: https://python.langchain.com/docs/expression_language/streaming
**ATTENTION**
1. To support streaming individual tokens you will need to use the astream events
endpoint rather than the streaming endpoint.
2. This example does not truncate message history, so it will crash if you
send too many messages (exceed token length).
3. The playground at the moment does not render agent output well! If you want to
use the playground you need to customize it's output server side using astream
events by wrapping it within another runnable.
4. See the client notebook it has an example of how to use stream_events client side!
"""
from typing import Any
from fastapi import FastAPI
from langchain.agents import AgentExecutor, tool
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad import format_to_openai_functions
from langchain.agents.output_parsers import OpenAIFunctionsAgentOutputParser
from langchain.chat_models import ChatOpenAI
from langchain.embeddings import OpenAIEmbeddings
from langchain.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain.pydantic_v1 import BaseModel
from langchain.tools.render import format_tool_to_openai_function
from langchain.vectorstores import FAISS
from langchain_community.vectorstores import FAISS
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.tools import tool
from langchain_core.utils.function_calling import format_tool_to_openai_function
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
from pydantic import BaseModel
from langserve import add_routes
@@ -30,12 +49,22 @@ tools = [get_eugene_thoughts]
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assistant."),
# Please note that the ordering of the user input vs.
# the agent_scratchpad is important.
# The agent_scratchpad is a working space for the agent to think,
# invoke tools, see tools outputs in order to respond to the given
# user input. It has to come AFTER the user input.
("user", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad"),
]
)
llm = ChatOpenAI()
# We need to set streaming=True on the LLM to support streaming individual tokens.
# Tokens will be available when using the stream_log / stream events endpoints,
# but not when using the stream endpoint since the stream implementation for agent
# streams action observation pairs not individual tokens.
# See the client notebook that shows how to use the stream events endpoint.
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0, streaming=True)
llm_with_tools = llm.bind(functions=[format_tool_to_openai_function(t) for t in tools])
@@ -56,7 +85,7 @@ agent_executor = AgentExecutor(agent=agent, tools=tools)
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
description="Spin up a simple api server using LangChain's Runnable interfaces",
)
@@ -67,14 +96,20 @@ class Input(BaseModel):
class Output(BaseModel):
output: str
output: Any
# Adds routes to the app for using the chain under:
# /invoke
# /batch
# /stream
add_routes(app, agent_executor.with_types(input_type=Input, output_type=Output))
# /stream_events
add_routes(
app,
agent_executor.with_types(input_type=Input, output_type=Output).with_config(
{"run_name": "agent"}
),
)
if __name__ == "__main__":
import uvicorn
@@ -0,0 +1,232 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Client\n",
"\n",
"Client code interacting with a server that implements: \n",
"\n",
"* custom streaming for an agent\n",
"* agent with user selected tools\n",
"\n",
"This agent does not have memory! See other examples in LangServe to see how to add memory.\n",
"\n",
"**ATTENTION** We made the agent stream strings as an output. This is almost certainly not what you would want for your application. Feel free to adapt to return more structured output; however, keep in mind that likely the client can just use `astream_events`!\n",
"\n",
"See relevant documentation about agents:\n",
"\n",
"* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent\n",
"* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to/streaming#custom-streaming-with-events\n",
"* General streaming documentation: https://python.langchain.com/docs/expression_language/streaming"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can interact with this via API directly"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"16"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"word = \"audioeeeeeeeeeee\"\n",
"len(word)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Starting agent: agent with input: {'input': 'what is the length of the word audioeeeeeeeeeee?'}\n",
"The length of the word \"audioeeeeeeeeeee\" is 15 characters.\n",
"Done agent: agent with output: The length of the word \"audioeeeeeeeeeee\" is 15 characters.\n",
"\n"
]
}
],
"source": [
"import requests\n",
"\n",
"inputs = {\"input\": {\"input\": f\"what is the length of the word {word}?\", \"chat_history\": [], \"tools\": []}}\n",
"response = requests.post(\"http://localhost:8000/invoke\", json=inputs)\n",
"\n",
"print(response.json()['output'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's provide it with a tool to test that tool selection works"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"Starting agent: agent with input: {'input': 'what is the length of the word audioeeeeeeeeeee?'}\n",
"\n",
"Starting tool: word_length with inputs: {'word': 'audioeeeeeeeeeee'}\n",
"\n",
"Done tool: word_length with output: 16\n",
"The length of the word \"audioeeeeeeeeeee\" is 16.\n",
"Done agent: agent with output: The length of the word \"audioeeeeeeeeeee\" is 16.\n",
"\n"
]
}
],
"source": [
"import requests\n",
"\n",
"inputs = {\"input\": {\"input\": f\"what is the length of the word {word}?\", \"chat_history\": [], \"tools\": [\"word_length\", \"favorite_animal\"]}}\n",
"response = requests.post(\"http://localhost:8000/invoke\", json=inputs)\n",
"\n",
"print(response.json()['output'])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also interact with this via the RemoteRunnable interface (to use in other chains)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Remote runnable has the same interface as local runnables"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream\n",
"\n",
"Streaming output from a **CUSTOM STREAMING** implementation that streams string representations of intermediate steps. Please see server side implementation for details."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"|Starting agent: agent with input: {'input': 'What is eugenes favorite animal?'}|\n",
"|I|'m| sorry|,| but| I| don|'t| have| access| to| personal| information| about| individuals| unless| it| has| been| shared| with| me| in| the| course| of| our| conversation|.|\n",
"|Done agent: agent with output: I'm sorry, but I don't have access to personal information about individuals unless it has been shared with me in the course of our conversation.|\n",
"|"
]
}
],
"source": [
"async for chunk in remote_runnable.astream({\"input\": \"What is eugenes favorite animal?\", \"tools\": [\"word_length\"]}):\n",
" print(chunk, end='|', flush=True)"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"|Starting agent: agent with input: {'input': 'What is eugenes favorite animal?'}|\n",
"|\n",
"|Starting tool: favorite_animal with inputs: {'name': 'Eugene'}|\n",
"|\n",
"|Done tool: favorite_animal with output: cat|\n",
"|E|ug|ene|'s| favorite| animal| is| a| cat|.|\n",
"|Done agent: agent with output: Eugene's favorite animal is a cat.|\n",
"|"
]
}
],
"source": [
"async for chunk in remote_runnable.astream({\"input\": \"What is eugenes favorite animal?\", \"tools\": [\"word_length\", \"favorite_animal\"]}):\n",
" print(chunk, end='|', flush=True)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+248
View File
@@ -0,0 +1,248 @@
#!/usr/bin/env python
"""Example LangChain server that shows how to customize streaming for an agent.
Example uses a RunnableLambda that:
1) Uses the agent's astream events method to create a custom streaming API endpoint.
2) Instantiates an agent with custom tools (based on the user request).
In this example, we kept things simple and are outputting strings to the client
with all the intermediate steps of the agent. This is just for demonstration
purposes, and usually you would want to return more structured output in the form
of a dictionary.
To add history to the agent you can use RunnableWithHistory. Please see the
other examples in LangServe for how to use RunnableWithHistory to store history
on the server side.
Alternatively, you can keep track of history on the client side and send it to the
server with each request. For that to work, you will definitely want to modify the
streaming output to yield dictionaries with structured output, so it's easy
to determine what the final agent output was on the client side.
Customize the streaming output to your use case!
Note that we configure the agent using the `tools` field in the input rather
than using configurable fields. Using custom runnables and configurable fields
is another option to customize the agent.
Please see configurable_agent_executor: https://github.com/langchain-ai/langserve/blob/main/examples/configurable_agent_executor/server.py
for an example that uses a custom runnable with configurable fields.
Relevant LangChain documentation:
* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent
* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to/streaming#custom-streaming-with-events
* General streaming documentation: https://python.langchain.com/docs/expression_language/streaming
* Message History: https://python.langchain.com/docs/expression_language/how_to/message_history
**ATTENTION**
1. This example does not truncate message history, so it will crash if you
send too many messages (exceed token length).
2. The playground at the moment does not render agent output well! If you want to
use the playground you need to customize it's output server side using astream
events by wrapping it within another runnable.
3. See the client notebook to see how .stream() behaves!
""" # noqa: E501
from typing import Any, AsyncIterator, List, Literal
from fastapi import FastAPI
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad.openai_tools import (
format_to_openai_tool_messages,
)
from langchain.agents.output_parsers.openai_tools import OpenAIToolsAgentOutputParser
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables import RunnableLambda
from langchain_core.tools import tool
from langchain_core.utils.function_calling import format_tool_to_openai_tool
from langchain_openai import ChatOpenAI
from pydantic import BaseModel
from langserve import add_routes
prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are very powerful assistant, but bad at calculating lengths of words. "
"Talk with the user as normal. "
"If they ask you to calculate the length of a word, use a tool",
),
# Please note the ordering of the fields in the prompt!
# The correct ordering is:
# 1. user - the user's current input
# 2. agent_scratchpad - the agent's working space for thinking and
# invoking tools to respond to the user's input.
# If you change the ordering, the agent will not work correctly since
# the messages will be shown to the underlying LLM in the wrong order.
("user", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad"),
]
)
@tool
def word_length(word: str) -> int:
"""Returns a counter word"""
return len(word)
@tool
def favorite_animal(name: str) -> str:
"""Get the favorite animal of the person with the given name"""
if name.lower().strip() == "eugene":
return "cat"
return "dog"
# We need to set streaming=True on the LLM to support streaming individual tokens.
# Tokens will be available when using the stream_log / stream events endpoints,
# but not when using the stream endpoint since the stream implementation for agent
# streams action observation pairs not individual tokens.
# See the client notebook that shows how to use the stream events endpoint.
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0, streaming=True)
TOOL_MAPPING = {
"word_length": word_length,
"favorite_animal": favorite_animal,
}
KnownTool = Literal["word_length", "favorite_animal"]
def _create_agent_with_tools(requested_tools: List[KnownTool]) -> AgentExecutor:
"""Create an agent with custom tools."""
tools = []
for requested_tool in requested_tools:
if requested_tool not in TOOL_MAPPING:
raise ValueError(f"Unknown tool: {requested_tool}")
tools.append(TOOL_MAPPING[requested_tool])
if tools:
llm_with_tools = llm.bind(
tools=[format_tool_to_openai_tool(tool) for tool in tools]
)
else:
llm_with_tools = llm
agent = (
{
"input": lambda x: x["input"],
"agent_scratchpad": lambda x: format_to_openai_tool_messages(
x["intermediate_steps"]
),
}
| prompt
| llm_with_tools
| OpenAIToolsAgentOutputParser()
)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True).with_config(
{"run_name": "agent"}
)
return agent_executor
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using LangChain's Runnable interfaces",
)
# We need to add these input/output schemas because the current AgentExecutor
# is lacking in schemas.
class Input(BaseModel):
input: str
tools: List[KnownTool]
async def custom_stream(input: Input) -> AsyncIterator[str]:
"""A custom runnable that can stream content.
Args:
input: The input to the agent. See the Input model for more details.
Yields:
strings that are streamed to the client.
Strings were chosen for simplicity, feel free to adapt to your use case.
You will almost certainly want to return more structured output in the form
of a dictionary, so it's easy to determine what the agent is doing without
parsing the output.
Before creating a custom streaming API, you should consider if you can use
the existing astream events API and customize the output on the client side
(potentially less overall work both server and client side).
"""
agent_executor = _create_agent_with_tools(input["tools"])
async for event in agent_executor.astream_events(
{
"input": input["input"],
},
version="v1",
):
kind = event["event"]
if kind == "on_chain_start":
if (
event["name"] == "agent"
): # matches `.with_config({"run_name": "Agent"})` in agent_executor
yield "\n"
yield (
f"Starting agent: {event['name']} "
f"with input: {event['data'].get('input')}"
)
yield "\n"
elif kind == "on_chain_end":
if (
event["name"] == "agent"
): # matches `.with_config({"run_name": "Agent"})` in agent_executor
yield "\n"
yield (
f"Done agent: {event['name']} "
f"with output: {event['data'].get('output')['output']}"
)
yield "\n"
if kind == "on_chat_model_stream":
content = event["data"]["chunk"].content
if content:
# Empty content in the context of OpenAI means
# that the model is asking for a tool to be invoked.
# So we only print non-empty content
yield content
elif kind == "on_tool_start":
yield "\n"
yield (
f"Starting tool: {event['name']} "
f"with inputs: {event['data'].get('input')}"
)
yield "\n"
elif kind == "on_tool_end":
yield "\n"
yield (
f"Done tool: {event['name']} "
f"with output: {event['data'].get('output')}"
)
yield "\n"
class Output(BaseModel):
output: Any
# Adds routes to the app for using the chain under:
# /invoke
# /batch
# /stream
# /stream_events
add_routes(
app,
RunnableLambda(custom_stream),
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+554
View File
@@ -0,0 +1,554 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Client\n",
"\n",
"Demo of a client interacting with a remote agent that can use history.\n",
"\n",
"See relevant documentation about agents:\n",
"\n",
"* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent\n",
"* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to/streaming#custom-streaming-with-events\n",
"* General streaming documentation: https://python.langchain.com/docs/expression_language/streaming"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can interact with this via API directly"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'output': {'output': 'The length of the word \"audioee\" is 7.'},\n",
" 'callback_events': [],\n",
" 'metadata': {'run_id': '1847be77-f53c-40ba-b88d-06af3a598b6e'}}"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import requests\n",
"\n",
"inputs = {\"input\": {\"input\": \"what is the length of the word audioee?\", \"chat_history\": []}}\n",
"response = requests.post(\"http://localhost:8000/invoke\", json=inputs)\n",
"\n",
"response.json()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also interact with this via the RemoteRunnable interface (to use in other chains)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Remote runnable has the same interface as local runnables"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langchain_core.messages import HumanMessage, AIMessage"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): hello\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Hello! How can I assist you today?\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): my name is eugene\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Nice to meet you, Eugene! How can I help you today?\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): what is my name\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Your name is Eugene.\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): what is the length of my name\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: The length of your name, Eugene, is 6 characters.\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): q\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Bye bye human\n"
]
}
],
"source": [
"chat_history = []\n",
"\n",
"while True:\n",
" human = input(\"Human (Q/q to quit): \")\n",
" if human in {\"q\", \"Q\"}:\n",
" print('AI: Bye bye human')\n",
" break\n",
" ai = await remote_runnable.ainvoke({\"input\": human, \"chat_history\": chat_history})\n",
" print(f\"AI: {ai['output']}\")\n",
" chat_history.extend([HumanMessage(content=human), AIMessage(content=ai['output'])])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream\n",
"\n",
"Please note that streaming alternates between actions and observations. It does not stream individual tokens!\n",
"\n",
"To stream individual tokens, we need to use the astream events endpoint (see below)."
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): hello\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Hello! How can I assist you today?\n",
"------\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): my name is eugene\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Nice to meet you, Eugene! How can I help you today?\n",
"------\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): what is my name\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Your name is Eugene.\n",
"------\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): what's the length of my name?\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Calling Tool ```word_length``` with input ```{'word': 'Eugene'}```\n",
"------\n",
"Got result: ```6```\n",
"------\n",
"The length of your name, Eugene, is 6 characters.\n",
"------\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): q\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Bye bye human\n"
]
}
],
"source": [
"chat_history = []\n",
"\n",
"while True:\n",
" human = input(\"Human (Q/q to quit): \")\n",
" if human in {\"q\", \"Q\"}:\n",
" print('AI: Bye bye human')\n",
" break\n",
"\n",
" ai = None\n",
" print(\"AI: \")\n",
" async for chunk in remote_runnable.astream({\"input\": human, \"chat_history\": chat_history}):\n",
" # Agent Action\n",
" if \"actions\" in chunk:\n",
" for action in chunk[\"actions\"]:\n",
" print(\n",
" f\"Calling Tool ```{action['tool']}``` with input ```{action['tool_input']}```\"\n",
" )\n",
" # Observation\n",
" elif \"steps\" in chunk:\n",
" for step in chunk[\"steps\"]:\n",
" print(f\"Got result: ```{step['observation']}```\")\n",
" # Final result\n",
" elif \"output\" in chunk:\n",
" print(chunk['output'])\n",
" ai = AIMessage(content=chunk['output'])\n",
" else:\n",
" raise ValueError\n",
" print(\"------\") \n",
" chat_history.extend([HumanMessage(content=human), ai])"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Stream Events"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): hello! my name is eugene\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Starting agent: agent with input: {'input': 'hello! my name is eugene', 'chat_history': []}\n",
"Hello| Eugene|!| How| can| I| assist| you| today|?|\n",
"--\n",
"Done agent: agent with output: Hello Eugene! How can I assist you today?\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): what's the length of my name?\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Starting agent: agent with input: {'input': \"what's the length of my name?\", 'chat_history': []}\n",
"--\n",
"Starting tool: word_length with inputs: {'word': 'my name'}\n",
"Done tool: word_length\n",
"Tool output was: 7\n",
"--\n",
"The| length| of| your| name|,| \"|my| name|\",| is| |7| characters|.|\n",
"--\n",
"Done agent: agent with output: The length of your name, \"my name\", is 7 characters.\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): could you tell me a long story about the length of my name?\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Starting agent: agent with input: {'input': 'could you tell me a long story about the length of my name?', 'chat_history': []}\n",
"Once| upon| a| time|,| there| was| a| person| named| [|Your| Name|].| Now|,| [|Your| Name|]| had| a| very| unique| and| special| name|.| It| was| a| name| that| carried| a| lot| of| meaning| and| significance|.| People| often| wondered| about| the| length| of| [|Your| Name|]'|s| name| and| how| it| compared| to| others|.\n",
"\n",
"|One| day|,| [|Your| Name|]| decided| to| embark| on| a| journey| to| discover| the| true| length| of| their| name|.| They| traveled| far| and| wide|,| seeking| the| wisdom| of| s|ages| and| scholars| who| were| known| for| their| knowledge| of| names| and| their| lengths|.\n",
"\n",
"|Along| the| way|,| [|Your| Name|]| encountered| many| interesting| characters| who| had| their| own| stories| to| tell| about| the| lengths| of| their| names|.| Some| had| short| names| that| were| easy| to| remember|,| while| others| had| long| names| that| seemed| to| go| on| forever|.\n",
"\n",
"|As| [|Your| Name|]| continued| their| quest|,| they| came| across| a| wise| old| wizard| who| claimed| to| have| a| magical| tool| that| could| calculate| the| exact| length| of| any| name|.| Intr|ig|ued|,| [|Your| Name|]| approached| the| wizard| and| asked| for| their| assistance|.\n",
"\n",
"|The| wizard| took| out| a| mystical| device| and| asked| [|Your| Name|]| to| spell| out| their| name|.| [|Your| Name|]| eagerly| complied|,| carefully| en|unci|ating| each| letter|.| The| wizard| then| waved| the| device| over| the| name| and| muttered| an| inc|ant|ation|.\n",
"\n",
"|In| an| instant|,| the| device| displayed| the| length| of| [|Your| Name|]'|s| name|.| It| was| a| number| that| represented| the| total| count| of| characters| in| their| name|,| including| spaces| and| punctuation| marks|.| [|Your| Name|]| was| amazed| to| see| the| result| and| thanked| the| wizard| for| their| help|.\n",
"\n",
"|Ar|med| with| this| newfound| knowledge|,| [|Your| Name|]| returned| home| and| shared| their| story| with| friends| and| family|.| They| realized| that| the| length| of| their| name| was| not| just| a| random| number|,| but| a| reflection| of| their| identity| and| the| unique| journey| they| had| taken| to| discover| it|.\n",
"\n",
"|And| so|,| [|Your| Name|]| lived| happily| ever| after|,| cher|ishing| their| name| and| the| story| behind| its| length|.| They| understood| that| the| length| of| a| name| is| not| just| a| matter| of| counting| letters|,| but| a| testament| to| the| individual|ity| and| significance| of| each| person|'s| identity|.|\n",
"--\n",
"Done agent: agent with output: Once upon a time, there was a person named [Your Name]. Now, [Your Name] had a very unique and special name. It was a name that carried a lot of meaning and significance. People often wondered about the length of [Your Name]'s name and how it compared to others.\n",
"\n",
"One day, [Your Name] decided to embark on a journey to discover the true length of their name. They traveled far and wide, seeking the wisdom of sages and scholars who were known for their knowledge of names and their lengths.\n",
"\n",
"Along the way, [Your Name] encountered many interesting characters who had their own stories to tell about the lengths of their names. Some had short names that were easy to remember, while others had long names that seemed to go on forever.\n",
"\n",
"As [Your Name] continued their quest, they came across a wise old wizard who claimed to have a magical tool that could calculate the exact length of any name. Intrigued, [Your Name] approached the wizard and asked for their assistance.\n",
"\n",
"The wizard took out a mystical device and asked [Your Name] to spell out their name. [Your Name] eagerly complied, carefully enunciating each letter. The wizard then waved the device over the name and muttered an incantation.\n",
"\n",
"In an instant, the device displayed the length of [Your Name]'s name. It was a number that represented the total count of characters in their name, including spaces and punctuation marks. [Your Name] was amazed to see the result and thanked the wizard for their help.\n",
"\n",
"Armed with this newfound knowledge, [Your Name] returned home and shared their story with friends and family. They realized that the length of their name was not just a random number, but a reflection of their identity and the unique journey they had taken to discover it.\n",
"\n",
"And so, [Your Name] lived happily ever after, cherishing their name and the story behind its length. They understood that the length of a name is not just a matter of counting letters, but a testament to the individuality and significance of each person's identity.\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): that's not what I wanted. My name is eugene. calculate the length of my name and tell me a story about the result.\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: \n",
"Starting agent: agent with input: {'input': \"that's not what I wanted. My name is eugene. calculate the length of my name and tell me a story about the result.\", 'chat_history': []}\n",
"--\n",
"Starting tool: word_length with inputs: {'word': 'eugene'}\n",
"Done tool: word_length\n",
"Tool output was: 6\n",
"--\n",
"The| length| of| your| name|,| Eugene|,| is| |6| characters|.| Now|,| let| me| tell| you| a| story| about| the| result|.\n",
"\n",
"|Once| upon| a| time|,| in| a| land| far| away|,| there| was| a| young| boy| named| Eugene|.| He| had| a| special| power| -| the| power| to| bring| joy| and| laughter| to| everyone| he| met|.| Eugene|'s| name|,| with| its| |6| letters|,| perfectly| reflected| his| vibrant| and| energetic| personality|.\n",
"\n",
"|One| day|,| Eugene| decided| to| embark| on| a| grand| adventure|.| He| set| off| on| a| journey| to| spread| happiness| and| positivity| throughout| the| kingdom|.| Along| the| way|,| he| encountered| people| from| all| walks| of| life| -| from| humble| farmers| to| noble| knights|.\n",
"\n",
"|With| his| infectious| smile| and| kind| heart|,| Eugene| touched| the| lives| of| everyone| he| met|.| His| name|,| with| its| |6| letters|,| became| synonymous| with| love|,| compassion|,| and| joy|.| People| would| often| say|,| \"|If| you| want| to| experience| true| happiness|,| just| spend| a| moment| with| Eugene|.\"\n",
"\n",
"|As| Eugene| continued| his| journey|,| word| of| his| incredible| ability| to| bring| happiness| spread| far| and| wide|.| People| from| distant| lands| would| travel| for| miles| just| to| catch| a| glimpse| of| him|.| His| name|,| with| its| |6| letters|,| became| a| symbol| of| hope| and| inspiration|.\n",
"\n",
"|E|ug|ene|'s| story| serves| as| a| reminder| that| sometimes|,| the| simplest| things| can| have| the| greatest| impact|.| His| name|,| with| its| |6| letters|,| became| a| beacon| of| light| in| a| world| that| often| seemed| dark| and| glo|omy|.\n",
"\n",
"|And| so|,| Eugene|'s| adventure| continues|,| as| he| spreads| joy| and| happiness| wherever| he| goes|.| His| name|,| with| its| |6| letters|,| will| forever| be| et|ched| in| the| hearts| of| those| whose| lives| he| has| touched|.\n",
"\n",
"|The| end|.|\n",
"--\n",
"Done agent: agent with output: The length of your name, Eugene, is 6 characters. Now, let me tell you a story about the result.\n",
"\n",
"Once upon a time, in a land far away, there was a young boy named Eugene. He had a special power - the power to bring joy and laughter to everyone he met. Eugene's name, with its 6 letters, perfectly reflected his vibrant and energetic personality.\n",
"\n",
"One day, Eugene decided to embark on a grand adventure. He set off on a journey to spread happiness and positivity throughout the kingdom. Along the way, he encountered people from all walks of life - from humble farmers to noble knights.\n",
"\n",
"With his infectious smile and kind heart, Eugene touched the lives of everyone he met. His name, with its 6 letters, became synonymous with love, compassion, and joy. People would often say, \"If you want to experience true happiness, just spend a moment with Eugene.\"\n",
"\n",
"As Eugene continued his journey, word of his incredible ability to bring happiness spread far and wide. People from distant lands would travel for miles just to catch a glimpse of him. His name, with its 6 letters, became a symbol of hope and inspiration.\n",
"\n",
"Eugene's story serves as a reminder that sometimes, the simplest things can have the greatest impact. His name, with its 6 letters, became a beacon of light in a world that often seemed dark and gloomy.\n",
"\n",
"And so, Eugene's adventure continues, as he spreads joy and happiness wherever he goes. His name, with its 6 letters, will forever be etched in the hearts of those whose lives he has touched.\n",
"\n",
"The end.\n"
]
},
{
"name": "stdin",
"output_type": "stream",
"text": [
"Human (Q/q to quit): q\n"
]
},
{
"name": "stdout",
"output_type": "stream",
"text": [
"AI: Bye bye human\n"
]
}
],
"source": [
"chat_history = []\n",
"\n",
"while True:\n",
" human = input(\"Human (Q/q to quit): \")\n",
" if human in {\"q\", \"Q\"}:\n",
" print('AI: Bye bye human')\n",
" break\n",
" ai = None\n",
" print(\"AI: \")\n",
" async for event in remote_runnable.astream_events(\n",
" {\"input\": human, \"chat_history\": chat_history},\n",
" version=\"v1\",\n",
" ):\n",
" kind = event[\"event\"]\n",
" if kind == \"on_chain_start\":\n",
" if (\n",
" event[\"name\"] == \"agent\"\n",
" ): # Was assigned when creating the agent with `.with_config({\"run_name\": \"Agent\"})`\n",
" print(\n",
" f\"Starting agent: {event['name']} with input: {event['data'].get('input')}\"\n",
" )\n",
" elif kind == \"on_chain_end\":\n",
" if (\n",
" event[\"name\"] == \"agent\"\n",
" ): # Was assigned when creating the agent with `.with_config({\"run_name\": \"Agent\"})`\n",
" print()\n",
" print(\"--\")\n",
" print(\n",
" f\"Done agent: {event['name']} with output: {event['data'].get('output')['output']}\"\n",
" )\n",
" if kind == \"on_chat_model_stream\":\n",
" content = event[\"data\"][\"chunk\"].content\n",
" if content:\n",
" # Empty content in the context of OpenAI means\n",
" # that the model is asking for a tool to be invoked.\n",
" # So we only print non-empty content\n",
" print(content, end=\"|\")\n",
" elif kind == \"on_tool_start\":\n",
" print(\"--\")\n",
" print(\n",
" f\"Starting tool: {event['name']} with inputs: {event['data'].get('input')}\"\n",
" )\n",
" elif kind == \"on_tool_end\":\n",
" print(f\"Done tool: {event['name']}\")\n",
" print(f\"Tool output was: {event['data'].get('output')}\")\n",
" print(\"--\") \n"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.8"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+157
View File
@@ -0,0 +1,157 @@
#!/usr/bin/env python
"""Example LangChain server exposes and agent that has conversation history.
In this example, the history is stored entirely on the client's side.
Please see other examples in LangServe on how to use RunnableWithHistory to
store history on the server side.
Relevant LangChain documentation:
* Creating a custom agent: https://python.langchain.com/docs/modules/agents/how_to/custom_agent
* Streaming with agents: https://python.langchain.com/docs/modules/agents/how_to/streaming#custom-streaming-with-events
* General streaming documentation: https://python.langchain.com/docs/expression_language/streaming
* Message History: https://python.langchain.com/docs/expression_language/how_to/message_history
**ATTENTION**
1. To support streaming individual tokens you will need to use the astream events
endpoint rather than the streaming endpoint.
2. This example does not truncate message history, so it will crash if you
send too many messages (exceed token length).
3. The playground at the moment does not render agent output well! If you want to
use the playground you need to customize it's output server side using astream
events by wrapping it within another runnable.
4. See the client notebook it has an example of how to use stream_events client side!
""" # noqa: E501
from typing import Any, List, Union
from fastapi import FastAPI
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad.openai_tools import (
format_to_openai_tool_messages,
)
from langchain.agents.output_parsers.openai_tools import OpenAIToolsAgentOutputParser
from langchain_core.messages import AIMessage, FunctionMessage, HumanMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.tools import tool
from langchain_core.utils.function_calling import format_tool_to_openai_tool
from langchain_openai import ChatOpenAI
from pydantic import BaseModel, Field
from langserve import add_routes
prompt = ChatPromptTemplate.from_messages(
[
(
"system",
"You are very powerful assistant, but bad at calculating lengths of words. "
"Talk with the user as normal. "
"If they ask you to calculate the length of a word, use a tool",
),
# Please note the ordering of the fields in the prompt!
# The correct ordering is:
# 1. history - the past messages between the user and the agent
# 2. user - the user's current input
# 3. agent_scratchpad - the agent's working space for thinking and
# invoking tools to respond to the user's input.
# If you change the ordering, the agent will not work correctly since
# the messages will be shown to the underlying LLM in the wrong order.
MessagesPlaceholder(variable_name="chat_history"),
("user", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad"),
]
)
@tool
def word_length(word: str) -> int:
"""Returns a counter word"""
return len(word)
# We need to set streaming=True on the LLM to support streaming individual tokens.
# Tokens will be available when using the stream_log / stream events endpoints,
# but not when using the stream endpoint since the stream implementation for agent
# streams action observation pairs not individual tokens.
# See the client notebook that shows how to use the stream events endpoint.
llm = ChatOpenAI(model="gpt-3.5-turbo", temperature=0, streaming=True)
tools = [word_length]
llm_with_tools = llm.bind(tools=[format_tool_to_openai_tool(tool) for tool in tools])
# ATTENTION: For production use case, it's a good idea to trim the prompt to avoid
# exceeding the context window length used by the model.
#
# To fix that simply adjust the chain to trim the prompt in whatever way
# is appropriate for your use case.
# For example, you may want to keep the system message and the last 10 messages.
# Or you may want to trim based on the number of tokens.
# Or you may want to also summarize the messages to keep information about things
# that were learned about the user.
#
# def prompt_trimmer(messages: List[Union[HumanMessage, AIMessage, FunctionMessage]]):
# '''Trims the prompt to a reasonable length.'''
# # Keep in mind that when trimming you may want to keep the system message!
# return messages[-10:] # Keep last 10 messages.
agent = (
{
"input": lambda x: x["input"],
"agent_scratchpad": lambda x: format_to_openai_tool_messages(
x["intermediate_steps"]
),
"chat_history": lambda x: x["chat_history"],
}
| prompt
# | prompt_trimmer # See comment above.
| llm_with_tools
| OpenAIToolsAgentOutputParser()
)
agent_executor = AgentExecutor(agent=agent, tools=tools, verbose=True)
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using LangChain's Runnable interfaces",
)
# We need to add these input/output schemas because the current AgentExecutor
# is lacking in schemas.
class Input(BaseModel):
input: str
# The field extra defines a chat widget.
# Please see documentation about widgets in the main README.
# The widget is used in the playground.
# Keep in mind that playground support for agents is not great at the moment.
# To get a better experience, you'll need to customize the streaming output
# for now.
chat_history: List[Union[HumanMessage, AIMessage, FunctionMessage]] = Field(
...,
extra={"widget": {"type": "chat", "input": "input", "output": "output"}},
)
class Output(BaseModel):
output: Any
# Adds routes to the app for using the chain under:
# /invoke
# /batch
# /stream
# /stream_events
add_routes(
app,
agent_executor.with_types(input_type=Input, output_type=Output).with_config(
{"run_name": "agent"}
),
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+125
View File
@@ -0,0 +1,125 @@
"""An example that shows how to use the API handler directly.
For this to work with RemoteClient, the routes must match those expected
by the client; i.e., /invoke, /batch, /stream, etc. No trailing slashes should be used.
"""
from importlib import metadata
from typing import Annotated
from fastapi import Depends, FastAPI, Request, Response
from langchain_core.runnables import RunnableLambda
from sse_starlette import EventSourceResponse
from langserve import APIHandler
PYDANTIC_VERSION = metadata.version("pydantic")
_PYDANTIC_MAJOR_VERSION: int = int(PYDANTIC_VERSION.split(".")[0])
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
##
# Example 1 -- invoke, batch together with doc-generation
# This endpoint shows how to expose `invoke` and `batch` using the APIHandler.
# It also shows how to generate documentation properly so it works correctly
# depending on Fast API and pydantic versions.
def add_one(x: int) -> int:
"""Add one to the given number."""
return x + 1
chain = RunnableLambda(add_one)
api_handler = APIHandler(chain, path="/simple")
# First register the endpoints without documentation
@app.post("/simple/invoke", include_in_schema=False)
async def simple_invoke(request: Request) -> Response:
"""Handle a request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
return await api_handler.invoke(request)
@app.post("/simple/batch", include_in_schema=False)
async def simple_batch(request: Request) -> Response:
"""Handle a request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
return await api_handler.batch(request)
# Here, we show how to populate the documentation for the endpoint.
# Please note that this is done separately from the actual endpoint.
# This happens due to two reasons:
# 1. FastAPI does not support using pydantic.v1 models in the docs endpoint.
# "https://github.com/tiangolo/fastapi/issues/10360"
# LangChain uses pydantic.v1 models!
# 2. Configurable Runnables have a *dynamic* schema, which means that
# the shape of the input depends on the config.
# In this case, the openapi schema is a best effort showing the documentation
# that will work for the default config (and any non-conflicting configs).
if _PYDANTIC_MAJOR_VERSION == 1: # Do not use in your own
# Add documentation
@app.post("/simple/invoke")
async def simple_invoke_docs(
request: api_handler.InvokeRequest,
) -> api_handler.InvokeResponse:
"""API endpoint used only for documentation purposes. Populate /docs endpoint"""
raise NotImplementedError(
"This endpoint is only used for documentation purposes"
)
@app.post("/simple/batch")
async def simple_batch_docs(
request: api_handler.BatchRequest,
) -> api_handler.BatchResponse:
"""API endpoint used only for documentation purposes. Populate /docs endpoint"""
raise NotImplementedError(
"This endpoint is only used for documentation purposes"
)
else:
print(
"Skipping documentation generation for pydantic v2: "
"https://github.com/tiangolo/fastapi/issues/10360"
)
##
# Example 2 -- Expose `invoke` and `stream` using the API Handler.
# Uses FastAPI Depends get a ready API handler.
async def _get_api_handler() -> APIHandler:
"""Prepare a RunnableLambda."""
return APIHandler(RunnableLambda(add_one), path="/v2")
@app.post("/v2/invoke")
async def v2_invoke(
request: Request, runnable: Annotated[APIHandler, Depends(_get_api_handler)]
) -> Response:
"""Handle invoke request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
return await runnable.invoke(request)
@app.post("/v2/stream")
async def v2_stream(
request: Request, runnable: Annotated[APIHandler, Depends(_get_api_handler)]
) -> EventSourceResponse:
"""Handle stream request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
return await runnable.stream(request)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+212
View File
@@ -0,0 +1,212 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Client\n",
"\n",
"This is an example client that interacts with the server that has \"auth\".\n",
"\n",
"Please reference appropriate documentation in the server code and in FastAPI to actually make this secure.\n",
"\n",
"\n",
"**ATTENTION** Only the invoke endpoint has been defined by the server! \n",
"So batch/stream won't work. If you want to add stream and batch, you can do so as well on the server side.\n",
"The server is implemented using the APIHandler, it's more flexible, but does require a bit more code. :)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Login as Alice"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import requests\n",
"\n",
"response = requests.post(\"http://localhost:8000/token\", data={\"username\": \"alice\", \"password\": \"secret1\"})\n",
"result = response.json()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"token = result['access_token']"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"inputs = {\"input\": \"hello\"}\n",
"response = requests.post(\"http://localhost:8000/my_runnable/invoke\", \n",
" json={\n",
" 'input': 'hello',\n",
" },\n",
" headers={\n",
" 'Authorization': f\"Bearer {token}\"\n",
" }\n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'output': [{'page_content': 'cats like mice',\n",
" 'metadata': {'owner_id': 'alice'},\n",
" 'type': 'Document'},\n",
" {'page_content': 'cats like cheese',\n",
" 'metadata': {'owner_id': 'alice'},\n",
" 'type': 'Document'}],\n",
" 'callback_events': [],\n",
" 'metadata': {'run_id': '1732c9aa-c6d3-4736-b8ca-01265fa8ba06'}}"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"response.json()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"You can also interact with this via the RemoteRunnable interface (to use in other chains)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/my_runnable\", headers={\"Authorization\": f\"Bearer {token}\"})"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[Document(page_content='cats like mice', metadata={'owner_id': 'alice'}),\n",
" Document(page_content='cats like cheese', metadata={'owner_id': 'alice'})]"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"await remote_runnable.ainvoke(\"cat\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Login as John"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import requests\n",
"\n",
"response = requests.post(\"http://localhost:8000/token\", data={\"username\": \"john\", \"password\": \"secret2\"})\n",
"token = response.json()['access_token']\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/my_runnable\", headers={\"Authorization\": f\"Bearer {token}\"})"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[Document(page_content='i like walks by the ocean', metadata={'owner_id': 'john'}),\n",
" Document(page_content='dogs like sticks', metadata={'owner_id': 'john'}),\n",
" Document(page_content='my favorite food is cheese', metadata={'owner_id': 'john'})]"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"await remote_runnable.ainvoke(\"water\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+284
View File
@@ -0,0 +1,284 @@
#!/usr/bin/env python
"""Example that shows how to use the underlying APIHandler class directly with Auth.
This example shows how to apply logic based on the user's identity.
You can build on these concepts to implement a more complex app:
* Add endpoints that allow users to manage their documents.
* Make a more complex runnable that does something with the retrieved documents; e.g.,
a conversational agent that responds to the user's input with the retrieved documents
(which are user specific documents).
For authentication, we use a fake token that's the same as the username, adapting
the following example from the FastAPI docs:
https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/
**ATTENTION**
This example is not actually secure and should not be used in production.
Once you understand how to use `per_req_config_modifier`, read through
the FastAPI docs and implement proper auth:
https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/
**ATTENTION**
This example does not integrate auth with OpenAPI, so the OpenAPI docs won't
be able to help with authentication. This is currently a limitation
if using `add_routes`. If you need this functionality, you can use
the underlying `APIHandler` class directly, which affords maximal flexibility.
"""
from importlib import metadata
from typing import Any, List, Optional, Union
from fastapi import Depends, FastAPI, HTTPException, Request, Response, status
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from langchain_chroma import Chroma
from langchain_core.documents import Document
from langchain_core.runnables import (
ConfigurableField,
RunnableConfig,
RunnableSerializable,
)
from langchain_core.vectorstores import VectorStore
from langchain_openai import OpenAIEmbeddings
from pydantic import BaseModel, ConfigDict
from typing_extensions import Annotated
from langserve import APIHandler
class User(BaseModel):
username: str
email: Union[str, None] = None
full_name: Union[str, None] = None
disabled: Union[bool, None] = None
class UserInDB(User):
hashed_password: str
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
app = FastAPI()
FAKE_USERS_DB = {
"alice": {
"username": "alice",
"full_name": "Alice Wonderson",
"email": "alice@example.com",
"hashed_password": "fakehashedsecret1",
"disabled": False,
},
"john": {
"username": "john",
"full_name": "John Doe",
"email": "johndoe@example.com",
"hashed_password": "fakehashedsecret2",
"disabled": False,
},
"bob": {
"username": "john",
"full_name": "John Doe",
"email": "johndoe@example.com",
"hashed_password": "fakehashedsecret3",
"disabled": True,
},
}
def _fake_hash_password(password: str) -> str:
"""Fake a hashed password."""
return "fakehashed" + password
def _get_user(db: dict, username: str) -> Union[UserInDB, None]:
if username in db:
user_dict = db[username]
return UserInDB(**user_dict)
def _fake_decode_token(token: str) -> Union[User, None]:
# This doesn't provide any security at all
# Check the next version
user = _get_user(FAKE_USERS_DB, token)
return user
@app.post("/token")
async def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]):
user_dict = FAKE_USERS_DB.get(form_data.username)
if not user_dict:
raise HTTPException(status_code=400, detail="Incorrect username or password")
user = UserInDB(**user_dict)
hashed_password = _fake_hash_password(form_data.password)
if not hashed_password == user.hashed_password:
raise HTTPException(status_code=400, detail="Incorrect username or password")
return {"access_token": user.username, "token_type": "bearer"}
async def get_current_user(token: Annotated[str, Depends(oauth2_scheme)]):
user = _fake_decode_token(token)
if not user:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Invalid authentication credentials",
headers={"WWW-Authenticate": "Bearer"},
)
return user
async def get_current_active_user(
current_user: Annotated[User, Depends(get_current_user)],
):
if current_user.disabled:
raise HTTPException(status_code=400, detail="Inactive user")
return current_user
class PerUserVectorstore(RunnableSerializable):
"""A custom runnable that returns a list of documents for the given user.
The runnable is configurable by the user, and the search results are
filtered by the user ID.
"""
user_id: Optional[str]
vectorstore: VectorStore
model_config = ConfigDict(
arbitrary_types_allowed=True,
)
def _invoke(
self, input: str, config: Optional[RunnableConfig] = None, **kwargs: Any
) -> List[Document]:
"""Invoke the retriever."""
# WARNING: Verify documentation of underlying vectorstore to make
# sure that it actually uses filters.
# Highly recommended to use unit-tests to verify this behavior, as
# implementations can be different depending on the underlying vectorstore.
retriever = self.vectorstore.as_retriever(
search_kwargs={"filter": {"owner_id": self.user_id}}
)
return retriever.invoke(input, config=config)
def invoke(
self, input: str, config: Optional[RunnableConfig] = None, **kwargs
) -> List[Document]:
"""Add one to an integer."""
return self._call_with_config(self._invoke, input, config, **kwargs)
vectorstore = Chroma(
collection_name="some_collection",
embedding_function=OpenAIEmbeddings(),
)
vectorstore.add_documents(
[
Document(
page_content="cats like cheese",
metadata={"owner_id": "alice"},
),
Document(
page_content="cats like mice",
metadata={"owner_id": "alice"},
),
Document(
page_content="dogs like sticks",
metadata={"owner_id": "john"},
),
Document(
page_content="my favorite food is cheese",
metadata={"owner_id": "john"},
),
Document(
page_content="i like walks by the ocean",
metadata={"owner_id": "john"},
),
Document(
page_content="dogs like grass",
metadata={"owner_id": "bob"},
),
]
)
per_user_retriever = PerUserVectorstore(
user_id=None, # Placeholder ID that will be replaced by the per_req_config_modifier
vectorstore=vectorstore,
).configurable_fields(
# Attention: Make sure to override the user ID for each request in the
# per_req_config_modifier. This should not be client configurable.
user_id=ConfigurableField(
id="user_id",
name="User ID",
description="The user ID to use for the retriever.",
)
)
# Let's define the API Handler
api_handler = APIHandler(
per_user_retriever,
# Namespace for the runnable.
# Endpoints like batch / invoke should be under /my_runnable/invoke
# and /my_runnable/batch etc.
path="/my_runnable",
)
PYDANTIC_VERSION = metadata.version("pydantic")
_PYDANTIC_MAJOR_VERSION: int = int(PYDANTIC_VERSION.split(".")[0])
# **ATTENTION** Your code does not need to include both versions.
# Use whichever version is appropriate given the pydantic version you are using.
# Both versions are included here for demonstration purposes.
#
# If using pydantic <2, everything works as expected.
# However, when using pydantic >=2 is installed, things are a bit
# more complicated because LangChain uses the pydantic.v1 namespace
# But the pydantic.v1 namespace is not supported by FastAPI.
# See this issue: https://github.com/tiangolo/fastapi/issues/10360
# So when using pydantic >=2, we need to use a vanilla starlette request
# and response, and we will not have documentation.
# Or we can create custom models for the request and response.
# The underlying API Handler will still validate the request
# correctly even if vanilla requests are used.
if _PYDANTIC_MAJOR_VERSION == 1:
@app.post("/my_runnable/invoke")
async def invoke_with_auth(
# Included for documentation purposes
invoke_request: api_handler.InvokeRequest,
request: Request,
current_user: Annotated[User, Depends(get_current_active_user)],
) -> Response:
"""Handle a request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
config = {"configurable": {"user_id": current_user.username}}
return await api_handler.invoke(request, server_config=config)
else:
@app.post("/my_runnable/invoke")
async def invoke_with_auth(
request: Request,
current_user: Annotated[User, Depends(get_current_active_user)],
) -> Response:
"""Handle a request."""
# The API Handler validates the parts of the request
# that are used by the runnnable (e.g., input, config fields)
config = {"configurable": {"user_id": current_user.username}}
return await api_handler.invoke(request, server_config=config)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python
"""An example that uses Fast API global dependencies.
This approach can be used if the same authentication logic can be used
for all endpoints in the application.
This may be a reasonable approach for simple applications.
See:
* https://fastapi.tiangolo.com/tutorial/dependencies/global-dependencies/
* https://fastapi.tiangolo.com/tutorial/dependencies/
* https://fastapi.tiangolo.com/tutorial/security/
"""
from fastapi import Depends, FastAPI, Header, HTTPException
from langchain_core.runnables import RunnableLambda
from typing_extensions import Annotated
from langserve import add_routes
async def verify_token(x_token: Annotated[str, Header()]) -> None:
"""Verify the token is valid."""
# Replace this with your actual authentication logic
if x_token != "secret-token":
raise HTTPException(status_code=400, detail="X-Token header invalid")
app = FastAPI(
title="LangChain Server",
version="1.0",
dependencies=[Depends(verify_token)],
)
def add_one(x: int) -> int:
"""Add one to an integer."""
return x + 1
chain = RunnableLambda(add_one)
add_routes(
app,
chain,
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+50
View File
@@ -0,0 +1,50 @@
#!/usr/bin/env python
"""An example that shows how to use path dependencies for authentication.
The path dependencies are applied to all the routes added by the `add_routes`.
To keep this example brief, we're providing a placeholder verify_token function
that shows how to use path dependencies.
To implement proper auth, please see the FastAPI docs:
* https://fastapi.tiangolo.com/tutorial/dependencies/dependencies-in-path-operation-decorators/
* https://fastapi.tiangolo.com/tutorial/dependencies/
* https://fastapi.tiangolo.com/tutorial/security/
""" # noqa: E501
from fastapi import Depends, FastAPI, Header, HTTPException
from langchain_core.runnables import RunnableLambda
from typing_extensions import Annotated
from langserve import add_routes
async def verify_token(x_token: Annotated[str, Header()]) -> None:
"""Verify the token is valid."""
# Replace this with your actual authentication logic
if x_token != "secret-token":
raise HTTPException(status_code=400, detail="X-Token header invalid")
app = FastAPI()
def add_one(x: int) -> int:
"""Add one to an integer."""
return x + 1
chain = RunnableLambda(add_one)
add_routes(
app,
chain,
dependencies=[Depends(verify_token)],
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -0,0 +1,207 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Client\n",
"\n",
"This is an example client that interacts with the server that has \"auth\".\n",
"\n",
"Please reference appropriate documentation in the server code and in FastAPI to actually make this secure."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Login as Alice"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import requests\n",
"\n",
"response = requests.post(\"http://localhost:8000/token\", data={\"username\": \"alice\", \"password\": \"secret1\"})\n",
"result = response.json()"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"token = result['access_token']"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"inputs = {\"input\": \"hello\"}\n",
"response = requests.post(\"http://localhost:8000/invoke\", \n",
" json={\n",
" 'input': 'hello',\n",
" },\n",
" headers={\n",
" 'Authorization': f\"Bearer {token}\"\n",
" }\n",
")\n"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'output': [{'page_content': 'cats like mice',\n",
" 'metadata': {'owner_id': 'alice'},\n",
" 'type': 'Document'},\n",
" {'page_content': 'cats like cheese',\n",
" 'metadata': {'owner_id': 'alice'},\n",
" 'type': 'Document'}],\n",
" 'callback_events': [],\n",
" 'metadata': {'run_id': '00000000-0000-0000-0000-000000000000'}}"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"response.json()"
]
},
{
"cell_type": "markdown",
"metadata": {
"tags": []
},
"source": [
"You can also interact with this via the RemoteRunnable interface (to use in other chains)"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/\", headers={\"Authorization\": f\"Bearer {token}\"})"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[Document(page_content='cats like mice', metadata={'owner_id': 'alice'}),\n",
" Document(page_content='cats like cheese', metadata={'owner_id': 'alice'})]"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"await remote_runnable.ainvoke(\"cat\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Login as John"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import requests\n",
"\n",
"response = requests.post(\"http://localhost:8000/token\", data={\"username\": \"john\", \"password\": \"secret2\"})\n",
"token = response.json()['access_token']\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/\", headers={\"Authorization\": f\"Bearer {token}\"})"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[Document(page_content='i like walks by the ocean', metadata={'owner_id': 'john'}),\n",
" Document(page_content='dogs like sticks', metadata={'owner_id': 'john'}),\n",
" Document(page_content='my favorite food is cheese', metadata={'owner_id': 'john'})]"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"await remote_runnable.ainvoke(\"water\")"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+242
View File
@@ -0,0 +1,242 @@
#!/usr/bin/env python
"""Example that shows how to use `per_req_config_modifier`.
This is a simple example that shows how to use configurable runnables with
per request configuration modification to achieve behavior that's different
depending on the user.
You can build on these concepts to implement a more complex app:
* Add endpoints that allow users to manage their documents.
* Make a more complex runnable that does something with the retrieved documents; e.g.,
a conversational agent that responds to the user's input with the retrieved documents
(which are user specific documents).
For authentication, we use a fake token that's the same as the username, adapting
the following example from the FastAPI docs:
https://fastapi.tiangolo.com/tutorial/security/simple-oauth2/
**ATTENTION**
This example is not actually secure and should not be used in production.
Once you understand how to use `per_req_config_modifier`, read through
the FastAPI docs and implement proper auth:
https://fastapi.tiangolo.com/tutorial/security/oauth2-jwt/
**ATTENTION**
This example does not integrate auth with OpenAPI, so the OpenAPI docs won't
be able to help with authentication. This is currently a limitation
if using `add_routes`. If you need this functionality, you can use
the underlying `APIHandler` class directly, which affords maximal flexibility.
"""
from typing import Any, Dict, List, Optional, Union
from fastapi import Depends, FastAPI, HTTPException, Request, status
from fastapi.security import OAuth2PasswordBearer, OAuth2PasswordRequestForm
from langchain_chroma import Chroma
from langchain_core.documents import Document
from langchain_core.runnables import (
ConfigurableField,
RunnableConfig,
RunnableSerializable,
)
from langchain_core.vectorstores import VectorStore
from langchain_openai import OpenAIEmbeddings
from pydantic import BaseModel, ConfigDict
from typing_extensions import Annotated
from langserve import add_routes
class User(BaseModel):
username: str
email: Union[str, None] = None
full_name: Union[str, None] = None
disabled: Union[bool, None] = None
class UserInDB(User):
hashed_password: str
oauth2_scheme = OAuth2PasswordBearer(tokenUrl="token")
app = FastAPI()
FAKE_USERS_DB = {
"alice": {
"username": "alice",
"full_name": "Alice Wonderson",
"email": "alice@example.com",
"hashed_password": "fakehashedsecret1",
"disabled": False,
},
"john": {
"username": "john",
"full_name": "John Doe",
"email": "johndoe@example.com",
"hashed_password": "fakehashedsecret2",
"disabled": False,
},
"bob": {
"username": "john",
"full_name": "John Doe",
"email": "johndoe@example.com",
"hashed_password": "fakehashedsecret3",
"disabled": True,
},
}
def _fake_hash_password(password: str) -> str:
"""Fake a hashed password."""
return "fakehashed" + password
def _get_user(db: dict, username: str) -> Union[UserInDB, None]:
if username in db:
user_dict = db[username]
return UserInDB(**user_dict)
def _fake_decode_token(token: str) -> Union[User, None]:
# This doesn't provide any security at all
# Check the next version
user = _get_user(FAKE_USERS_DB, token)
return user
@app.post("/token")
async def login(form_data: Annotated[OAuth2PasswordRequestForm, Depends()]):
user_dict = FAKE_USERS_DB.get(form_data.username)
if not user_dict:
raise HTTPException(status_code=400, detail="Incorrect username or password")
user = UserInDB(**user_dict)
hashed_password = _fake_hash_password(form_data.password)
if not hashed_password == user.hashed_password:
raise HTTPException(status_code=400, detail="Incorrect username or password")
return {"access_token": user.username, "token_type": "bearer"}
async def get_current_active_user_from_request(request: Request) -> User:
"""Get the current active user from the request."""
token = await oauth2_scheme(request)
user = _fake_decode_token(token)
if not user:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,
detail="Invalid authentication credentials",
headers={"WWW-Authenticate": "Bearer"},
)
if user.disabled:
raise HTTPException(status_code=400, detail="Inactive user")
return user
class PerUserVectorstore(RunnableSerializable):
"""A custom runnable that returns a list of documents for the given user.
The runnable is configurable by the user, and the search results are
filtered by the user ID.
"""
user_id: Optional[str]
vectorstore: VectorStore
model_config = ConfigDict(
arbitrary_types_allowed=True,
)
def _invoke(
self, input: str, config: Optional[RunnableConfig] = None, **kwargs: Any
) -> List[Document]:
"""Invoke the retriever."""
# WARNING: Verify documentation of underlying vectorstore to make
# sure that it actually uses filters.
# Highly recommended to use unit-tests to verify this behavior, as
# implementations can be different depending on the underlying vectorstore.
retriever = self.vectorstore.as_retriever(
search_kwargs={"filter": {"owner_id": self.user_id}}
)
return retriever.invoke(input, config=config)
def invoke(
self, input: str, config: Optional[RunnableConfig] = None, **kwargs
) -> List[Document]:
"""Add one to an integer."""
return self._call_with_config(self._invoke, input, config, **kwargs)
async def per_req_config_modifier(config: Dict, request: Request) -> Dict:
"""Modify the config for each request."""
user = await get_current_active_user_from_request(request)
config["configurable"] = {}
# Attention: Make sure that the user ID is over-ridden for each request.
# We should not be accepting a user ID from the user in this case!
config["configurable"]["user_id"] = user.username
return config
vectorstore = Chroma(
collection_name="some_collection",
embedding_function=OpenAIEmbeddings(),
)
vectorstore.add_documents(
[
Document(
page_content="cats like cheese",
metadata={"owner_id": "alice"},
),
Document(
page_content="cats like mice",
metadata={"owner_id": "alice"},
),
Document(
page_content="dogs like sticks",
metadata={"owner_id": "john"},
),
Document(
page_content="my favorite food is cheese",
metadata={"owner_id": "john"},
),
Document(
page_content="i like walks by the ocean",
metadata={"owner_id": "john"},
),
Document(
page_content="dogs like grass",
metadata={"owner_id": "bob"},
),
]
)
per_user_retriever = PerUserVectorstore(
user_id=None, # Placeholder ID that will be replaced by the per_req_config_modifier
vectorstore=vectorstore,
).configurable_fields(
# Attention: Make sure to override the user ID for each request in the
# per_req_config_modifier. This should not be client configurable.
user_id=ConfigurableField(
id="user_id",
name="User ID",
description="The user ID to use for the retriever.",
)
)
add_routes(
app,
per_user_retriever,
per_req_config_modifier=per_req_config_modifier,
enabled_endpoints=["invoke"],
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -0,0 +1,56 @@
#!/usr/bin/env python
"""Example of a simple chatbot that just passes current conversation
state back and forth between server and client.
"""
from typing import List, Union
from fastapi import FastAPI
from langchain_anthropic import ChatAnthropic
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from pydantic import BaseModel, Field
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful, professional assistant named Cob."),
MessagesPlaceholder(variable_name="messages"),
("human", "{input}"),
]
)
chain = prompt | ChatAnthropic(model="claude-2.1")
class InputChat(BaseModel):
"""Input for the chat endpoint."""
messages: List[Union[HumanMessage, AIMessage, SystemMessage]] = Field(
...,
description="The chat messages representing the current conversation.",
)
input: str
add_routes(
app,
chain.with_types(input_type=InputChat),
enable_feedback_endpoint=True,
enable_public_trace_link_endpoint=True,
playground_type="chat",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+53
View File
@@ -0,0 +1,53 @@
#!/usr/bin/env python
"""Example of a simple chatbot that just passes current conversation
state back and forth between server and client.
"""
from typing import List, Union
from fastapi import FastAPI
from langchain_anthropic.chat_models import ChatAnthropic
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from pydantic import BaseModel, Field
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful, professional assistant named Cob."),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = prompt | ChatAnthropic(model_name="claude-3-sonnet-20240229")
class InputChat(BaseModel):
"""Input for the chat endpoint."""
messages: List[Union[HumanMessage, AIMessage, SystemMessage]] = Field(
...,
description="The chat messages representing the current conversation.",
)
add_routes(
app,
chain.with_types(input_type=InputChat),
enable_feedback_endpoint=True,
enable_public_trace_link_endpoint=True,
playground_type="chat",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+277
View File
@@ -0,0 +1,277 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chat History\n",
"\n",
"An example of a client interacting with a chatbot where message history is persisted on the backend."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import uuid\n",
"from langserve import RemoteRunnable\n",
"\n",
"chat = RemoteRunnable(\"http://localhost:8000/\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's create a prompt composed of a system message and a human message."
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"session_id = str(uuid.uuid4())"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=\" Hello Eugene! My name is Claude. It's nice to meet another cat lover.\")"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"my name is eugene. i like cats. what is your name?\"}, {'configurable': { 'session_id': session_id } })"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=' You told me your name is Eugene.')"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"what was my name?\"}, {'configurable': { 'session_id': session_id } })"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=' You said you like cats.')"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"What animal do i like?\"}, {'configurable': { 'session_id': session_id } })"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
" Sure\n",
",\n",
" I\n",
"'d\n",
" be\n",
" happy\n",
" to\n",
" count\n",
" to\n",
" 10\n",
":\n",
"\n",
"\n",
"1\n",
",\n",
" 2\n",
",\n",
" 3\n",
",\n",
" 4\n",
",\n",
" 5\n",
",\n",
" 6\n",
",\n",
" 7\n",
",\n",
" 8\n",
",\n",
" 9\n",
",\n",
" 10\n"
]
}
],
"source": [
"for chunk in chat.stream({'human_input': \"Can you count till 10?\"}, {'configurable': { 'session_id': session_id } }):\n",
" print()\n",
" print(chunk.content, end='', flush=True)"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;39m[\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"my name is eugene. i like cats. what is your name?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\" Hello Eugene! My name is Claude. It's nice to meet another cat lover.\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"what was my name?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\" You told me your name is Eugene.\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"What animal do i like?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\" You said you like cats.\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"Can you count till 10?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"AIMessageChunk\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\" Sure, I'd be happy to count to 10:\\n\\n1, 2, 3, 4, 5, 6, 7, 8, 9, 10\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"AIMessageChunk\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
"\u001b[1;39m]\u001b[0m\n"
]
}
],
"source": [
"!cat chat_histories/c7a327f3-5578-4fb7-a8f2-3082d7cb58cc.json | jq ."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+113
View File
@@ -0,0 +1,113 @@
#!/usr/bin/env python
"""Example of a chat server with persistence handled on the backend.
For simplicity, we're using file storage here -- to avoid the need to set up
a database. This is obviously not a good idea for a production environment,
but will help us to demonstrate the RunnableWithMessageHistory interface.
We'll use cookies to identify the user and/or session. This will help illustrate how to
fetch configuration from the request.
"""
import re
from pathlib import Path
from typing import Callable, Union
from fastapi import FastAPI, HTTPException
from langchain_anthropic import ChatAnthropic
from langchain_community.chat_message_histories import FileChatMessageHistory
from langchain_core.chat_history import BaseChatMessageHistory
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables.history import RunnableWithMessageHistory
from pydantic import BaseModel, Field
from langserve import add_routes
def _is_valid_identifier(value: str) -> bool:
"""Check if the session ID is in a valid format."""
# Use a regular expression to match the allowed characters
valid_characters = re.compile(r"^[a-zA-Z0-9-_]+$")
return bool(valid_characters.match(value))
def create_session_factory(
base_dir: Union[str, Path],
) -> Callable[[str], BaseChatMessageHistory]:
"""Create a session ID factory that creates session IDs from a base dir.
Args:
base_dir: Base directory to use for storing the chat histories.
Returns:
A session ID factory that creates session IDs from a base path.
"""
base_dir_ = Path(base_dir) if isinstance(base_dir, str) else base_dir
if not base_dir_.exists():
base_dir_.mkdir(parents=True)
def get_chat_history(session_id: str) -> FileChatMessageHistory:
"""Get a chat history from a session ID."""
if not _is_valid_identifier(session_id):
raise HTTPException(
status_code=400,
detail=f"Session ID `{session_id}` is not in a valid format. "
"Session ID must only contain alphanumeric characters, "
"hyphens, and underscores.",
)
file_path = base_dir_ / f"{session_id}.json"
return FileChatMessageHistory(str(file_path))
return get_chat_history
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You're an assistant by the name of Bob."),
MessagesPlaceholder(variable_name="history"),
("human", "{human_input}"),
]
)
chain = prompt | ChatAnthropic(model="claude-2.1")
class InputChat(BaseModel):
"""Input for the chat endpoint."""
# The field extra defines a chat widget.
# As of 2024-02-05, this chat widget is not fully supported.
# It's included in documentation to show how it should be specified, but
# will not work until the widget is fully supported for history persistence
# on the backend.
human_input: str = Field(
...,
description="The human input to the chat system.",
extra={"widget": {"type": "chat", "input": "human_input"}},
)
chain_with_history = RunnableWithMessageHistory(
chain,
create_session_factory("chat_histories"),
input_messages_key="human_input",
history_messages_key="history",
).with_types(input_type=InputChat)
add_routes(
app,
chain_with_history,
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -0,0 +1,359 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Chat History\n",
"\n",
"Here we'll be interacting with a server that's exposing a chat bot with message history being persisted on the backend."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"import uuid\n",
"from langserve import RemoteRunnable\n",
"\n",
"conversation_id = str(uuid.uuid4())\n",
"chat = RemoteRunnable(\"http://localhost:8000/\", cookies={\"user_id\": \"eugene\"})"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's create a prompt composed of a system message and a human message."
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=\"Hello Eugene! I'm Bob, your virtual assistant. How can I assist you today?\")"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"my name is eugene. what is your name?\"}, {'configurable': { 'conversation_id': conversation_id } })"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content='Your name is Eugene. Is there something specific you would like assistance with, Eugene?')"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"what was my name?\"}, {'configurable': { 'conversation_id': conversation_id } })"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Use different user but same conversation id"
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"chat = RemoteRunnable(\"http://localhost:8000/\", cookies={\"user_id\": \"nuno\"})"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=\"I apologize, but I don't have access to personal information about users. As an AI assistant, I prioritize user privacy and data protection.\")"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"chat.invoke({\"human_input\": \"what was my name?\"}, {'configurable': { 'conversation_id': conversation_id }})"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"\n",
"Of\n",
" course\n",
"!\n",
" Here\n",
" you\n",
" go\n",
":\n",
"\n",
"\n",
"1\n",
",\n",
" \n",
"2\n",
",\n",
" \n",
"3\n",
",\n",
" \n",
"4\n",
",\n",
" \n",
"5\n",
",\n",
" \n",
"6\n",
",\n",
" \n",
"7\n",
",\n",
" \n",
"8\n",
",\n",
" \n",
"9\n",
",\n",
" \n",
"10\n",
".\n"
]
}
],
"source": [
"for chunk in chat.stream({'human_input': \"Can you count till 10?\"}, {'configurable': { 'conversation_id': conversation_id } }):\n",
" print()\n",
" print(chunk.content, end='', flush=True)"
]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"'cd8e5a55-0295-41cd-a885-775e0403fd25'"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"conversation_id"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[01;34mchat_histories/\u001b[0m\n",
"├── \u001b[01;34meugene\u001b[0m\n",
"│   └── cd8e5a55-0295-41cd-a885-775e0403fd25.json\n",
"└── \u001b[01;34mnuno\u001b[0m\n",
" └── cd8e5a55-0295-41cd-a885-775e0403fd25.json\n",
"\n",
"2 directories, 2 files\n"
]
}
],
"source": [
"!tree chat_histories/"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;39m[\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"my name is eugene. what is your name?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"Hello Eugene! I'm Bob, your virtual assistant. How can I assist you today?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"what was my name?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"Your name is Eugene. Is there something specific you would like assistance with, Eugene?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
"\u001b[1;39m]\u001b[0m\n"
]
}
],
"source": [
"!cat chat_histories/eugene/cd8e5a55-0295-41cd-a885-775e0403fd25.json | jq ."
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\u001b[1;39m[\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"what was my name?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"I apologize, but I don't have access to personal information about users. As an AI assistant, I prioritize user privacy and data protection.\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"ai\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"Can you count till 10?\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"human\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m,\n",
" \u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"AIMessageChunk\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"data\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{\n",
" \u001b[0m\u001b[34;1m\"content\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"Of course! Here you go:\\n\\n1, 2, 3, 4, 5, 6, 7, 8, 9, 10.\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"additional_kwargs\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[1;39m{}\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"type\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;32m\"AIMessageChunk\"\u001b[0m\u001b[1;39m,\n",
" \u001b[0m\u001b[34;1m\"example\"\u001b[0m\u001b[1;39m: \u001b[0m\u001b[0;39mfalse\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
" \u001b[1;39m}\u001b[0m\u001b[1;39m\n",
"\u001b[1;39m]\u001b[0m\n"
]
}
],
"source": [
"!cat chat_histories/nuno/cd8e5a55-0295-41cd-a885-775e0403fd25.json | jq ."
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+182
View File
@@ -0,0 +1,182 @@
#!/usr/bin/env python
"""Example of a chat server with persistence handled on the backend.
For simplicity, we're using file storage here -- to avoid the need to set up
a database. This is obviously not a good idea for a production environment,
but will help us to demonstrate the RunnableWithMessageHistory interface.
We'll use cookies to identify the user. This will help illustrate how to
fetch configuration from the request.
"""
import re
from pathlib import Path
from typing import Any, Callable, Dict, Union
from fastapi import FastAPI, HTTPException, Request
from langchain_community.chat_message_histories import FileChatMessageHistory
from langchain_core import __version__
from langchain_core.chat_history import BaseChatMessageHistory
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables import ConfigurableFieldSpec
from langchain_core.runnables.history import RunnableWithMessageHistory
from langchain_openai import ChatOpenAI
from typing_extensions import TypedDict
from langserve import add_routes
# Define the minimum required version as (0, 1, 0)
# Earlier versions did not allow specifying custom config fields in
# RunnableWithMessageHistory.
MIN_VERSION_LANGCHAIN_CORE = (0, 1, 0)
# Split the version string by "." and convert to integers
LANGCHAIN_CORE_VERSION = tuple(map(int, __version__.split(".")))
if LANGCHAIN_CORE_VERSION < MIN_VERSION_LANGCHAIN_CORE:
raise RuntimeError(
f"Minimum required version of langchain-core is {MIN_VERSION_LANGCHAIN_CORE}, "
f"but found {LANGCHAIN_CORE_VERSION}"
)
def _is_valid_identifier(value: str) -> bool:
"""Check if the value is a valid identifier."""
# Use a regular expression to match the allowed characters
valid_characters = re.compile(r"^[a-zA-Z0-9-_]+$")
return bool(valid_characters.match(value))
def create_session_factory(
base_dir: Union[str, Path],
) -> Callable[[str], BaseChatMessageHistory]:
"""Create a factory that can retrieve chat histories.
The chat histories are keyed by user ID and conversation ID.
Args:
base_dir: Base directory to use for storing the chat histories.
Returns:
A factory that can retrieve chat histories keyed by user ID and conversation ID.
"""
base_dir_ = Path(base_dir) if isinstance(base_dir, str) else base_dir
if not base_dir_.exists():
base_dir_.mkdir(parents=True)
def get_chat_history(user_id: str, conversation_id: str) -> FileChatMessageHistory:
"""Get a chat history from a user id and conversation id."""
if not _is_valid_identifier(user_id):
raise ValueError(
f"User ID {user_id} is not in a valid format. "
"User ID must only contain alphanumeric characters, "
"hyphens, and underscores."
"Please include a valid cookie in the request headers called 'user-id'."
)
if not _is_valid_identifier(conversation_id):
raise ValueError(
f"Conversation ID {conversation_id} is not in a valid format. "
"Conversation ID must only contain alphanumeric characters, "
"hyphens, and underscores. Please provide a valid conversation id "
"via config. For example, "
"chain.invoke(.., {'configurable': {'conversation_id': '123'}})"
)
user_dir = base_dir_ / user_id
if not user_dir.exists():
user_dir.mkdir(parents=True)
file_path = user_dir / f"{conversation_id}.json"
return FileChatMessageHistory(str(file_path))
return get_chat_history
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
def _per_request_config_modifier(
config: Dict[str, Any], request: Request
) -> Dict[str, Any]:
"""Update the config"""
config = config.copy()
configurable = config.get("configurable", {})
# Look for a cookie named "user_id"
user_id = request.cookies.get("user_id", None)
if user_id is None:
raise HTTPException(
status_code=400,
detail="No user id found. Please set a cookie named 'user_id'.",
)
configurable["user_id"] = user_id
config["configurable"] = configurable
return config
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You're an assistant by the name of Bob."),
MessagesPlaceholder(variable_name="history"),
("human", "{human_input}"),
]
)
chain = prompt | ChatOpenAI()
class InputChat(TypedDict):
"""Input for the chat endpoint."""
human_input: str
"""Human input"""
chain_with_history = RunnableWithMessageHistory(
chain,
create_session_factory("chat_histories"),
input_messages_key="human_input",
history_messages_key="history",
history_factory_config=[
ConfigurableFieldSpec(
id="user_id",
annotation=str,
name="User ID",
description="Unique identifier for the user.",
default="",
is_shared=True,
),
ConfigurableFieldSpec(
id="conversation_id",
annotation=str,
name="Conversation ID",
description="Unique identifier for the conversation.",
default="",
is_shared=True,
),
],
).with_types(input_type=InputChat)
add_routes(
app,
chain_with_history,
per_req_config_modifier=_per_request_config_modifier,
# Disable playground and batch
# 1) Playground we're passing information via headers, which is not supported via
# the playground right now.
# 2) Disable batch to avoid users being confused. Batch will work fine
# as long as users invoke it with multiple configs appropriately, but
# without validation users are likely going to forget to do that.
# In addition, there's likely little sense in support batch for a chatbot.
disabled_endpoints=["playground", "batch"],
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -0,0 +1,770 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Client\n",
"\n",
"Demo of a client interacting with a custom runnable executor that supports configuration.\n",
"\n",
"This server does not support invoke or batch! only stream and astream log! (see backend code.)\n",
"\n",
"The underlying backend code is just a demo in this case -- it's working around an existing bug, but uses \n",
"the opportunity to show how to create custom runnables."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can interact with this via API directly"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"event: metadata\n",
"data: {\"run_id\": \"5e6ce60a-95c4-4fe5-8c4a-ec1d347afd83\"}\n",
"\n",
"event: data\n",
"data: {\"actions\":[{\"tool\":\"get_eugene_thoughts\",\"tool_input\":{\"query\":\"cats\"},\"log\":\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\",\"type\":\"AgentActionMessageLog\",\"message_log\":[{\"content\":\"\",\"additional_kwargs\":{\"function_call\":{\"name\":\"get_eugene_thoughts\",\"arguments\":\"{\\n \\\"query\\\": \\\"cats\\\"\\n}\"}},\"type\":\"ai\",\"example\":false}]}],\"messages\":[{\"content\":\"\",\"additional_kwargs\":{\"function_call\":{\"name\":\"get_eugene_thoughts\",\"arguments\":\"{\\n \\\"query\\\": \\\"cats\\\"\\n}\"}},\"type\":\"ai\",\"example\":false}]}\n",
"\n",
"event: data\n",
"data: {\"steps\":[{\"action\":{\"tool\":\"get_eugene_thoughts\",\"tool_input\":{\"query\":\"cats\"},\"log\":\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\",\"type\":\"AgentActionMessageLog\",\"message_log\":[{\"content\":\"\",\"additional_kwargs\":{\"function_call\":{\"name\":\"get_eugene_thoughts\",\"arguments\":\"{\\n \\\"query\\\": \\\"cats\\\"\\n}\"}},\"type\":\"ai\",\"example\":false}]},\"observation\":[{\"page_content\":\"cats like fish\",\"metadata\":{},\"type\":\"Document\"},{\"page_content\":\"dogs like sticks\",\"metadata\":{},\"type\":\"Document\"}]}],\"messages\":[{\"content\":\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\",\"additional_kwargs\":{},\"type\":\"function\",\"name\":\"get_eugene_thoughts\"}]}\n",
"\n",
"event: data\n",
"data: {\"output\":\"Eugene thinks that cats like fish.\",\"messages\":[{\"content\":\"Eugene thinks that cats like fish.\",\"additional_kwargs\":{},\"type\":\"ai\",\"example\":false}]}\n",
"\n",
"event: end\n",
"\n",
"\n"
]
}
],
"source": [
"import requests\n",
"\n",
"inputs = {\"input\": {\"input\": \"what does eugene think of cats?\"}}\n",
"response = requests.post(\"http://localhost:8000/stream\", json=inputs)\n",
"\n",
"print(response.text)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"You can also interact with this via the RemoteRunnable interface (to use in other chains)"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Remote runnable has the same interface as local runnables"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'output': 'Hello! How can I assist you today?', 'messages': [AIMessage(content='Hello! How can I assist you today?')]}\n"
]
}
],
"source": [
"async for chunk in remote_runnable.astream({\"input\": \"hi!\"}):\n",
" print(chunk)"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RunLogPatch({'op': 'replace',\n",
" 'path': '',\n",
" 'value': {'final_output': None,\n",
" 'id': '9f415b49-ba69-4fdf-9b9c-5ccc1805487f',\n",
" 'logs': {},\n",
" 'streamed_output': []}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '95a0ba72-9511-4fff-8b8c-410e7108ee60',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableSequence',\n",
" 'start_time': '2024-01-06T03:12:42.213+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'a0afa5a6-a408-4a2d-83f8-8e4c8193f963',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableParallel<input,agent_scratchpad>',\n",
" 'start_time': '2024-01-06T03:12:42.214+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:1'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '2aed7d13-2d0b-4c37-a4b3-d3f266bbf7e6',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-06T03:12:42.215+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:input'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '9328b5cf-fd7b-48fe-affb-2973643189e9',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-06T03:12:42.215+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:agent_scratchpad'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>/final_output',\n",
" 'value': {'output': 'what does eugene think about cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>/end_time',\n",
" 'value': '2024-01-06T03:12:42.217+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:2/final_output',\n",
" 'value': {'output': []}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:2/end_time',\n",
" 'value': '2024-01-06T03:12:42.217+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>/final_output',\n",
" 'value': {'agent_scratchpad': [],\n",
" 'input': 'what does eugene think about cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>/end_time',\n",
" 'value': '2024-01-06T03:12:42.218+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'a08bec71-bf7f-46c5-b082-14f7bff421cd',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatPromptTemplate',\n",
" 'start_time': '2024-01-06T03:12:42.219+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:2'],\n",
" 'type': 'prompt'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate/final_output',\n",
" 'value': {'messages': [SystemMessage(content='You are a helpful assistant.'),\n",
" HumanMessage(content='what does eugene think about cats?')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate/end_time',\n",
" 'value': '2024-01-06T03:12:42.219+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'bf859261-467b-44b3-84fb-80d8c9e9dff2',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'LLM',\n",
" 'start_time': '2024-01-06T03:12:42.221+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': ''}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '{\\n'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' '}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'query'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\":'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'cats'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\"\\n'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '}'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(generation_info={'finish_reason': 'function_call'}, message=AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/end_time',\n",
" 'value': '2024-01-06T03:12:42.806+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'd635ccbb-1db3-4515-b1ca-0c14752d361a',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'OpenAIFunctionsAgentOutputParser',\n",
" 'start_time': '2024-01-06T03:12:42.807+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:4'],\n",
" 'type': 'parser'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser/final_output',\n",
" 'value': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])},\n",
" {'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser/end_time',\n",
" 'value': '2024-01-06T03:12:42.809+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence/final_output',\n",
" 'value': {'output': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableSequence/end_time',\n",
" 'value': '2024-01-06T03:12:42.809+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}},\n",
" {'op': 'replace',\n",
" 'path': '/final_output',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '5eecdbe8-3374-4f0e-8ae8-d8a7e2394ae1',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'get_eugene_thoughts',\n",
" 'start_time': '2024-01-06T03:12:42.810+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'tool'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts/final_output',\n",
" 'value': {'output': \"[Document(page_content='cats like fish'), \"\n",
" \"Document(page_content='dogs like sticks')]\"}},\n",
" {'op': 'add',\n",
" 'path': '/logs/get_eugene_thoughts/end_time',\n",
" 'value': '2024-01-06T03:12:43.095+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')],\n",
" 'steps': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/steps',\n",
" 'value': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/1',\n",
" 'value': FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '89bf8195-df48-4fde-81b0-9e1982051caa',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableSequence',\n",
" 'start_time': '2024-01-06T03:12:43.097+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': [],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '567c178a-4897-4865-af27-7122432df7bd',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'RunnableParallel<input,agent_scratchpad>',\n",
" 'start_time': '2024-01-06T03:12:43.098+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:1'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:3',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '03530072-e5b2-4d7e-b875-f77e3d47481b',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-06T03:12:43.099+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:input'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:4',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': 'c554e615-1b70-4dc1-a4aa-aa09ccdacb09',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': '<lambda>',\n",
" 'start_time': '2024-01-06T03:12:43.099+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['map:key:agent_scratchpad'],\n",
" 'type': 'chain'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:3/final_output',\n",
" 'value': {'output': 'what does eugene think about cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:3/end_time',\n",
" 'value': '2024-01-06T03:12:43.100+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/<lambda>:4/final_output',\n",
" 'value': {'output': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/<lambda>:4/end_time',\n",
" 'value': '2024-01-06T03:12:43.100+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2/final_output',\n",
" 'value': {'agent_scratchpad': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')],\n",
" 'input': 'what does eugene think about cats?'}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableParallel<input,agent_scratchpad>:2/end_time',\n",
" 'value': '2024-01-06T03:12:43.101+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '724c5bf8-d475-45ec-a69a-a4f188dc405f',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'ChatPromptTemplate',\n",
" 'start_time': '2024-01-06T03:12:43.101+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:2'],\n",
" 'type': 'prompt'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2/final_output',\n",
" 'value': {'messages': [SystemMessage(content='You are a helpful assistant.'),\n",
" HumanMessage(content='what does eugene think about cats?'),\n",
" AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}),\n",
" FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')]}},\n",
" {'op': 'add',\n",
" 'path': '/logs/ChatPromptTemplate:2/end_time',\n",
" 'value': '2024-01-06T03:12:43.102+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '4542ae99-f854-41be-9669-41d8cd7dfb24',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'LLM',\n",
" 'start_time': '2024-01-06T03:12:43.103+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'E'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='E')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'ug'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ug')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'ene'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ene')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' thinks'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' thinks')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' that'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' that')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' cats'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' cats')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' like'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' like')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' fish'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' fish')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': '.'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='.')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM:2/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(text='Eugene thinks that cats like fish.', generation_info={'finish_reason': 'stop'}, message=AIMessage(content='Eugene thinks that cats like fish.'))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/end_time',\n",
" 'value': '2024-01-06T03:12:43.776+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '281c8ae8-dbc6-433f-86c8-20b86b3c8eee',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'OpenAIFunctionsAgentOutputParser',\n",
" 'start_time': '2024-01-06T03:12:43.776+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:4'],\n",
" 'type': 'parser'}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2/final_output',\n",
" 'value': AgentFinish(return_values={'output': 'Eugene thinks that cats like fish.'}, log='Eugene thinks that cats like fish.')},\n",
" {'op': 'add',\n",
" 'path': '/logs/OpenAIFunctionsAgentOutputParser:2/end_time',\n",
" 'value': '2024-01-06T03:12:43.777+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2/final_output',\n",
" 'value': {'output': AgentFinish(return_values={'output': 'Eugene thinks that cats like fish.'}, log='Eugene thinks that cats like fish.')}},\n",
" {'op': 'add',\n",
" 'path': '/logs/RunnableSequence:2/end_time',\n",
" 'value': '2024-01-06T03:12:43.778+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [AIMessage(content='Eugene thinks that cats like fish.')],\n",
" 'output': 'Eugene thinks that cats like fish.'}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/output',\n",
" 'value': 'Eugene thinks that cats like fish.'},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/2',\n",
" 'value': AIMessage(content='Eugene thinks that cats like fish.')})\n"
]
}
],
"source": [
"async for chunk in remote_runnable.astream_log({\"input\": \"what does eugene think about cats?\"}):\n",
" print(chunk)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"RunLogPatch({'op': 'replace',\n",
" 'path': '',\n",
" 'value': {'final_output': None,\n",
" 'id': '51c65021-1b40-4a45-81b3-95fc5c5b545a',\n",
" 'logs': {},\n",
" 'streamed_output': []}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '7a34b2a3-d6c0-4a0b-9939-2bde70a98958',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'LLM',\n",
" 'start_time': '2024-01-06T03:12:43.812+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': ''}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '{\\n'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' '}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'query'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\":'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': ' \"'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': 'cats'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '\"\\n'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='', additional_kwargs={'function_call': {'arguments': '}'}})})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(generation_info={'finish_reason': 'function_call'}, message=AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}}))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM/end_time',\n",
" 'value': '2024-01-06T03:12:44.588+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}},\n",
" {'op': 'replace',\n",
" 'path': '/final_output',\n",
" 'value': {'actions': [AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})])],\n",
" 'messages': [AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]}})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')],\n",
" 'steps': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/steps',\n",
" 'value': [{'action': AgentActionMessageLog(tool='get_eugene_thoughts', tool_input={'query': 'cats'}, log=\"\\nInvoking: `get_eugene_thoughts` with `{'query': 'cats'}`\\n\\n\\n\", message_log=[AIMessage(content='', additional_kwargs={'function_call': {'name': 'get_eugene_thoughts', 'arguments': '{\\n \"query\": \"cats\"\\n}'}})]),\n",
" 'observation': [Document(page_content='cats like fish'),\n",
" Document(page_content='dogs like sticks')]}]},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/1',\n",
" 'value': FunctionMessage(content=\"[Document(page_content='cats like fish'), Document(page_content='dogs like sticks')]\", name='get_eugene_thoughts')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM:2',\n",
" 'value': {'end_time': None,\n",
" 'final_output': None,\n",
" 'id': '8ff3b248-fb7e-4305-bd57-54e21a85bacb',\n",
" 'metadata': {'__langserve_endpoint': 'stream_log',\n",
" '__langserve_version': '0.0.37',\n",
" '__useragent': 'python-httpx/0.25.2'},\n",
" 'name': 'LLM',\n",
" 'start_time': '2024-01-06T03:12:44.756+00:00',\n",
" 'streamed_output': [],\n",
" 'streamed_output_str': [],\n",
" 'tags': ['seq:step:3'],\n",
" 'type': 'llm'}})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'E'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='E')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'ug'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ug')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': 'ene'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='ene')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' thinks'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' thinks')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' that'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' that')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' cats'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' cats')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' like'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' like')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ' fish'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content=' fish')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': '.'},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='.')})\n",
"RunLogPatch({'op': 'add', 'path': '/logs/LLM:2/streamed_output_str/-', 'value': ''},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/streamed_output/-',\n",
" 'value': AIMessageChunk(content='')})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/logs/LLM:2/final_output',\n",
" 'value': LLMResult(generations=[[ChatGeneration(text='Eugene thinks that cats like fish.', generation_info={'finish_reason': 'stop'}, message=AIMessage(content='Eugene thinks that cats like fish.'))]], llm_output=None, run=None)},\n",
" {'op': 'add',\n",
" 'path': '/logs/LLM:2/end_time',\n",
" 'value': '2024-01-06T03:12:45.171+00:00'})\n",
"RunLogPatch({'op': 'add',\n",
" 'path': '/streamed_output/-',\n",
" 'value': {'messages': [AIMessage(content='Eugene thinks that cats like fish.')],\n",
" 'output': 'Eugene thinks that cats like fish.'}},\n",
" {'op': 'add',\n",
" 'path': '/final_output/output',\n",
" 'value': 'Eugene thinks that cats like fish.'},\n",
" {'op': 'add',\n",
" 'path': '/final_output/messages/2',\n",
" 'value': AIMessage(content='Eugene thinks that cats like fish.')})\n"
]
}
],
"source": [
"async for chunk in remote_runnable.astream_log({\"input\": \"what does eugene think about cats?\"}, include_names=[\"LLM\"]):\n",
" print(chunk)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+155
View File
@@ -0,0 +1,155 @@
#!/usr/bin/env python
"""An example that shows how to create a custom agent executor like Runnable.
At the time of writing, there is a bug in the current AgentExecutor that
prevents it from correctly propagating configuration of the underlying
runnable. While that bug should be fixed, this is an example shows
how to create a more complex custom runnable.
Please see documentation for custom agent streaming here:
https://python.langchain.com/docs/modules/agents/how_to/streaming#stream-tokens
**ATTENTION**
To support streaming individual tokens you will need to manually set the streaming=True
on the LLM and use the stream_log endpoint rather than stream endpoint.
"""
from typing import Any, AsyncIterator, Dict, List, Optional, cast
from fastapi import FastAPI
from langchain.agents import AgentExecutor
from langchain.agents.format_scratchpad import format_to_openai_functions
from langchain.agents.output_parsers import OpenAIFunctionsAgentOutputParser
from langchain_community.vectorstores import FAISS
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from langchain_core.runnables import (
ConfigurableField,
ConfigurableFieldSpec,
Runnable,
RunnableConfig,
)
from langchain_core.runnables.utils import Input, Output
from langchain_core.tools import tool
from langchain_core.utils.function_calling import format_tool_to_openai_function
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
from pydantic import BaseModel
from langserve import add_routes
vectorstore = FAISS.from_texts(
["cats like fish", "dogs like sticks"], embedding=OpenAIEmbeddings()
)
retriever = vectorstore.as_retriever()
@tool
def get_eugene_thoughts(query: str) -> list:
"""Returns Eugene's thoughts on a topic."""
return retriever.get_relevant_documents(query)
tools = [get_eugene_thoughts]
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assistant."),
("user", "{input}"),
MessagesPlaceholder(variable_name="agent_scratchpad"),
]
)
# We need to set streaming=True on the LLM to support streaming individual tokens.
# when using the stream_log endpoint.
# .stream for agents streams action observation pairs not individual tokens.
llm = ChatOpenAI(temperature=0, streaming=True).configurable_fields(
temperature=ConfigurableField(
id="llm_temperature",
name="LLM Temperature",
description="The temperature of the LLM",
)
)
llm_with_tools = llm.bind(
functions=[format_tool_to_openai_function(t) for t in tools]
).with_config({"run_name": "LLM"})
class CustomAgentExecutor(Runnable):
"""A custom runnable that will be used by the agent executor."""
def __init__(self, **kwargs):
"""Initialize the runnable."""
super().__init__(**kwargs)
self.agent = (
{
"input": lambda x: x["input"],
"agent_scratchpad": lambda x: format_to_openai_functions(
x["intermediate_steps"]
),
}
| prompt
| llm_with_tools
| OpenAIFunctionsAgentOutputParser()
)
def invoke(self, input: Input, config: Optional[RunnableConfig] = None) -> Output:
"""Will not be used."""
raise NotImplementedError()
@property
def config_specs(self) -> List[ConfigurableFieldSpec]:
return self.agent.config_specs
async def astream(
self,
input: Input,
config: Optional[RunnableConfig] = None,
**kwargs: Optional[Any],
) -> AsyncIterator[Output]:
"""Stream the agent's output."""
configurable = cast(Dict[str, Any], config.pop("configurable", {}))
if configurable:
configured_agent = self.agent.with_config(
{
"configurable": configurable,
}
)
else:
configured_agent = self.agent
executor = AgentExecutor(
agent=configured_agent,
tools=tools,
).with_config({"run_name": "executor"})
async for output in executor.astream(input, config=config, **kwargs):
yield output
app = FastAPI()
# We need to add these input/output schemas because the current AgentExecutor
# is lacking in schemas.
class Input(BaseModel):
input: str
class Output(BaseModel):
output: Any
runnable = CustomAgentExecutor()
# Add routes to the app for using the custom agent executor.
add_routes(
app,
runnable.with_types(input_type=Input, output_type=Output),
disabled_endpoints=["invoke", "batch"], # not implemented
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+9 -53
View File
@@ -23,14 +23,7 @@
"tags": []
},
"outputs": [],
"source": [
"import requests\n",
"\n",
"inputs = {\"input\": {\"topic\": \"sports\"}}\n",
"response = requests.post(\"http://localhost:8000/configurable_temp/invoke\", json=inputs)\n",
"\n",
"response.json()"
]
"source": ["import requests\n\ninputs = {\"input\": {\"topic\": \"sports\"}}\nresponse = requests.post(\"http://localhost:8000/configurable_temp/invoke\", json=inputs)\n\nresponse.json()"]
},
{
"cell_type": "markdown",
@@ -46,11 +39,7 @@
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"remote_runnable = RemoteRunnable(\"http://localhost:8000/configurable_temp\")"
]
"source": ["from langserve import RemoteRunnable\n\nremote_runnable = RemoteRunnable(\"http://localhost:8000/configurable_temp\")"]
},
{
"cell_type": "markdown",
@@ -66,9 +55,7 @@
"tags": []
},
"outputs": [],
"source": [
"response = await remote_runnable.ainvoke({\"topic\": \"sports\"})"
]
"source": ["response = await remote_runnable.ainvoke({\"topic\": \"sports\"})"]
},
{
"cell_type": "markdown",
@@ -84,11 +71,7 @@
"tags": []
},
"outputs": [],
"source": [
"from langchain.schema.runnable.config import RunnableConfig\n",
"\n",
"remote_runnable.batch([{\"topic\": \"sports\"}, {\"topic\": \"cars\"}])"
]
"source": ["from langchain_core.runnables import RunnableConfig\n\nremote_runnable.batch([{\"topic\": \"sports\"}, {\"topic\": \"cars\"}])"]
},
{
"cell_type": "markdown",
@@ -104,10 +87,7 @@
"tags": []
},
"outputs": [],
"source": [
"async for chunk in remote_runnable.astream({\"topic\": \"bears, but a bit verbose\"}):\n",
" print(chunk, end=\"\", flush=True)"
]
"source": ["async for chunk in remote_runnable.astream({\"topic\": \"bears, but a bit verbose\"}):\n print(chunk, end=\"\", flush=True)"]
},
{
"cell_type": "markdown",
@@ -157,14 +137,7 @@
"tags": []
},
"outputs": [],
"source": [
"await remote_runnable.ainvoke(\n",
" {\"topic\": \"sports\"},\n",
" config={\n",
" \"configurable\": {\"prompt\": \"how to say {topic} in french\", \"llm\": \"low_temp\"}\n",
" },\n",
")"
]
"source": ["await remote_runnable.ainvoke(\n {\"topic\": \"sports\"},\n config={\n \"configurable\": {\"prompt\": \"how to say {topic} in french\", \"llm\": \"low_temp\"}\n },\n)"]
},
{
"cell_type": "markdown",
@@ -221,13 +194,7 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The model will fail with an auth error\n",
"unauthenticated_response = requests.post(\n",
" \"http://localhost:8000/auth_from_header/invoke\", json={\"input\": \"hello\"}\n",
")\n",
"unauthenticated_response.json()"
]
"source": ["# The model will fail with an auth error\nunauthenticated_response = requests.post(\n \"http://localhost:8000/auth_from_header/invoke\", json={\"input\": \"hello\"}\n)\nunauthenticated_response.json()"]
},
{
"cell_type": "markdown",
@@ -244,25 +211,14 @@
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"# The model will succeed as long as the above shell script is run previously\n",
"import os\n",
"\n",
"test_key = os.environ[\"TEST_API_KEY\"]\n",
"authenticated_response = requests.post(\n",
" \"http://localhost:8000/auth_from_header/invoke\",\n",
" json={\"input\": \"hello\"},\n",
" headers={\"x-api-key\": test_key},\n",
")\n",
"authenticated_response.json()"
]
"source": ["# The model will succeed as long as the above shell script is run previously\nimport os\n\ntest_key = os.environ[\"TEST_API_KEY\"]\nauthenticated_response = requests.post(\n \"http://localhost:8000/auth_from_header/invoke\",\n json={\"input\": \"hello\"},\n headers={\"x-api-key\": test_key},\n)\nauthenticated_response.json()"]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": []
"source": [""]
}
],
"metadata": {
+4 -4
View File
@@ -10,10 +10,10 @@ from typing import Any, Dict
from fastapi import FastAPI, HTTPException, Request
from fastapi.middleware.cors import CORSMiddleware
from langchain.chat_models import ChatOpenAI
from langchain.prompts import PromptTemplate
from langchain.schema.output_parser import StrOutputParser
from langchain.schema.runnable import ConfigurableField
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import PromptTemplate
from langchain_core.runnables import ConfigurableField
from langchain_openai import ChatOpenAI
from langserve import add_routes
+9 -8
View File
@@ -3,20 +3,21 @@
from typing import Any, Iterable, List, Optional, Type
from fastapi import FastAPI
from langchain.embeddings import OpenAIEmbeddings
from langchain.schema import Document
from langchain.schema.embeddings import Embeddings
from langchain.schema.retriever import BaseRetriever
from langchain.schema.runnable import (
from langchain.schema.vectorstore import VST
from langchain_community.vectorstores import FAISS
from langchain_core.documents import Document
from langchain_core.embeddings import Embeddings
from langchain_core.retrievers import BaseRetriever
from langchain_core.runnables import (
ConfigurableFieldSingleOption,
RunnableConfig,
RunnableSerializable,
)
from langchain.schema.vectorstore import VST
from langchain.vectorstores import FAISS, VectorStore
from langchain_core.vectorstores import VectorStore
from langchain_openai import OpenAIEmbeddings
from pydantic import BaseModel, Field
from langserve import add_routes
from langserve.pydantic_v1 import BaseModel, Field
vectorstore1 = FAISS.from_texts(
["cats like fish", "dogs like sticks"], embedding=OpenAIEmbeddings()
@@ -13,17 +13,14 @@ from operator import itemgetter
from typing import List, Tuple
from fastapi import FastAPI
from langchain.chat_models import ChatOpenAI
from langchain.embeddings import OpenAIEmbeddings
from langchain.prompts import ChatPromptTemplate
from langchain.prompts.prompt import PromptTemplate
from langchain.schema import format_document
from langchain.schema.output_parser import StrOutputParser
from langchain.schema.runnable import RunnableMap, RunnablePassthrough
from langchain.vectorstores import FAISS
from langchain_community.vectorstores import FAISS
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate, PromptTemplate, format_document
from langchain_core.runnables import RunnableMap, RunnablePassthrough
from langchain_openai import ChatOpenAI, OpenAIEmbeddings
from pydantic import BaseModel, Field
from langserve import add_routes
from langserve.pydantic_v1 import BaseModel, Field
_TEMPLATE = """Given the following conversation and a follow up question, rephrase the
follow up question to be a standalone question, in its original language.
+4 -4
View File
@@ -15,10 +15,10 @@ allowing one to upload a binary file using the langserve playground UI.
import base64
from fastapi import FastAPI
from langchain.document_loaders.blob_loaders import Blob
from langchain.document_loaders.parsers.pdf import PDFMinerParser
from langchain.pydantic_v1 import Field
from langchain.schema.runnable import RunnableLambda
from langchain_community.document_loaders.parsers.pdf import PDFMinerParser
from langchain_core.document_loaders import Blob
from langchain_core.runnables import RunnableLambda
from pydantic import Field
from langserve import CustomUserType, add_routes
+13 -81
View File
@@ -16,9 +16,7 @@
"tags": []
},
"outputs": [],
"source": [
"from langchain.prompts.chat import ChatPromptTemplate"
]
"source": ["from langchain_core.prompts import ChatPromptTemplate"]
},
{
"cell_type": "code",
@@ -27,12 +25,7 @@
"tags": []
},
"outputs": [],
"source": [
"from langserve import RemoteRunnable\n",
"\n",
"openai_llm = RemoteRunnable(\"http://localhost:8000/openai/\")\n",
"anthropic = RemoteRunnable(\"http://localhost:8000/anthropic/\")"
]
"source": ["from langserve import RemoteRunnable\n\nopenai_llm = RemoteRunnable(\"http://localhost:8000/openai/\")\nanthropic = RemoteRunnable(\"http://localhost:8000/anthropic/\")"]
},
{
"cell_type": "markdown",
@@ -48,18 +41,7 @@
"tags": []
},
"outputs": [],
"source": [
"prompt = ChatPromptTemplate.from_messages(\n",
" [\n",
" (\n",
" \"system\",\n",
" \"You are a highly educated person who loves to use big words. \"\n",
" + \"You are also concise. Never answer in more than three sentences.\",\n",
" ),\n",
" (\"human\", \"Tell me about your favorite novel\"),\n",
" ]\n",
").format_messages()"
]
"source": ["prompt = ChatPromptTemplate.from_messages(\n [\n (\n \"system\",\n \"You are a highly educated person who loves to use big words. \"\n + \"You are also concise. Never answer in more than three sentences.\",\n ),\n (\"human\", \"Tell me about your favorite novel\"),\n ]\n).format_messages()"]
},
{
"cell_type": "markdown",
@@ -86,9 +68,7 @@
"output_type": "execute_result"
}
],
"source": [
"anthropic.invoke(prompt)"
]
"source": ["anthropic.invoke(prompt)"]
},
{
"cell_type": "code",
@@ -97,9 +77,7 @@
"tags": []
},
"outputs": [],
"source": [
"openai_llm.invoke(prompt)"
]
"source": ["openai_llm.invoke(prompt)"]
},
{
"cell_type": "markdown",
@@ -126,9 +104,7 @@
"output_type": "execute_result"
}
],
"source": [
"await openai_llm.ainvoke(prompt)"
]
"source": ["await openai_llm.ainvoke(prompt)"]
},
{
"cell_type": "code",
@@ -149,9 +125,7 @@
"output_type": "execute_result"
}
],
"source": [
"anthropic.batch([prompt, prompt])"
]
"source": ["anthropic.batch([prompt, prompt])"]
},
{
"cell_type": "code",
@@ -172,9 +146,7 @@
"output_type": "execute_result"
}
],
"source": [
"await anthropic.abatch([prompt, prompt])"
]
"source": ["await anthropic.abatch([prompt, prompt])"]
},
{
"cell_type": "markdown",
@@ -198,10 +170,7 @@
]
}
],
"source": [
"for chunk in anthropic.stream(prompt):\n",
" print(chunk.content, end=\"\", flush=True)"
]
"source": ["for chunk in anthropic.stream(prompt):\n print(chunk.content, end=\"\", flush=True)"]
},
{
"cell_type": "code",
@@ -218,19 +187,14 @@
]
}
],
"source": [
"async for chunk in anthropic.astream(prompt):\n",
" print(chunk.content, end=\"\", flush=True)"
]
"source": ["async for chunk in anthropic.astream(prompt):\n print(chunk.content, end=\"\", flush=True)"]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {},
"outputs": [],
"source": [
"from langchain.schema.runnable import RunnablePassthrough"
]
"source": ["from langchain_core.runnables import RunnablePassthrough"]
},
{
"cell_type": "code",
@@ -239,37 +203,7 @@
"tags": []
},
"outputs": [],
"source": [
"comedian_chain = (\n",
" ChatPromptTemplate.from_messages(\n",
" [\n",
" (\n",
" \"system\",\n",
" \"You are a comedian that sometimes tells funny jokes and other times you just state facts that are not funny. Please either tell a joke or state fact now but only output one.\",\n",
" ),\n",
" ]\n",
" )\n",
" | openai_llm\n",
")\n",
"\n",
"joke_classifier_chain = (\n",
" ChatPromptTemplate.from_messages(\n",
" [\n",
" (\n",
" \"system\",\n",
" \"Please determine if the joke is funny. Say `funny` if it's funny and `not funny` if not funny. Then repeat the first five words of the joke for reference...\",\n",
" ),\n",
" (\"human\", \"{joke}\"),\n",
" ]\n",
" )\n",
" | anthropic\n",
")\n",
"\n",
"\n",
"chain = {\"joke\": comedian_chain} | RunnablePassthrough.assign(\n",
" classification=joke_classifier_chain\n",
")"
]
"source": ["comedian_chain = (\n ChatPromptTemplate.from_messages(\n [\n (\n \"system\",\n \"You are a comedian that sometimes tells funny jokes and other times you just state facts that are not funny. Please either tell a joke or state fact now but only output one.\",\n ),\n ]\n )\n | openai_llm\n)\n\njoke_classifier_chain = (\n ChatPromptTemplate.from_messages(\n [\n (\n \"system\",\n \"Please determine if the joke is funny. Say `funny` if it's funny and `not funny` if not funny. Then repeat the first five words of the joke for reference...\",\n ),\n (\"human\", \"{joke}\"),\n ]\n )\n | anthropic\n)\n\n\nchain = {\"joke\": comedian_chain} | RunnablePassthrough.assign(\n classification=joke_classifier_chain\n)"]
},
{
"cell_type": "code",
@@ -290,9 +224,7 @@
"output_type": "execute_result"
}
],
"source": [
"chain.invoke({})"
]
"source": ["chain.invoke({})"]
}
],
"metadata": {
+4 -3
View File
@@ -2,7 +2,8 @@
"""Example LangChain server exposes multiple runnables (LLMs in this case)."""
from fastapi import FastAPI
from langchain.chat_models import ChatAnthropic, ChatOpenAI
from langchain_anthropic import ChatAnthropic
from langchain_openai import ChatOpenAI
from langserve import add_routes
@@ -14,12 +15,12 @@ app = FastAPI(
add_routes(
app,
ChatOpenAI(),
ChatOpenAI(model="gpt-3.5-turbo-0125"),
path="/openai",
)
add_routes(
app,
ChatAnthropic(),
ChatAnthropic(model="claude-3-haiku-20240307"),
path="/anthropic",
)
+266
View File
@@ -0,0 +1,266 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Local LLM\n",
"\n",
"Here, we'll use a server that's serving a local LLM.\n",
"\n",
"**Attention** This is OK for prototyping / dev usage, but should not be used for production cases when there might be concurrent requests from different users. As of the time of writing, Ollama is designed for single user and cannot handle concurrent requests see this issue: https://github.com/ollama/ollama/issues/358"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["from langchain_core.prompts import ChatPromptTemplate"]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["from langserve import RemoteRunnable\n\nmodel = RemoteRunnable(\"http://localhost:8000/ollama/\")"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's test out the standard interface of a chat model."
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["prompt = \"Tell me a 3 sentence story about a cat.\""]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=\"\\nSure! Here is a three sentence story about a cat:\\n\\nMittens the cat purred contentedly on the windowsill, basking in the warm sunlight. Suddenly, a bird perched nearby and Mittens' ears perked up, ready to pounce. With lightning quick reflexes, Mittens leapt into the air, but the bird had flown away, leaving Mittens to settle for just lounging in the sun once again.\")"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["model.invoke(prompt)"]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"AIMessage(content=\"\\nSure! Here is a three sentence story about a cat:\\n\\nMittens the cat purred contentedly on the windowsill, basking in the warm sunlight. Suddenly, a bird flew by, catching Mittens' attention and causing her to leap into action. With lightning quick reflexes, Mittens pounced on the bird, but it flew away just in time, leaving Mittens frustrated but still purring happily.\")"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["await model.ainvoke(prompt)"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Batched API works, but b/c ollama does not support parallelism, it's no faster than using .invoke twice."
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 7.65 ms, sys: 6.57 ms, total: 14.2 ms\n",
"Wall time: 5.51 s\n"
]
},
{
"data": {
"text/plain": [
"[AIMessage(content='\\nSure! Here is a three sentence story about a cat:\\n\\nMr. Whiskers was a sleek black cat with bright green eyes. He spent his days lounging in the sunbeams that streamed through the living room window, chasing the occasional fly, and purring contentedly. Despite his lazy demeanor, Mr. Whiskers was always on the lookout for a warm lap to curl up in.'),\n",
" AIMessage(content='\\nSure! Here is a three sentence story about a cat:\\n\\nMittens the cat purred contentedly on the windowsill, basking in the warm sunlight that streamed through the glass. Suddenly, a tiny bird perched on the ledge outside, tweeting nervously as it eyed the cat with suspicion. Without hesitation, Mittens pounced, snatching the bird in mid-air and devouring it in one quick motion.')]"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["%%time\nmodel.batch([prompt, prompt])"]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"CPU times: user 9.72 ms, sys: 7.59 ms, total: 17.3 ms\n",
"Wall time: 5.56 s\n"
]
}
],
"source": ["%%time\nfor _ in range(2):\n model.invoke(prompt)"]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"[AIMessage(content=\"\\nSure, here's a three sentence story about a cat:\\n\\nMittens the cat purred contentedly on the windowsill, basking in the warm sunlight that streamed through the glass. Her bright green eyes sparkled as she watched a bird flit and flutter outside, wishing she could join it in its flight. Just then, her owner entered the room with a bowl of creamy milk, causing Mittens to jump down from the windowsill and rub against their legs in excitement.\"),\n",
" AIMessage(content='\\nSure! Here is a three sentence story about a cat:\\n\\nMittens the cat purred contentedly on my lap, her soft fur a soothing balm for my frazzled nerves. As I stroked her back, she gazed up at me with big, round eyes, purring even louder. It was hard to resist the charm of this little ball of fluff, and I found myself smiling and scratching behind her ears.')]"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["await model.abatch([prompt, prompt])"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Streaming is available by default"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"|S|ure|,| here| is| a| |3| sentence| story| about| a| cat|:|\n",
"|\n",
"|M|itt|ens| the| cat| pur|red| content|edly| on| the| windows|ill|,| her| tail| tw|itch|ing| as| she| watched| the| birds| outside|.| Sud|den|ly|,| a| squ|ir|rel| sc|am|per|ed| by| and| Mitt|ens| was| on| high| alert|,| her| ears| per|ked| up| and| ready| to| p|ounce|.| With| light|ning| quick| ref|lex|es|,| Mitt|ens| jump|ed| from| the| windows|ill| and| ch|ased| after| the| squ|ir|rel|,| her| tail| streaming| behind| her|.||"
]
}
],
"source": ["for chunk in model.stream(prompt):\n print(chunk.content, end=\"|\", flush=True)"]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"\n",
"|The| cat| pur|red| content|edly| on| my| lap|,| its| soft| fur| a| so|othing| bal|m| for| my| fra|zz|led| n|erves|.| As| I| st|rok|ed| its| back|,| it| gaz|ed| up| at| me| with| soul|ful| eyes|,| p|urr|ing| loud|ly| in| appro|val|.| In| that| moment|,| all| was| right| with| the| world|.||"
]
}
],
"source": ["async for chunk in model.astream(prompt):\n print(chunk.content, end=\"|\", flush=True)"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"And so is the event stream API"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'event': 'on_chat_model_start', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'name': '/ollama', 'tags': [], 'metadata': {}, 'data': {'input': 'Tell me a 3 sentence story about a cat.'}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content='\\n')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content='S')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content='ure')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=',')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' here')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' is')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' a')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' ')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content='3')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' sentence')}}\n",
"{'event': 'on_chat_model_stream', 'run_id': '6c2bdfc1-d482-4861-886c-c737a50771c3', 'tags': [], 'metadata': {}, 'name': '/ollama', 'data': {'chunk': AIMessageChunk(content=' story')}}\n",
"...\n"
]
}
],
"source": ["i = 0\nasync for event in model.astream_events(prompt, version='v1'):\n print(event)\n if i > 10:\n print('...')\n break\n i += 1"]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.11.7"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+38
View File
@@ -0,0 +1,38 @@
#!/usr/bin/env python
"""Example LangChain Server that runs a local llm.
**Attention** This is OK for prototyping / dev usage, but should not be used
for production cases when there might be concurrent requests from different
users. As of the time of writing, Ollama is designed for single user and cannot
handle concurrent requests see this issue:
https://github.com/ollama/ollama/issues/358
When deploying local models, make sure you understand whether the model is able
to handle concurrent requests or not. If concurrent requests are not handled
properly, the server will either crash or will just not be able to handle more
than one user at a time.
"""
from fastapi import FastAPI
from langchain_community.chat_models import ChatOllama
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
llm = ChatOllama(model="llama2")
add_routes(
app,
llm,
path="/ollama",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -0,0 +1,35 @@
"""Client server that interacts with the main server via a remote runnable.
This server sets up a simple proxy to the main server. It uses the RemoteRunnable
to interact with the main server. The main server is expected to be running at
http://localhost:8123.
A client server will likely end up doing something more clever rather than
just being a proxy.
"""
from fastapi import FastAPI
from langserve import RemoteRunnable, add_routes
app = FastAPI()
MAIN_SERVER_URL = (
"http://localhost:8123/chat_model/" # <-- URL of the RUNNABLE on the main server
)
# Type inference is not automatic for remote runnables at the moment,
# so you must specify which types are used for the playground to work.
remote_runnable = RemoteRunnable(MAIN_SERVER_URL).with_types(input_type=str)
# Let's add an example chain
add_routes(
app,
remote_runnable,
path="/proxied",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app)
+20
View File
@@ -0,0 +1,20 @@
"""Main server that exposes one or more chains as HTTP endpoints."""
from fastapi import FastAPI
from langchain_openai import ChatOpenAI
from langserve import add_routes
app = FastAPI()
# Let's add an example chain
add_routes(
app,
ChatOpenAI(),
path="/chat_model",
)
if __name__ == "__main__":
import uvicorn
# Running on port 8123
uvicorn.run(app, port=8123)
+131
View File
@@ -0,0 +1,131 @@
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Passthrough information\n",
"\n",
"An example that shows how to pass through additional info with the request, and get it back with the response."
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["from langchain_core.prompts import ChatPromptTemplate"]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["from langserve import RemoteRunnable\n\nchain = RemoteRunnable(\"http://localhost:8000/v1/\")"]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Let's create a prompt composed of a system message and a human message."
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'output': AIMessage(content='`apple` translates to `mela` in Italian.'),\n",
" 'info': {'info': {'user_id': 42, 'user_info': {'address': 42}}}}"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["chain.invoke({'thing': 'apple', 'language': 'italian', 'info': {\"user_id\": 42, \"user_info\": {\"address\": 42}}})"]
},
{
"cell_type": "code",
"execution_count": 11,
"metadata": {
"tags": []
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"{'info': {'info': {'user_id': 42, 'user_info': {'address': 42}}}}\n",
"{'output': AIMessageChunk(content='')}\n",
"{'output': AIMessageChunk(content='m')}\n",
"{'output': AIMessageChunk(content='ela')}\n",
"{'output': AIMessageChunk(content='')}\n"
]
}
],
"source": ["for chunk in chain.stream({'thing': 'apple', 'language': 'italian', 'info': {\"user_id\": 42, \"user_info\": {\"address\": 42}}}):\n print(chunk)"]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"tags": []
},
"outputs": [],
"source": ["from langserve import RemoteRunnable\n\nchain = RemoteRunnable(\"http://localhost:8000/v2/\")"]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"tags": []
},
"outputs": [
{
"data": {
"text/plain": [
"{'output': AIMessage(content='`apple` translates to `mela` in Italian.'),\n",
" 'info': {'user_id': 42, 'user_info': {'address': 42}}}"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": ["chain.invoke({'thing': 'apple', 'language': 'italian', 'info': {\"user_id\": 42, \"user_info\": {\"address\": 42}}})"]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.6"
}
},
"nbformat": 4,
"nbformat_minor": 4
}
+86
View File
@@ -0,0 +1,86 @@
#!/usr/bin/env python
"""Example LangChain server passes through some of the inputs in the response."""
from typing import Any, Callable, Dict, List, Optional, TypedDict
from fastapi import FastAPI
from langchain_core.prompts import ChatPromptTemplate
from langchain_core.runnables import RunnableParallel, RunnablePassthrough
from langchain_openai import ChatOpenAI
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
def _create_projection(
*, include_keys: Optional[List] = None, exclude_keys: Optional[List[str]] = None
) -> Callable[[dict], dict]:
"""Create a projection function."""
def _project_dict(
d: dict,
) -> dict:
"""Project dictionary."""
keys = d.keys()
if include_keys is not None:
keys = set(keys) & set(include_keys)
if exclude_keys is not None:
keys = set(keys) - set(exclude_keys)
return {k: d[k] for k in keys}
return _project_dict
prompt = ChatPromptTemplate.from_messages(
[("human", "translate `{thing}` to {language}")]
)
model = ChatOpenAI()
underlying_chain = prompt | model
wrapped_chain = RunnableParallel(
{
"output": _create_projection(exclude_keys=["info"]) | underlying_chain,
"info": _create_projection(include_keys=["info"]),
}
)
class Input(TypedDict):
thing: str
language: str
info: Dict[str, Any]
class Output(TypedDict):
output: underlying_chain.output_schema
info: Dict[str, Any]
add_routes(
app, wrapped_chain.with_types(input_type=Input, output_type=Output), path="/v1"
)
# Version 2
# Uses RunnablePassthrough.assign
wrapped_chain_2 = RunnablePassthrough.assign(output=underlying_chain) | {
"output": lambda x: x["output"],
"info": lambda x: x["info"],
}
add_routes(
app,
wrapped_chain_2.with_types(input_type=Input, output_type=Output),
path="/v2",
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+2 -2
View File
@@ -1,8 +1,8 @@
#!/usr/bin/env python
"""Example LangChain server exposes a retriever."""
from fastapi import FastAPI
from langchain.embeddings import OpenAIEmbeddings
from langchain.vectorstores import FAISS
from langchain_community.vectorstores import FAISS
from langchain_openai import OpenAIEmbeddings
from langserve import add_routes
+39
View File
@@ -0,0 +1,39 @@
#!/usr/bin/env python
"""Example LangChain Server that uses a Fast API Router.
When applications grow, it becomes useful to use FastAPI's Router to organize
the routes.
See more documentation at:
https://fastapi.tiangolo.com/tutorial/bigger-applications/
"""
from fastapi import APIRouter, FastAPI
from langchain_anthropic import ChatAnthropic
from langchain_openai import ChatOpenAI
from langserve import add_routes
app = FastAPI()
router = APIRouter(prefix="/models")
# Invocations to this router will appear in trace logs as /models/openai
add_routes(
router,
ChatOpenAI(model="gpt-3.5-turbo-0125"),
path="/openai",
)
# Invocations to this router will appear in trace logs as /models/anthropic
add_routes(
router,
ChatAnthropic(model="claude-3-haiku-20240307"),
path="/anthropic",
)
app.include_router(router)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
+64
View File
@@ -0,0 +1,64 @@
#!/usr/bin/env python
"""Example of a simple chatbot that just passes current conversation
state back and forth between server and client.
"""
from typing import List, Union
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from langchain_anthropic import ChatAnthropic
from langchain_core.messages import AIMessage, HumanMessage, SystemMessage
from langchain_core.output_parsers import StrOutputParser
from langchain_core.prompts import ChatPromptTemplate, MessagesPlaceholder
from pydantic import BaseModel, Field
from langserve import add_routes
app = FastAPI(
title="LangChain Server",
version="1.0",
description="Spin up a simple api server using Langchain's Runnable interfaces",
)
# Set all CORS enabled origins
app.add_middleware(
CORSMiddleware,
allow_origins=["*"],
allow_credentials=True,
allow_methods=["*"],
allow_headers=["*"],
expose_headers=["*"],
)
# Declare a chain
prompt = ChatPromptTemplate.from_messages(
[
("system", "You are a helpful assisstant named Cob."),
MessagesPlaceholder(variable_name="messages"),
]
)
chain = prompt | ChatAnthropic(model="claude-2.1") | StrOutputParser()
class InputChat(BaseModel):
"""Input for the chat endpoint."""
messages: List[Union[HumanMessage, AIMessage, SystemMessage]] = Field(
...,
description="The chat messages representing the current conversation.",
extra={"widget": {"type": "chat", "input": "messages"}},
)
add_routes(
app,
chain.with_types(input_type=InputChat),
)
if __name__ == "__main__":
import uvicorn
uvicorn.run(app, host="localhost", port=8000)
@@ -6,16 +6,19 @@ from typing import Any, Dict, List, Tuple
from fastapi import FastAPI
from fastapi.middleware.cors import CORSMiddleware
from langchain.document_loaders.blob_loaders import Blob
from langchain.document_loaders.parsers.pdf import PDFMinerParser
from langchain.pydantic_v1 import BaseModel, Field
from langchain.schema.messages import (
from langchain_community.document_loaders.parsers.pdf import PDFMinerParser
from langchain_core.document_loaders import Blob
from langchain_core.messages import (
AIMessage,
BaseMessage,
FunctionMessage,
HumanMessage,
)
from langchain.schema.runnable import RunnableLambda
from langchain_core.runnables import RunnableLambda, RunnableParallel
from langchain_openai import ChatOpenAI
from pydantic import BaseModel, Field
from langserve import CustomUserType
from langserve.server import add_routes
app = FastAPI(
@@ -35,8 +38,11 @@ app.add_middleware(
expose_headers=["*"],
)
# Example 1: Chat Widget
# This shows how to create a chat widget.
class ChatHistory(BaseModel):
class ChatHistory(CustomUserType):
chat_history: List[Tuple[str, str]] = Field(
...,
examples=[[("a", "aa")]],
@@ -45,6 +51,35 @@ class ChatHistory(BaseModel):
question: str
def _format_to_messages(input: ChatHistory) -> List[BaseMessage]:
"""Format the input to a list of messages."""
history = input.chat_history
user_input = input.question
messages = []
for human, ai in history:
messages.append(HumanMessage(content=human))
messages.append(AIMessage(content=ai))
messages.append(HumanMessage(content=user_input))
return messages
model = ChatOpenAI()
chat_model = RunnableParallel({"answer": (RunnableLambda(_format_to_messages) | model)})
add_routes(
app,
chat_model.with_types(input_type=ChatHistory),
config_keys=["configurable"],
path="/chat",
)
# Example 2: Chat Widget with History
# This one isn't hooked up toa model. It just shows that FunctionMessages can be used
# surfaced as well in the playground.
class ChatHistoryMessage(BaseModel):
chat_history: List[BaseMessage] = Field(
...,
@@ -53,19 +88,6 @@ class ChatHistoryMessage(BaseModel):
location: str
class FileProcessingRequest(BaseModel):
file: bytes = Field(..., extra={"widget": {"type": "base64file"}})
num_chars: int = 100
def chat_with_bot(input: Dict[str, Any]) -> Dict[str, Any]:
"""Bot that repeats the question twice."""
return {
"answer": input["question"] * 2,
"woof": "its so bad to woof, meow is better",
}
def chat_message_bot(input: Dict[str, Any]) -> List[BaseMessage]:
"""Bot that repeats the question twice."""
return [
@@ -83,6 +105,21 @@ def chat_message_bot(input: Dict[str, Any]) -> List[BaseMessage]:
]
add_routes(
app,
RunnableLambda(chat_message_bot).with_types(input_type=ChatHistoryMessage),
config_keys=["configurable"],
path="/chat_message",
)
# Example 3: File Processing Widget
class FileProcessingRequest(BaseModel):
file: bytes = Field(..., extra={"widget": {"type": "base64file"}})
num_chars: int = 100
def process_file(input: Dict[str, Any]) -> str:
"""Extract the text from the first page of the PDF."""
content = base64.decodebytes(input["file"])
@@ -92,13 +129,6 @@ def process_file(input: Dict[str, Any]) -> str:
return content[: input["num_chars"]]
add_routes(
app,
RunnableLambda(chat_with_bot).with_types(input_type=ChatHistory),
config_keys=["configurable"],
path="/chat",
)
add_routes(
app,
RunnableLambda(process_file).with_types(input_type=FileProcessingRequest),
@@ -106,14 +136,6 @@ add_routes(
path="/pdf",
)
add_routes(
app,
RunnableLambda(chat_message_bot).with_types(input_type=ChatHistoryMessage),
config_keys=["configurable"],
path="/chat_message",
)
if __name__ == "__main__":
import uvicorn
+8 -1
View File
@@ -4,9 +4,16 @@ This is the ONLY public interface into the package. All other modules are
to be considered private and subject to change without notice.
"""
from langserve.api_handler import APIHandler
from langserve.client import RemoteRunnable
from langserve.schema import CustomUserType
from langserve.server import add_routes
from langserve.version import __version__
__all__ = ["RemoteRunnable", "add_routes", "__version__", "CustomUserType"]
__all__ = [
"RemoteRunnable",
"APIHandler",
"add_routes",
"__version__",
"CustomUserType",
]
+53
View File
@@ -0,0 +1,53 @@
from typing import Any, Dict, Type, cast
from pydantic import BaseModel, ConfigDict, RootModel
from pydantic.json_schema import (
DEFAULT_REF_TEMPLATE,
GenerateJsonSchema,
JsonSchemaMode,
)
def _create_root_model(name: str, type_: Any) -> Type[RootModel]:
"""Create a base class."""
def schema(
cls: Type[BaseModel],
by_alias: bool = True,
ref_template: str = DEFAULT_REF_TEMPLATE,
) -> Dict[str, Any]:
# Complains about schema not being defined in superclass
schema_ = super(cls, cls).schema( # type: ignore[misc]
by_alias=by_alias, ref_template=ref_template
)
schema_["title"] = name
return schema_
def model_json_schema(
cls: Type[BaseModel],
by_alias: bool = True,
ref_template: str = DEFAULT_REF_TEMPLATE,
schema_generator: type[GenerateJsonSchema] = GenerateJsonSchema,
mode: JsonSchemaMode = "validation",
) -> Dict[str, Any]:
# Complains about model_json_schema not being defined in superclass
schema_ = super(cls, cls).model_json_schema( # type: ignore[misc]
by_alias=by_alias,
ref_template=ref_template,
schema_generator=schema_generator,
mode=mode,
)
schema_["title"] = name
return schema_
base_class_attributes = {
"__annotations__": {"root": type_},
"model_config": ConfigDict(arbitrary_types_allowed=True),
"schema": classmethod(schema),
"model_json_schema": classmethod(model_json_schema),
# Should replace __module__ with caller based on stack frame.
"__module__": "langserve._pydantic",
}
custom_root_type = type(name, (RootModel,), base_class_attributes)
return cast(Type[RootModel], custom_root_type)
+988 -306
View File
File diff suppressed because it is too large Load Diff
+27 -10
View File
@@ -4,13 +4,16 @@ import uuid
from typing import Any, Dict, List, Optional, Sequence
from uuid import UUID
from langchain.callbacks.base import AsyncCallbackHandler
from langchain.callbacks.manager import (
from langchain_core.agents import AgentAction, AgentFinish
from langchain_core.callbacks import AsyncCallbackHandler
from langchain_core.callbacks.manager import (
BaseRunManager,
ahandle_event,
handle_event,
)
from langchain.schema import AgentAction, AgentFinish, BaseMessage, Document, LLMResult
from langchain_core.documents import Document
from langchain_core.messages import BaseMessage
from langchain_core.outputs import LLMResult
from typing_extensions import TypedDict
@@ -45,7 +48,7 @@ class AsyncEventAggregatorCallback(AsyncCallbackHandler):
async def on_chat_model_start(
self,
serialized: Dict[str, Any],
serialized: Optional[Dict[str, Any]],
messages: List[List[BaseMessage]],
*,
run_id: UUID,
@@ -70,7 +73,7 @@ class AsyncEventAggregatorCallback(AsyncCallbackHandler):
async def on_chain_start(
self,
serialized: Dict[str, Any],
serialized: Optional[Dict[str, Any]],
inputs: Dict[str, Any],
*,
run_id: UUID,
@@ -135,7 +138,7 @@ class AsyncEventAggregatorCallback(AsyncCallbackHandler):
async def on_retriever_start(
self,
serialized: Dict[str, Any],
serialized: Optional[Dict[str, Any]],
query: str,
*,
run_id: UUID,
@@ -199,7 +202,7 @@ class AsyncEventAggregatorCallback(AsyncCallbackHandler):
async def on_tool_start(
self,
serialized: Dict[str, Any],
serialized: Optional[Dict[str, Any]],
input_str: str,
*,
run_id: UUID,
@@ -303,7 +306,7 @@ class AsyncEventAggregatorCallback(AsyncCallbackHandler):
async def on_llm_start(
self,
serialized: Dict[str, Any],
serialized: Optional[Dict[str, Any]],
prompts: List[str],
*,
run_id: UUID,
@@ -442,7 +445,14 @@ async def ahandle_callbacks(
if event["parent_run_id"] is None: # How do we make sure it's None!?
event["parent_run_id"] = callback_manager.run_id
event_data = {key: value for key, value in event.items() if key != "type"}
event_data = {
key: value
for key, value in event.items()
if key != "type" and key != "kwargs"
}
if "kwargs" in event:
event_data.update(event["kwargs"])
await ahandle_event(
# Unpacking like this may not work
@@ -464,7 +474,14 @@ def handle_callbacks(
if event["parent_run_id"] is None: # How do we make sure it's None!?
event["parent_run_id"] = callback_manager.run_id
event_data = {key: value for key, value in event.items() if key != "type"}
event_data = {
key: value
for key, value in event.items()
if key != "type" and key != "kwargs"
}
if "kwargs" in event:
event_data.update(event["kwargs"])
handle_event(
# Unpacking like this may not work
+18
View File
@@ -0,0 +1,18 @@
module.exports = {
root: true,
env: { browser: true, es2020: true },
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/recommended',
'plugin:react-hooks/recommended',
],
ignorePatterns: ['dist', '.eslintrc.cjs'],
parser: '@typescript-eslint/parser',
plugins: ['react-refresh'],
rules: {
'react-refresh/only-export-components': [
'warn',
{ allowConstantExport: true },
],
},
}
+28
View File
@@ -0,0 +1,28 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
.yarn
!dist
+27
View File
@@ -0,0 +1,27 @@
# React + TypeScript + Vite
This template provides a minimal setup to get React working in Vite with HMR and some ESLint rules.
Currently, two official plugins are available:
- [@vitejs/plugin-react](https://github.com/vitejs/vite-plugin-react/blob/main/packages/plugin-react/README.md) uses [Babel](https://babeljs.io/) for Fast Refresh
- [@vitejs/plugin-react-swc](https://github.com/vitejs/vite-plugin-react-swc) uses [SWC](https://swc.rs/) for Fast Refresh
## Expanding the ESLint configuration
If you are developing a production application, we recommend updating the configuration to enable type aware lint rules:
- Configure the top-level `parserOptions` property like this:
```js
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
project: ['./tsconfig.json', './tsconfig.node.json'],
tsconfigRootDir: __dirname,
},
```
- Replace `plugin:@typescript-eslint/recommended` to `plugin:@typescript-eslint/recommended-type-checked` or `plugin:@typescript-eslint/strict-type-checked`
- Optionally add `plugin:@typescript-eslint/stylistic-type-checked`
- Install [eslint-plugin-react](https://github.com/jsx-eslint/eslint-plugin-react) and add `plugin:react/recommended` & `plugin:react/jsx-runtime` to the `extends` list
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

+42
View File
@@ -0,0 +1,42 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/____LANGSERVE_BASE_URL/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chat Playground</title>
<script type="module" crossorigin src="/____LANGSERVE_BASE_URL/assets/index-53ad47d4.js"></script>
<link rel="stylesheet" href="/____LANGSERVE_BASE_URL/assets/index-434ff580.css">
</head>
<body>
<div id="root"></div>
<script>
try {
window.CONFIG_SCHEMA = ____LANGSERVE_CONFIG_SCHEMA;
} catch (e) {
// pass
}
try {
window.INPUT_SCHEMA = ____LANGSERVE_INPUT_SCHEMA;
} catch (e) {
// pass
}
try {
window.OUTPUT_SCHEMA = ____LANGSERVE_OUTPUT_SCHEMA;
} catch (e) {
// pass
}
try {
window.FEEDBACK_ENABLED = ____LANGSERVE_FEEDBACK_ENABLED;
} catch (e) {
// pass
}
try {
window.PUBLIC_TRACE_LINK_ENABLED = ____LANGSERVE_PUBLIC_TRACE_LINK_ENABLED;
} catch (e) {
// pass
}
</script>
</body>
</html>
+40
View File
@@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" href="/favicon.ico" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Chat Playground</title>
</head>
<body>
<div id="root"></div>
<script>
try {
window.CONFIG_SCHEMA = ____LANGSERVE_CONFIG_SCHEMA;
} catch (e) {
// pass
}
try {
window.INPUT_SCHEMA = ____LANGSERVE_INPUT_SCHEMA;
} catch (e) {
// pass
}
try {
window.OUTPUT_SCHEMA = ____LANGSERVE_OUTPUT_SCHEMA;
} catch (e) {
// pass
}
try {
window.FEEDBACK_ENABLED = ____LANGSERVE_FEEDBACK_ENABLED;
} catch (e) {
// pass
}
try {
window.PUBLIC_TRACE_LINK_ENABLED = ____LANGSERVE_PUBLIC_TRACE_LINK_ENABLED;
} catch (e) {
// pass
}
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
+59
View File
@@ -0,0 +1,59 @@
{
"name": "langserve-chat-playground",
"private": true,
"version": "0.0.0",
"type": "module",
"packageManager": "yarn@1.22.19",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
"preview": "vite preview"
},
"dependencies": {
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@jsonforms/core": "^3.2.1",
"@microsoft/fetch-event-source": "^2.0.1",
"@mui/icons-material": "^5.14.11",
"@mui/material": "^5.14.11",
"@mui/x-date-pickers": "^6.16.0",
"@radix-ui/react-toggle-group": "^1.0.4",
"clsx": "^2.0.0",
"dayjs": "^1.11.10",
"fast-json-patch": "^3.1.1",
"lodash": "^4.18.1",
"lz-string": "^1.5.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-toastify": "^9.1.3",
"swr": "^2.2.4",
"tailwind-merge": "^1.14.0",
"use-debounce": "^9.0.4",
"vaul": "^0.7.3"
},
"devDependencies": {
"@types/lodash": "^4.14.200",
"@types/react": "^18.2.15",
"@types/react-dom": "^18.2.7",
"@typescript-eslint/eslint-plugin": "^6.0.0",
"@typescript-eslint/parser": "^6.0.0",
"@vitejs/plugin-react": "^4.0.3",
"autoprefixer": "^10.4.16",
"eslint": "^8.45.0",
"eslint-plugin-react-hooks": "^4.6.0",
"eslint-plugin-react-refresh": "^0.4.3",
"postcss": "^8.4.31",
"tailwindcss": "^3.3.3",
"typescript": "^5.0.2",
"vite": "^6.4.2",
"vite-plugin-svgr": "^4.1.0"
},
"resolutions": {
"braces": "^3.0.3",
"cross-spawn": "^7.0.5",
"rollup": "^3.30.0",
"ajv": "^8.18.0",
"esbuild": "0.25.0"
}
}
@@ -0,0 +1,6 @@
export default {
plugins: {
tailwindcss: {},
autoprefixer: {},
},
};
Binary file not shown.

After

Width:  |  Height:  |  Size: 40 KiB

+116
View File
@@ -0,0 +1,116 @@
@tailwind base;
@tailwind components;
@tailwind utilities;
@layer base {
* {
color: #043D5C;
font-weight: 300;
@font-face {
font-family: 'Manrope';
src: url('/dist/Manrope-VariableFont_wght.ttf') format('truetype');
}
border-color: #043D5C;
}
input,
textarea,
select {
background: transparent;
}
/* clash between MUI and Tailwind */
input:focus,
textarea:focus,
select:focus {
box-shadow: none;
outline: none;
}
:root {
--popover: 0 0% 100%;
--background: #F8F7FF;
--divider-500: 210 40% 96.1%; /* slate-100 */
--divider-700: 214.3 31.8% 91.4%; /* slate-200 */
--ls-blue: 211.5 91.8% 61.8%;
--ls-black: 222.2 47.4% 11.2%; /* slate-900 */
--ls-gray-100: 215.4 16.3% 46.9%; /* slate-500 */
--ls-gray-200: 212.7 26.8% 83.9%; /* slate-300 */
--ls-gray-300: 214.3 31.8% 91.4%; /* slate-200 */
--ls-gray-400: 210 40% 96.1%; /* slate-100 */
--button-green: #162E2E;
--button-green-disabled: rgba(4, 61, 92, 0.20);
--button-inline: #006BA41A;
}
@media (prefers-color-scheme: dark) {
:root {
--popover: 240 11.6% 8.4%;
--divider-500: 217.2 32.6% 17.5%; /* slate-800 */
--divider-700: 215.3 25% 26.7%; /* slate-700 */
--ls-blue: 211.5 91.8% 61.8%;
--ls-black: 0 0% 100%; /* white */
--ls-gray-100: 215 20.2% 65.1%; /* slate-400 */
--ls-gray-200: 215.4 16.3% 46.9%; /* slate-500 */
--ls-gray-300: 215.3 25% 26.7%; /* slate-700 */
--ls-gray-400: 217.2 32.6% 17.5%; /* slate-800 */
}
}
}
.control {
@apply flex flex-col border border-divider-700 rounded-lg p-3 gap-1 relative bg-background transition-all outline-ls-blue/20;
@apply focus-within:border-ls-blue focus-within:outline focus-within:outline-4 focus-within:outline-ls-blue/20;
}
.control > label,
.control h6 {
@apply text-xs uppercase font-semibold text-ls-gray-100;
}
.control div .MuiGrid-item {
@apply pt-0;
}
.control > select {
@apply -ml-1;
}
.control > .input-description,
.control > .validation {
@apply absolute right-3 top-3 text-xs;
}
.group-layout {
@apply flex flex-col gap-4 bg-background p-4 border border-divider-700 rounded-lg;
}
.no-scrollbar {
scrollbar-width: none;
}
.no-scrollbar::-webkit-scrollbar {
display: none;
}
.vertical-layout {
@apply flex flex-col gap-4;
}
.share-button:hover {
background: linear-gradient(270deg, #BCB2FD 0.29%, #D65622 92%);
}
.share-button:hover > * {
color: white;
}
a {
color: blue;
text-decoration: underline;
}
+73
View File
@@ -0,0 +1,73 @@
import "./App.css";
import { ChatWindow } from "./components/ChatWindow";
import { AppCallbackContext, useAppStreamCallbacks } from "./useStreamCallback";
import { useInputSchema, useOutputSchema } from "./useSchemas";
import { useStreamLog } from "./useStreamLog";
export function App() {
const { context, callbacks } = useAppStreamCallbacks();
const { startStream, stopStream } = useStreamLog(callbacks);
const inputSchema = useInputSchema({});
const outputSchema = useOutputSchema({});
const inputProps = inputSchema?.data?.schema?.properties;
const outputDataSchema = outputSchema?.data?.schema;
const isLoading = inputProps === undefined || outputDataSchema === undefined;
const inputKeys = Object.keys(inputProps ?? {});
const inputSchemaSupported = (
inputKeys.length === 1 &&
inputProps?.[inputKeys[0]].type === "array"
) || (
inputKeys.length === 2 && (
(
inputProps?.[inputKeys[0]].type === "array" ||
inputProps?.[inputKeys[1]].type === "string"
) || (
inputProps?.[inputKeys[0]].type === "string" ||
inputProps?.[inputKeys[1]].type === "array"
)
)
);
const outputSchemaSupported = (
outputDataSchema?.anyOf?.find((option) => option.properties?.type?.enum?.includes("ai")) ||
outputDataSchema?.oneOf?.find((option) => option.properties?.type?.enum?.includes("ai")) ||
outputDataSchema?.type === "string"
);
const isSupported = isLoading || (inputSchemaSupported && outputSchemaSupported);
return (
<div className="flex items-center flex-col text-ls-black bg-background">
<AppCallbackContext.Provider value={context}>
{isSupported
? <ChatWindow
startStream={startStream}
stopStream={stopStream}
messagesInputKey={inputProps?.[inputKeys[0]].type === "array" ? inputKeys[0] : inputKeys[1]}
inputKey={inputProps?.[inputKeys[0]].type === "string" ? inputKeys[0] : inputKeys[1]}
></ChatWindow>
: <div className="h-[100vh] w-[100vw] flex justify-center items-center text-xl p-16">
<span>
The chat playground is only supported for chains that take one of the following as input:
<ul className="mt-8 list-disc ml-6">
<li>
a dict with a single key containing a list of messages
</li>
<li>
a dict with two keys: one a string input, one an list of messages
</li>
</ul>
<br />
and which return either an <code>AIMessage</code> or a string.
<br />
<br />
You can test this chain in the default LangServe playground instead.
<br />
<br />
To use the default playground, set <code>playground_type="default"</code> when adding the route in your backend.
</span>
</div>}
</AppCallbackContext.Provider>
</div>
);
}
export default App;
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-arrow-up"><line x1="12" y1="19" x2="12" y2="5"></line><polyline points="5 12 12 5 19 12"></polyline></svg>

After

Width:  |  Height:  |  Size: 310 B

@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M7.7588 2H16.2414C17.0464 1.99999 17.7107 1.99998 18.2519 2.04419C18.814 2.09012 19.3307 2.18868 19.8161 2.43597C20.5687 2.81947 21.1806 3.43139 21.5641 4.18404C21.8114 4.66937 21.91 5.18608 21.9559 5.74817C22.0001 6.28936 22.0001 6.95372 22.0001 7.75868V13.2413C22.0001 14.0463 22.0001 14.7106 21.9559 15.2518C21.91 15.8139 21.8114 16.3306 21.5641 16.816C21.1806 17.5686 20.5687 18.1805 19.8161 18.564C19.3307 18.8113 18.814 18.9099 18.2519 18.9558C17.7107 19 17.0464 19 16.2414 19H13.6838C13.0197 19 12.8263 19.0047 12.6504 19.0408C12.4738 19.0771 12.303 19.137 12.1425 19.219C11.9826 19.3007 11.8286 19.4178 11.31 19.8327L8.89688 21.7632C8.7132 21.9102 8.52597 22.06 8.36137 22.1689C8.20394 22.273 7.8987 22.4593 7.50172 22.4597C7.0449 22.4602 6.61276 22.2525 6.32778 21.8955C6.08012 21.5852 6.03492 21.2305 6.01785 21.0425C6 20.846 6.00005 20.6062 6.00009 20.371L6.0001 18.9918C5.60829 18.9789 5.27229 18.9461 4.96482 18.8637C3.58445 18.4938 2.50626 17.4156 2.13639 16.0353C1.9993 15.5236 1.99962 14.933 2.00005 14.1376C2.00007 14.0924 2.0001 14.0465 2.0001 14L2.0001 7.7587C2.00008 6.95373 2.00007 6.28937 2.04429 5.74817C2.09022 5.18608 2.18878 4.66937 2.43607 4.18404C2.81956 3.43139 3.43149 2.81947 4.18413 2.43597C4.66947 2.18868 5.18617 2.09012 5.74827 2.04419C6.28947 1.99998 6.95383 1.99999 7.7588 2ZM5.91113 4.03755C5.47272 4.07337 5.24852 4.1383 5.09212 4.21799C4.71579 4.40973 4.40983 4.7157 4.21808 5.09202C4.13839 5.24842 4.07347 5.47262 4.03765 5.91104C4.00087 6.36113 4.0001 6.94342 4.0001 7.8V14C4.0001 14.9944 4.00869 15.2954 4.06824 15.5176C4.25318 16.2078 4.79227 16.7469 5.48246 16.9319C5.70474 16.9914 6.00574 17 7.0001 17C7.55238 17 8.0001 17.4477 8.0001 18V19.9194L10.0606 18.271C10.0834 18.2528 10.1058 18.2348 10.1279 18.2171C10.55 17.8791 10.8691 17.6237 11.2326 17.4379C11.5536 17.274 11.8952 17.1541 12.2483 17.0817C12.6482 16.9996 13.0569 16.9998 13.5976 17C13.626 17 13.6547 17 13.6838 17H16.2001C17.0567 17 17.639 16.9992 18.0891 16.9624C18.5275 16.9266 18.7517 16.8617 18.9081 16.782C19.2844 16.5903 19.5904 16.2843 19.7821 15.908C19.8618 15.7516 19.9267 15.5274 19.9625 15.089C19.9993 14.6389 20.0001 14.0566 20.0001 13.2V7.8C20.0001 6.94342 19.9993 6.36113 19.9625 5.91104C19.9267 5.47262 19.8618 5.24842 19.7821 5.09202C19.5904 4.7157 19.2844 4.40973 18.9081 4.21799C18.7517 4.1383 18.5275 4.07337 18.0891 4.03755C17.639 4.00078 17.0567 4 16.2001 4H7.8001C6.94352 4 6.36122 4.00078 5.91113 4.03755Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 2.6 KiB

@@ -0,0 +1,5 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M12 5.45455C8.38505 5.45455 5.45455 8.38505 5.45455 12C5.45455 15.615 8.38505 18.5455 12 18.5455C15.615 18.5455 18.5455 15.615 18.5455 12C18.5455 8.38505 15.615 5.45455 12 5.45455ZM4 12C4 7.58172 7.58172 4 12 4C16.4183 4 20 7.58172 20 12C20 16.4183 16.4183 20 12 20C7.58172 20 4 16.4183 4 12ZM15.787 9.30392C16.071 9.58794 16.071 10.0484 15.787 10.3324L11.4233 14.6961C11.1393 14.9801 10.6788 14.9801 10.3948 14.6961L8.21301 12.5143C7.929 12.2303 7.929 11.7697 8.21301 11.4857C8.49703 11.2017 8.95751 11.2017 9.24153 11.4857L10.9091 13.1533L14.7585 9.30392C15.0425 9.01991 15.503 9.01991 15.787 9.30392Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 789 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check-circle"><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14"></path><polyline points="22 4 12 14.01 9 11.01"></polyline></svg>

After

Width:  |  Height:  |  Size: 328 B

@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.29289 5.29289C8.68342 4.90237 9.31658 4.90237 9.70711 5.29289L15.7071 11.2929C16.0976 11.6834 16.0976 12.3166 15.7071 12.7071L9.70711 18.7071C9.31658 19.0976 8.68342 19.0976 8.29289 18.7071C7.90237 18.3166 7.90237 17.6834 8.29289 17.2929L13.5858 12L8.29289 6.70711C7.90237 6.31658 7.90237 5.68342 8.29289 5.29289Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 505 B

@@ -0,0 +1,15 @@
<svg
aria-hidden="true"
viewBox="0 0 100 101"
fill="none"
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M100 50.5908C100 78.2051 77.6142 100.591 50 100.591C22.3858 100.591 0 78.2051 0 50.5908C0 22.9766 22.3858 0.59082 50 0.59082C77.6142 0.59082 100 22.9766 100 50.5908ZM9.08144 50.5908C9.08144 73.1895 27.4013 91.5094 50 91.5094C72.5987 91.5094 90.9186 73.1895 90.9186 50.5908C90.9186 27.9921 72.5987 9.67226 50 9.67226C27.4013 9.67226 9.08144 27.9921 9.08144 50.5908Z"
fill="currentColor"
/>
<path
d="M93.9676 39.0409C96.393 38.4038 97.8624 35.9116 97.0079 33.5539C95.2932 28.8227 92.871 24.3692 89.8167 20.348C85.8452 15.1192 80.8826 10.7238 75.2124 7.41289C69.5422 4.10194 63.2754 1.94025 56.7698 1.05124C51.7666 0.367541 46.6976 0.446843 41.7345 1.27873C39.2613 1.69328 37.813 4.19778 38.4501 6.62326C39.0873 9.04874 41.5694 10.4717 44.0505 10.1071C47.8511 9.54855 51.7191 9.52689 55.5402 10.0491C60.8642 10.7766 65.9928 12.5457 70.6331 15.2552C75.2735 17.9648 79.3347 21.5619 82.5849 25.841C84.9175 28.9121 86.7997 32.2913 88.1811 35.8758C89.083 38.2158 91.5421 39.6781 93.9676 39.0409Z"
fill="currentFill"
/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8.70711 5.29289C9.09763 5.68342 9.09763 6.31658 8.70711 6.70711L3.41421 12L8.70711 17.2929C9.09763 17.6834 9.09763 18.3166 8.70711 18.7071C8.31658 19.0976 7.68342 19.0976 7.29289 18.7071L1.29289 12.7071C0.902369 12.3166 0.902369 11.6834 1.29289 11.2929L7.29289 5.29289C7.68342 4.90237 8.31658 4.90237 8.70711 5.29289ZM15.2929 5.29289C15.6834 4.90237 16.3166 4.90237 16.7071 5.29289L22.7071 11.2929C23.0976 11.6834 23.0976 12.3166 22.7071 12.7071L16.7071 18.7071C16.3166 19.0976 15.6834 19.0976 15.2929 18.7071C14.9024 18.3166 14.9024 17.6834 15.2929 17.2929L20.5858 12L15.2929 6.70711C14.9024 6.31658 14.9024 5.68342 15.2929 5.29289Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 823 B

@@ -0,0 +1,6 @@
<svg width="25" height="25" viewBox="0 0 25 25" fill="none" xmlns="http://www.w3.org/2000/svg">
<path
d="M4.5 19.7783C4.5 21.5132 5.35498 22.3848 7.07324 22.3848H14.876C16.5942 22.3848 17.4492 21.5049 17.4492 19.7783V18.2427H18.9019C20.6118 18.2427 21.4751 17.3628 21.4751 15.6362V8.896C21.4751 7.875 21.2676 7.22754 20.645 6.58838L16.4531 2.33008C15.8638 1.72412 15.1665 1.5 14.2783 1.5H11.0991C9.38916 1.5 8.52588 2.37988 8.52588 4.10645V5.64209H7.07324C5.36328 5.64209 4.5 6.51367 4.5 8.24854V19.7783ZM16.6606 11.0874L12.0869 6.43066C11.4561 5.7832 10.9331 5.64209 10.0034 5.64209H9.8623V4.13135C9.8623 3.30957 10.3022 2.83643 11.1655 2.83643H14.8345V7.09473C14.8345 8.05762 15.2993 8.51416 16.2539 8.51416H20.1387V15.6113C20.1387 16.4414 19.6904 16.9062 18.8271 16.9062H17.4492V13.2954C17.4492 12.2329 17.3247 11.7681 16.6606 11.0874ZM16.0381 6.89551V3.49219L19.79 7.31055H16.4448C16.1543 7.31055 16.0381 7.18604 16.0381 6.89551ZM5.83643 19.7534V8.26514C5.83643 7.45166 6.27637 6.97852 7.13965 6.97852H9.8623V11.793C9.8623 12.8389 10.3936 13.3618 11.4229 13.3618H16.1128V19.7534C16.1128 20.5835 15.6646 21.0483 14.8096 21.0483H7.13135C6.27637 21.0483 5.83643 20.5835 5.83643 19.7534ZM11.5806 12.1084C11.2485 12.1084 11.1157 11.9756 11.1157 11.6436V7.28564L15.8555 12.1084H11.5806Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 1.3 KiB

@@ -0,0 +1,21 @@
<svg width="76" height="64" viewBox="0 0 76 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<g id="Group 145">
<path id="Vector" d="M46.897 46.0711C56.7342 36.282 58.3487 22.0173 50.5032 14.2101C42.6577 6.40285 28.3231 8.00951 18.486 17.7986C8.64888 27.5878 7.03435 41.8524 14.8798 49.6597C22.7253 57.4669 37.0599 55.8602 46.897 46.0711Z" stroke="url(#paint0_linear_10720_23418)" stroke-width="1.5" stroke-miterlimit="10"/>
<path id="Vector_2" d="M52.3165 46.0721C62.1536 36.2829 63.7681 22.0183 55.9226 14.211C48.0771 6.40383 33.7426 8.01049 23.9054 17.7996C14.0683 27.5888 12.4538 41.8534 20.2993 49.6606C28.1448 57.4679 42.4794 55.8612 52.3165 46.0721Z" stroke="url(#paint1_linear_10720_23418)" stroke-width="1.5" stroke-miterlimit="10"/>
<path id="Vector_3" d="M57.7354 46.0721C67.5725 36.2829 69.1871 22.0183 61.3416 14.211C53.4961 6.40383 39.1615 8.01049 29.3244 17.7996C19.4873 27.5888 17.8727 41.8534 25.7182 49.6606C33.5637 57.4679 47.8983 55.8612 57.7354 46.0721Z" stroke="url(#paint2_linear_10720_23418)" stroke-width="1.5" stroke-miterlimit="10"/>
</g>
<defs>
<linearGradient id="paint0_linear_10720_23418" x1="7.45971" y1="29.1331" x2="55.0891" y2="34.5103" gradientUnits="userSpaceOnUse">
<stop stop-color="#A75A3D"/>
<stop offset="1" stop-color="#BCB2FD"/>
</linearGradient>
<linearGradient id="paint1_linear_10720_23418" x1="12.9979" y1="29.1441" x2="60.6273" y2="34.5213" gradientUnits="userSpaceOnUse">
<stop stop-color="#BB5831"/>
<stop offset="1" stop-color="#BCB2FD"/>
</linearGradient>
<linearGradient id="paint2_linear_10720_23418" x1="18.5356" y1="29.1542" x2="66.165" y2="34.5313" gradientUnits="userSpaceOnUse">
<stop stop-color="#CF5726"/>
<stop offset="1" stop-color="#BCB2FD"/>
</linearGradient>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 1.7 KiB

@@ -0,0 +1,12 @@
<svg xmlns="http://www.w3.org/2000/svg" width="140" height="23" viewBox="0 0 140 23" fill="none">
<path d="M51.7334 4.44824V17.796H60.8269V15.7806H53.7978V4.44824H51.7334Z" fill="#043D5C"/>
<path d="M65.6734 7.61523C63.6917 7.61523 62.2098 8.55468 61.6081 10.1923C61.5698 10.2971 61.454 10.6132 61.454 10.6132L63.1527 11.7243L63.3834 11.1159C63.777 10.0788 64.5049 9.59538 65.6734 9.59538C66.8418 9.59538 67.5105 10.1686 67.4983 11.2973C67.4983 11.3431 67.4949 11.4813 67.4949 11.4813C67.4949 11.4813 65.9485 11.7349 65.3112 11.8714C62.592 12.4525 61.4531 13.502 61.4531 15.2189C61.4531 16.1337 61.9555 17.1242 62.8724 17.6797C63.4226 18.0126 64.141 18.1385 64.9342 18.1385C65.4557 18.1385 65.9624 18.0601 66.4317 17.9157C67.4983 17.5574 67.7961 16.853 67.7961 16.853V17.774H69.5628V11.1899C69.5628 8.95177 68.1087 7.61523 65.6734 7.61523ZM67.5053 14.6413C67.5053 15.3333 66.76 16.308 65.0238 16.308C64.5336 16.308 64.1862 16.1768 63.9546 15.9813C63.6447 15.7198 63.5428 15.3439 63.5855 15.012C63.6037 14.8676 63.6899 14.5568 64.0095 14.2873C64.336 14.0118 64.9133 13.8145 65.8048 13.6182C66.538 13.4571 67.5062 13.2792 67.5062 13.2792V14.6422L67.5053 14.6413Z" fill="#043D5C"/>
<path d="M76.0944 7.61514C75.8489 7.61514 75.6095 7.63275 75.377 7.66532C73.7949 7.90569 73.3317 8.71835 73.3317 8.71835L73.3335 7.90569H71.3535V17.7756H73.4179V12.3009C73.4179 10.4405 74.7597 9.59353 76.0065 9.59353C77.3543 9.59353 78.0091 10.3261 78.0091 11.8343V17.7756H80.0735V11.5473C80.0735 9.12072 78.5489 7.61426 76.0953 7.61426L76.0944 7.61514Z" fill="#043D5C"/>
<path d="M88.6883 7.89874V8.91567C88.6883 8.91567 88.1824 7.61523 85.8812 7.61523C83.0218 7.61523 81.2456 9.61035 81.2456 12.8231C81.2456 14.636 81.8185 16.0632 82.8294 16.9648C83.6156 17.6657 84.6657 18.0249 85.916 18.0495C86.7858 18.0663 87.3492 17.8268 87.7009 17.6005C88.3766 17.1656 88.6273 16.7526 88.6273 16.7526C88.6273 16.7526 88.5986 17.0758 88.5464 17.5133C88.5089 17.8303 88.4384 18.0531 88.4384 18.0531C88.1241 19.1845 87.2046 19.8386 85.8638 19.8386C84.5229 19.8386 83.7105 19.3922 83.5495 18.5127L81.5425 19.1184C81.889 20.8089 83.458 21.8179 85.7392 21.8179C87.29 21.8179 88.5054 21.3918 89.3526 20.55C90.2068 19.7013 90.6404 18.4783 90.6404 16.9146V7.89786H88.6883V7.89874ZM88.5586 12.9129C88.5586 14.8887 87.6043 16.0685 86.0057 16.0685C84.293 16.0685 83.3109 14.8852 83.3109 12.8231C83.3109 10.7611 84.293 9.59538 86.0057 9.59538C87.566 9.59538 88.5438 10.7699 88.5586 12.6611V12.9129Z" fill="#043D5C"/>
<path d="M102.741 15.7585C103.02 15.247 103.161 14.6439 103.161 13.965C103.161 13.2862 103.042 12.765 102.806 12.3432C102.57 11.9197 102.265 11.5737 101.901 11.314C101.534 11.0525 101.147 10.8465 100.752 10.7003C100.355 10.5541 99.9898 10.4362 99.6686 10.3508L97.3116 9.68602C97.0138 9.60589 96.716 9.50464 96.4252 9.38402C96.1318 9.26252 95.8819 9.09435 95.6843 8.88392C95.4823 8.66997 95.3795 8.39174 95.3795 8.05453C95.3795 7.70058 95.4988 7.38626 95.733 7.12036C95.9655 6.8571 96.2755 6.65284 96.6551 6.51285C97.0321 6.37285 97.4474 6.30506 97.8897 6.31122C98.3442 6.32355 98.7787 6.41776 99.1801 6.59209C99.5832 6.76642 99.9298 7.02351 100.21 7.35632C100.483 7.68033 100.672 8.07478 100.773 8.52997L103.051 8.12937C102.857 7.34048 102.526 6.65636 102.066 6.09639C101.598 5.52585 101.008 5.08386 100.311 4.78363C99.6137 4.48251 98.8083 4.32667 97.9167 4.32051C97.0391 4.31434 96.2267 4.4561 95.5084 4.74224C94.7918 5.02751 94.2145 5.46246 93.7923 6.03476C93.3708 6.60617 93.1566 7.32287 93.1566 8.16458C93.1566 8.7404 93.2515 9.22906 93.4396 9.61822C93.6277 10.0083 93.8732 10.3323 94.1684 10.5832C94.4653 10.835 94.784 11.034 95.1166 11.1766C95.4518 11.3201 95.7679 11.4364 96.0569 11.5209L99.4544 12.5369C99.6999 12.6118 99.9193 12.7016 100.107 12.8037C100.295 12.9067 100.452 13.023 100.573 13.1489C100.695 13.2756 100.789 13.4218 100.852 13.5838C100.915 13.7458 100.946 13.9237 100.946 14.1121C100.946 14.5338 100.812 14.8957 100.546 15.1854C100.284 15.4724 99.9385 15.6943 99.5197 15.8431C99.1026 15.9919 98.6524 16.0676 98.1805 16.0676C97.3839 16.0676 96.6699 15.8475 96.0595 15.4134C95.4579 14.9855 95.0513 14.3745 94.851 13.5979L92.6499 13.936C92.7857 14.7742 93.0983 15.5094 93.5789 16.1204C94.0683 16.7429 94.7021 17.228 95.4614 17.5617C96.2223 17.8963 97.0913 18.0662 98.0421 18.0662C98.7108 18.0662 99.3595 17.9799 99.9716 17.8091C100.582 17.6392 101.132 17.3803 101.607 17.0396C102.08 16.7006 102.462 16.2683 102.739 15.7568L102.741 15.7585Z" fill="#043D5C"/>
<path d="M113.245 15.2689L111.168 14.6332C110.954 15.0814 110.651 15.4291 110.264 15.6686C109.869 15.9134 109.392 16.0375 108.848 16.0375C108.004 16.0375 107.351 15.754 106.908 15.1949C106.563 14.7582 106.35 14.1736 106.276 13.456L106.271 13.4076H113.371C113.449 12.2498 113.318 11.2302 112.981 10.3753C112.642 9.51334 112.114 8.83627 111.414 8.36258C110.714 7.88978 109.85 7.64941 108.847 7.64941C107.897 7.64941 107.05 7.86953 106.328 8.30359C105.607 8.73766 105.035 9.3575 104.63 10.1446C104.224 10.9326 104.018 11.8747 104.018 12.9462C104.018 13.9376 104.228 14.826 104.643 15.5859C105.057 16.3457 105.642 16.9488 106.382 17.3767C107.122 17.8055 107.994 18.0221 108.974 18.0221C109.955 18.0221 110.77 17.7747 111.542 17.2851C112.3 16.8053 112.873 16.1265 113.243 15.2671L113.245 15.2689ZM106.331 11.7744C106.432 11.1959 106.627 10.7178 106.909 10.3551C107.351 9.78717 108.034 9.49838 108.94 9.49838C109.742 9.49838 110.341 9.75459 110.717 10.2591C110.981 10.6148 111.156 11.1255 111.236 11.7761L111.243 11.8254H106.322L106.331 11.7735V11.7744Z" fill="#043D5C"/>
<path d="M117.531 10.7923C117.724 10.5316 117.978 10.3142 118.285 10.1469C118.589 9.96199 118.939 9.85193 119.323 9.82023C119.68 9.79118 120.004 9.81407 120.285 9.88891V7.91932C120.011 7.87618 119.724 7.86473 119.434 7.8841C119.13 7.90524 118.83 7.96335 118.542 8.05667C118.253 8.15 117.987 8.27943 117.749 8.44143C117.469 8.61665 117.228 8.8394 117.029 9.10618C116.941 9.22416 116.861 9.34919 116.783 9.49094L116.701 9.63798V7.92637H114.855V17.7488H116.964V12.7548C116.964 12.3736 117.01 12.0126 117.101 11.6833C117.194 11.3522 117.337 11.052 117.531 10.7923Z" fill="#043D5C"/>
<path d="M127.917 7.92578L125.426 15.201L122.928 7.92578H120.833L124.359 17.7482H126.494L130.019 7.92578H127.917Z" fill="#043D5C"/>
<path d="M138.918 10.3753C138.579 9.51334 138.051 8.83627 137.351 8.36258C136.651 7.88978 135.787 7.64941 134.784 7.64941C133.834 7.64941 132.987 7.86953 132.265 8.30359C131.544 8.73766 130.972 9.3575 130.567 10.1446C130.16 10.9326 129.955 11.8756 129.955 12.9462C129.955 13.9376 130.165 14.826 130.58 15.5859C130.994 16.3457 131.579 16.9488 132.319 17.3767C133.059 17.8055 133.931 18.0221 134.911 18.0221C135.892 18.0221 136.706 17.7747 137.479 17.2851C138.237 16.8053 138.81 16.1265 139.18 15.2671L137.103 14.6314C136.889 15.0796 136.585 15.4274 136.199 15.6669C135.804 15.9116 135.328 16.0358 134.783 16.0358C133.939 16.0358 133.286 15.7523 132.844 15.1932C132.499 14.7565 132.285 14.1718 132.211 13.4543L132.206 13.4058H139.307C139.384 12.248 139.254 11.2285 138.917 10.3736L138.918 10.3753ZM132.258 11.8254L132.266 11.7735C132.367 11.195 132.561 10.7178 132.844 10.3542C133.287 9.78628 133.969 9.49749 134.875 9.49749C135.678 9.49749 136.276 9.75371 136.652 10.2582C136.917 10.6139 137.092 11.1246 137.172 11.7752L137.178 11.8245H132.258V11.8254Z" fill="#043D5C"/>
<path d="M16.343 16.9848C16.3204 17.4497 15.7466 17.6381 15.3582 17.5808C15.2729 17.3722 15.1545 17.1635 14.9029 17.2797C14.6486 17.3819 14.37 17.2612 14.4292 16.9408C15.1449 16.9135 15.1911 15.9652 15.3321 15.4096C15.5837 16.0048 15.7631 16.6476 16.343 16.9848ZM43.1377 11.1333C43.1377 17.1987 38.2575 22.1337 32.2593 22.1337H11.2085C5.21031 22.1328 0.330078 17.1987 0.330078 11.1333C0.330078 5.06778 5.21031 0.132812 11.2085 0.132812H32.2601C38.2583 0.132812 43.1386 5.06778 43.1386 11.1333H43.1377ZM21.2937 16.6493C21.4653 16.4389 20.6729 15.8472 20.511 15.6289C20.1819 15.2679 20.1801 14.7493 19.9581 14.3276C19.4148 13.0553 18.7905 11.7918 17.9181 10.715C16.9951 9.53698 15.8571 8.56144 14.8567 7.45558C14.114 6.68342 13.9164 5.58461 13.2607 4.75434C12.3578 3.40547 9.50108 3.03744 9.08228 4.94275C9.08402 5.00175 9.06574 5.04048 9.01437 5.07834C8.78276 5.24827 8.57641 5.44197 8.40401 5.67794C7.98086 6.27401 7.91468 7.28653 8.44406 7.82185C8.46148 7.53923 8.47106 7.27333 8.69221 7.06994C9.10144 7.42477 9.71963 7.55067 10.1933 7.28565C11.2416 8.79828 10.9795 10.8911 11.8119 12.5209C12.0418 12.9065 12.2725 13.2992 12.5685 13.6382C12.808 14.015 13.6351 14.4596 13.683 14.8074C13.6917 15.4052 13.6221 16.0603 14.0104 16.5604C14.1924 16.9355 13.744 17.3123 13.3818 17.2656C12.9116 17.3308 12.3387 16.946 11.9268 17.1829C11.7814 17.3422 11.4967 17.1662 11.3713 17.3871C11.3278 17.5016 11.0927 17.6627 11.2329 17.7719C11.3887 17.6522 11.5333 17.528 11.7431 17.5985C11.7118 17.771 11.8467 17.7957 11.953 17.8459C11.9495 17.963 11.8816 18.0827 11.9704 18.1822C12.074 18.0765 12.1358 17.9269 12.3004 17.8828C12.8463 18.6198 13.4027 17.1371 14.5859 17.8045C14.3456 17.7922 14.1332 17.823 13.9704 18.0228C13.9303 18.0677 13.8963 18.1206 13.9669 18.1787C14.6051 17.7622 14.6016 18.3204 15.0161 18.1496C15.3347 17.9815 15.6508 17.771 16.0295 17.8309C15.6612 17.9383 15.6464 18.2377 15.4314 18.4904C15.3948 18.5291 15.3774 18.5731 15.4201 18.6374C16.1837 18.5722 16.2463 18.3152 16.8645 18.0008C17.3243 17.7164 17.7831 18.4058 18.1819 18.0132C18.2698 17.9277 18.39 17.9568 18.4988 17.9454C18.3595 17.1943 16.8288 18.0827 16.8532 17.0763C17.346 16.7374 17.2328 16.0894 17.2659 15.5655C17.8327 15.8833 18.4623 16.0682 19.0178 16.3711C19.2972 16.8281 19.7369 17.4329 20.3229 17.3933C20.3386 17.3475 20.3525 17.307 20.3691 17.2604C20.5467 17.2912 20.7748 17.41 20.8723 17.1829C21.1379 17.4637 21.528 17.4497 21.8754 17.3775C22.1322 17.1662 21.3921 16.8659 21.2929 16.6484L21.2937 16.6493ZM35.6828 14.8224C35.6828 13.5624 34.6728 12.5411 33.4268 12.5411C32.1809 12.5411 31.1709 13.5624 31.1709 14.8224C31.1709 16.0823 32.1809 17.1036 33.4268 17.1036C34.6728 17.1036 35.6828 16.0823 35.6828 14.8224ZM35.85 6.1754C34.1095 4.01123 30.551 4.02268 27.9032 6.20093C26.8549 7.0629 26.1069 8.13529 25.6925 9.25084C25.6368 9.40139 25.622 9.5634 25.6524 9.721C25.7378 10.1612 25.9084 11.1641 25.8492 11.9389C25.8048 12.5253 25.7317 12.9303 25.6768 13.1698C25.6394 13.3335 25.561 13.4832 25.4487 13.6073C25.4487 13.6073 24.9454 14.1629 24.7487 14.3804C24.5179 14.6357 24.1801 14.9492 23.9076 15.1825C23.7404 15.3251 23.433 15.5074 23.2754 15.5937C23.1239 15.6773 22.8932 15.8463 23.0743 16.0559C23.2554 16.2654 24.7077 17.639 24.7077 17.639C24.7077 17.639 24.9672 17.8388 25.1744 17.3669C25.3816 16.895 25.8719 16.3165 26.147 16.0427C26.43 15.7609 26.9576 15.2917 27.3781 15.1385C27.763 14.9985 28.7782 14.7194 30.4891 15.1385C30.6049 15.1534 30.7129 15.1684 30.8156 15.1842C30.8 15.0663 30.7913 14.9456 30.7913 14.8241C30.7913 13.3538 31.9737 12.1581 33.4277 12.1581C34.1565 12.1581 34.8173 12.4592 35.2945 12.9435C37.0228 10.8057 37.3215 8.00675 35.8491 6.17716L35.85 6.1754Z" fill="#043D5C"/>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

@@ -0,0 +1,6 @@
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M4 5.33301C4 3.12387 5.79086 1.33301 8 1.33301C10.2091 1.33301 12 3.12387 12 5.33301V6.76656C12.1884 6.80784 12.3692 6.86796 12.544 6.95699C13.0457 7.21265 13.4537 7.6206 13.7093 8.12237C13.8742 8.44592 13.9399 8.79039 13.9705 9.16512C14 9.52592 14 9.96882 14 10.5055V10.8272C14 11.3639 14 11.8068 13.9705 12.1676C13.9399 12.5423 13.8742 12.8868 13.7093 13.2103C13.4537 13.7121 13.0457 14.12 12.544 14.3757C12.2204 14.5406 11.8759 14.6063 11.5012 14.6369C11.1404 14.6664 10.6975 14.6663 10.1609 14.6663H5.83912C5.30248 14.6663 4.85958 14.6664 4.49878 14.6369C4.12405 14.6063 3.77958 14.5406 3.45603 14.3757C2.95426 14.12 2.54631 13.7121 2.29065 13.2103C2.12579 12.8868 2.06008 12.5423 2.02946 12.1676C1.99998 11.8068 1.99999 11.3639 2 10.8272V10.5055C1.99999 9.96883 1.99998 9.52592 2.02946 9.16512C2.06008 8.79039 2.12579 8.44592 2.29065 8.12237C2.54631 7.6206 2.95426 7.21265 3.45603 6.95699C3.63076 6.86796 3.81159 6.80784 4 6.76656V5.33301ZM5.33333 6.66742C5.49181 6.66634 5.66026 6.66634 5.83913 6.66634H10.1609C10.3397 6.66634 10.5082 6.66634 10.6667 6.66742V5.33301C10.6667 3.86025 9.47276 2.66634 8 2.66634C6.52724 2.66634 5.33333 3.86025 5.33333 5.33301V6.66742ZM4.60736 8.02471C4.31508 8.04859 4.16561 8.09187 4.06135 8.145C3.81046 8.27283 3.60649 8.4768 3.47866 8.72769C3.42553 8.83195 3.38225 8.98142 3.35837 9.2737C3.33385 9.57376 3.33333 9.96195 3.33333 10.533V10.7997C3.33333 11.3707 3.33385 11.7589 3.35837 12.059C3.38225 12.3513 3.42553 12.5007 3.47866 12.605C3.60649 12.8559 3.81046 13.0599 4.06135 13.1877C4.16561 13.2408 4.31508 13.2841 4.60736 13.308C4.90742 13.3325 5.29561 13.333 5.86667 13.333H10.1333C10.7044 13.333 11.0926 13.3325 11.3926 13.308C11.6849 13.2841 11.8344 13.2408 11.9387 13.1877C12.1895 13.0599 12.3935 12.8559 12.5213 12.605C12.5745 12.5007 12.6178 12.3513 12.6416 12.059C12.6661 11.7589 12.6667 11.3707 12.6667 10.7997V10.533C12.6667 9.96195 12.6661 9.57376 12.6416 9.2737C12.6178 8.98142 12.5745 8.83195 12.5213 8.72769C12.3935 8.4768 12.1895 8.27283 11.9387 8.145C11.8344 8.09187 11.6849 8.04859 11.3926 8.02471C11.0926 8.00019 10.7044 7.99967 10.1333 7.99967H5.86667C5.29561 7.99967 4.90742 8.00019 4.60736 8.02471Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 2.3 KiB

@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M11.9999 2.51489C12.5522 2.51489 12.9999 2.96261 12.9999 3.51489V11.0002L20.4852 11.0002C21.0375 11.0002 21.4852 11.4479 21.4852 12.0002C21.4852 12.5525 21.0375 13.0002 20.4852 13.0002H12.9999V20.4855C12.9999 21.0377 12.5522 21.4855 11.9999 21.4855C11.4476 21.4855 10.9999 21.0377 10.9999 20.4855V13.0002H3.51465C2.96236 13.0002 2.51465 12.5525 2.51465 12.0002C2.51465 11.4479 2.96236 11.0002 3.51465 11.0002L10.9999 11.0002V3.51489C10.9999 2.96261 11.4476 2.51489 11.9999 2.51489Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 670 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-refresh-cw"><polyline points="23 4 23 10 17 10"></polyline><polyline points="1 20 1 14 7 14"></polyline><path d="M3.51 9a9 9 0 0 1 14.85-3.36L23 10M1 14l4.64 4.36A9 9 0 0 0 20.49 15"></path></svg>

After

Width:  |  Height:  |  Size: 400 B

@@ -0,0 +1,6 @@
<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M3.36651 2.85015C3.37578 2.85432 3.38505 2.85849 3.39431 2.86266L17.353 9.14401C17.5431 9.22954 17.7338 9.31532 17.8826 9.39905C18.0208 9.47682 18.2876 9.63803 18.4396 9.94548C18.6122 10.2947 18.6122 10.7043 18.4396 11.0535C18.2876 11.361 18.0208 11.5222 17.8826 11.5999C17.7338 11.6837 17.5431 11.7694 17.353 11.855L3.37128 18.1467C3.17613 18.2346 2.98174 18.3221 2.81784 18.3789C2.6676 18.4309 2.36452 18.5263 2.02916 18.4327C1.65046 18.327 1.34355 18.0493 1.20065 17.6831C1.07411 17.3587 1.13883 17.0476 1.17565 16.8929C1.21583 16.7242 1.28354 16.522 1.35152 16.3191L3.28934 10.5306L1.35514 4.70306C1.35194 4.69342 1.34873 4.68377 1.34553 4.67412C1.27829 4.47166 1.21126 4.26982 1.17161 4.10129C1.13521 3.94656 1.07155 3.63604 1.19844 3.31251C1.34183 2.9469 1.64871 2.66994 2.02706 2.56467C2.36186 2.47151 2.66425 2.56656 2.81444 2.61859C2.97804 2.67526 3.17198 2.76257 3.36651 2.85015ZM3.05652 4.5383L4.75852 9.66616H8.75109C9.21133 9.66616 9.58442 10.0393 9.58442 10.4995C9.58442 10.9597 9.21133 11.3328 8.75109 11.3328H4.77834L3.06259 16.458L16.3037 10.4995L3.05652 4.5383Z"
fill="#fff" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,6 @@
<svg width="20" height="21" viewBox="0 0 20 21" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M9.41009 2.41009C9.73553 2.08466 10.2632 2.08466 10.5886 2.41009L13.9219 5.74343C14.2474 6.06886 14.2474 6.5965 13.9219 6.92194C13.5965 7.24738 13.0689 7.24738 12.7434 6.92194L10.8327 5.01119V12.9993C10.8327 13.4596 10.4596 13.8327 9.99935 13.8327C9.53911 13.8327 9.16602 13.4596 9.16602 12.9993V5.01119L7.25527 6.92194C6.92984 7.24738 6.4022 7.24738 6.07676 6.92194C5.75132 6.5965 5.75132 6.06886 6.07676 5.74343L9.41009 2.41009ZM2.49935 9.66602C2.95959 9.66602 3.33268 10.0391 3.33268 10.4993V13.9993C3.33268 14.7132 3.33333 15.1984 3.36398 15.5735C3.39383 15.9388 3.44793 16.1257 3.51434 16.256C3.67413 16.5696 3.9291 16.8246 4.2427 16.9844C4.37303 17.0508 4.55987 17.1049 4.92521 17.1347C5.30029 17.1654 5.78553 17.166 6.49935 17.166H13.4993C14.2132 17.166 14.6984 17.1654 15.0735 17.1347C15.4388 17.1049 15.6257 17.0508 15.756 16.9844C16.0696 16.8246 16.3246 16.5696 16.4844 16.256C16.5508 16.1257 16.6049 15.9388 16.6347 15.5735C16.6654 15.1984 16.666 14.7132 16.666 13.9993V10.4993C16.666 10.0391 17.0391 9.66602 17.4993 9.66602C17.9596 9.66602 18.3327 10.0391 18.3327 10.4993V14.0338C18.3327 14.7046 18.3327 15.2582 18.2959 15.7092C18.2576 16.1776 18.1754 16.6082 17.9694 17.0127C17.6498 17.6399 17.1399 18.1498 16.5126 18.4694C16.1082 18.6754 15.6776 18.7576 15.2092 18.7959C14.7582 18.8327 14.2046 18.8327 13.5338 18.8327H6.46491C5.79411 18.8327 5.24049 18.8327 4.78949 18.7959C4.32108 18.7576 3.89049 18.6754 3.48605 18.4694C2.85884 18.1498 2.34891 17.6399 2.02933 17.0127C1.82325 16.6082 1.74112 16.1776 1.70284 15.7092C1.666 15.2582 1.66601 14.7046 1.66602 14.0338L1.66602 10.4993C1.66602 10.0391 2.03911 9.66602 2.49935 9.66602Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-down"><path d="M10 15v4a3 3 0 0 0 3 3l4-9V2H5.72a2 2 0 0 0-2 1.7l-1.38 9a2 2 0 0 0 2 2.3zm7-13h2.67A2.31 2.31 0 0 1 22 4v7a2.31 2.31 0 0 1-2.33 2H17"></path></svg>

After

Width:  |  Height:  |  Size: 374 B

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-thumbs-up"><path d="M14 9V5a3 3 0 0 0-3-3l-4 9v11h11.28a2 2 0 0 0 2-1.7l1.38-9a2 2 0 0 0-2-2.3zM7 22H4a2 2 0 0 1-2-2v-7a2 2 0 0 1 2-2h3"></path></svg>

After

Width:  |  Height:  |  Size: 354 B

@@ -0,0 +1,6 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd"
d="M8 3C8 2.44772 8.44772 2 9 2H15C15.5523 2 16 2.44772 16 3C16 3.55228 15.5523 4 15 4H9C8.44772 4 8 3.55228 8 3ZM4.99224 5H3C2.44772 5 2 5.44772 2 6C2 6.55228 2.44772 7 3 7H4.06445L4.70614 16.6254C4.75649 17.3809 4.79816 18.006 4.87287 18.5149C4.95066 19.0447 5.07405 19.5288 5.33109 19.98C5.73123 20.6824 6.33479 21.247 7.06223 21.5996C7.52952 21.826 8.0208 21.917 8.55459 21.9593C9.06728 22 9.69383 22 10.4509 22H13.5491C14.3062 22 14.9327 22 15.4454 21.9593C15.9792 21.917 16.4705 21.826 16.9378 21.5996C17.6652 21.247 18.2688 20.6824 18.6689 19.98C18.926 19.5288 19.0493 19.0447 19.1271 18.5149C19.2018 18.006 19.2435 17.3808 19.2939 16.6253L19.9356 7H21C21.5523 7 22 6.55228 22 6C22 5.44772 21.5523 5 21 5H19.0078C19.0019 4.99995 18.9961 4.99995 18.9903 5H5.00974C5.00392 4.99995 4.99809 4.99995 4.99224 5ZM17.9311 7H6.06889L6.69907 16.4528C6.75274 17.2578 6.78984 17.8034 6.85166 18.2243C6.9117 18.6333 6.98505 18.8429 7.06888 18.99C7.26895 19.3412 7.57072 19.6235 7.93444 19.7998C8.08684 19.8736 8.30086 19.9329 8.71286 19.9656C9.13703 19.9993 9.68385 20 10.4907 20H13.5093C14.3161 20 14.863 19.9993 15.2871 19.9656C15.6991 19.9329 15.9132 19.8736 16.0656 19.7998C16.4293 19.6235 16.7311 19.3412 16.9311 18.99C17.015 18.8429 17.0883 18.6333 17.1483 18.2243C17.2102 17.8034 17.2473 17.2578 17.3009 16.4528L17.9311 7Z"
fill="currentColor" />
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-x-circle"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>

After

Width:  |  Height:  |  Size: 346 B

@@ -0,0 +1,55 @@
import { Ref } from "react";
import { cn } from "../utils/cn";
const COMMON_CLS = cn(
"text-lg col-[1] row-[1] m-0 resize-none overflow-hidden whitespace-pre-wrap break-words border-none bg-transparent p-0"
);
export function AutosizeTextarea(props: {
id?: string;
inputRef?: Ref<HTMLTextAreaElement>;
value?: string | null | undefined;
placeholder?: string;
className?: string;
onChange?: (e: string) => void;
onFocus?: () => void;
onBlur?: () => void;
onKeyDown?: (e: React.KeyboardEvent<HTMLTextAreaElement>) => void;
autoFocus?: boolean;
readOnly?: boolean;
cursorPointer?: boolean;
disabled?: boolean;
fullHeight?: boolean;
}) {
return (
<div className={cn("grid w-full", props.className) + (props.fullHeight ? "" : " max-h-80 overflow-auto")}>
<textarea
ref={props.inputRef}
id={props.id}
className={cn(
COMMON_CLS,
"text-transparent caret-black"
)}
disabled={props.disabled}
value={props.value ?? ""}
rows={1}
onChange={(e) => {
const target = e.target as HTMLTextAreaElement;
props.onChange?.(target.value);
}}
onFocus={props.onFocus}
onBlur={props.onBlur}
placeholder={props.placeholder}
readOnly={props.readOnly}
autoFocus={props.autoFocus && !props.readOnly}
onKeyDown={props.onKeyDown}
/>
<div
aria-hidden
className={cn(COMMON_CLS, "pointer-events-none select-none")}
>
{props.value}{" "}
</div>
</div>
);
}
@@ -0,0 +1,118 @@
import { useState } from "react";
import { CorrectnessFeedback } from "./feedback/CorrectnessFeedback";
import { resolveApiUrl } from "../utils/url";
import { AutosizeTextarea } from "./AutosizeTextarea";
import TrashIcon from "../assets/TrashIcon.svg?react";
import RefreshCW from "../assets/RefreshCW.svg?react";
export type ChatMessageType = "human" | "ai" | "function" | "tool" | "system";
export type ChatMessageBody = {
type: ChatMessageType;
content: string;
runId?: string;
}
export function ChatMessage(props: {
message: ChatMessageBody;
isLoading?: boolean;
onError?: (e: any) => void;
onTypeChange?: (newValue: string) => void;
onChange?: (newValue: string) => void;
onRemove?: (e: any) => void;
onRegenerate?: (e?: any) => void;
isFinalMessage?: boolean;
feedbackEnabled?: boolean;
publicTraceLinksEnabled?: boolean;
}) {
const { message, feedbackEnabled, publicTraceLinksEnabled, onError, isLoading } = props;
const { content, type, runId } = message;
const [publicTraceLink, setPublicTraceLink] = useState<string | null>(null);
const [messageActionIsLoading, setMessageActionIsLoading] = useState(false);
const openPublicTrace = async () => {
if (messageActionIsLoading) {
return;
}
if (publicTraceLink) {
window.open(publicTraceLink, '_blank');
return;
}
setMessageActionIsLoading(true);
const payload = { run_id: runId };
const response = await fetch(resolveApiUrl("/public_trace_link"), {
method: "PUT",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
if (!response.ok) {
if (response.status === 404) {
onError?.(new Error(`Feedback endpoint not found. Please enable it in your LangServe endpoint.`));
} else {
try {
const errorResponse = await response.json();
onError?.(new Error(`${errorResponse.detail}`));
} catch (e) {
onError?.(new Error(`Request failed with status: ${response.status}`));
}
}
setMessageActionIsLoading(false);
throw new Error(`Failed request ${response.status}`)
}
const parsedResponse = await response.json();
setMessageActionIsLoading(false);
setPublicTraceLink(parsedResponse.public_url);
window.open(parsedResponse.public_url, '_blank');
};
return (
<div className="mb-8 group">
<div className="flex justify-between">
<select
className="font-medium text-transform uppercase mb-2 appearance-none"
defaultValue={type}
onChange={(e) => props.onTypeChange?.(e.target.value)}
>
<option value="human">HUMAN</option>
<option value="ai">AI</option>
<option value="system">SYSTEM</option>
</select>
<span className="flex">
{props.isFinalMessage &&
type === "human" &&
<RefreshCW className="opacity-0 group-hover:opacity-50 transition-opacity duration-200 cursor-pointer h-4 w-4 mr-2" onMouseUp={props.onRegenerate}></RefreshCW>}
<TrashIcon
className="opacity-0 group-hover:opacity-50 transition-opacity duration-200 cursor-pointer h-4 w-4"
onMouseUp={props.onRemove}
></TrashIcon>
</span>
</div>
<AutosizeTextarea value={content} fullHeight={true} onChange={props.onChange} onKeyDown={(e) => {
if (
e.key === 'Enter' &&
!e.shiftKey &&
props.isFinalMessage &&
type === "human"
) {
e.preventDefault();
props.onRegenerate?.();
}
}}></AutosizeTextarea>
{type === "ai" && !isLoading && runId != null && (
<div className="mt-2 flex items-center">
{feedbackEnabled && <span className="mr-2"><CorrectnessFeedback runId={runId} onError={props.onError}></CorrectnessFeedback></span>}
{publicTraceLinksEnabled && <>
<button
className="bg-button-inline p-2 rounded-lg text-xs font-medium hover:opacity-80"
disabled={messageActionIsLoading || isLoading}
onMouseUp={openPublicTrace}
>
🛠 View LangSmith trace
</button>
</>}
</div>
)}
</div>
)
};
@@ -0,0 +1,217 @@
import { useState, useRef } from "react";
import { ToastContainer, toast } from 'react-toastify';
import 'react-toastify/dist/ReactToastify.css';
import { AutosizeTextarea } from "./AutosizeTextarea";
import {
ChatMessage,
type ChatMessageType,
type ChatMessageBody,
} from "./ChatMessage";
import { ShareDialog } from "./ShareDialog";
import { useStreamCallback } from "../useStreamCallback";
import ArrowUp from "../assets/ArrowUp.svg?react";
import CircleSpinIcon from "../assets/CircleSpinIcon.svg?react";
import EmptyState from "../assets/EmptyState.svg?react";
import LangServeLogo from "../assets/LangServeLogo.svg?react";
import { useFeedback, usePublicTraceLink } from "../useSchemas";
export type AIMessage = {
content: string;
type: "AIMessage" | "AIMessageChunk";
name?: string;
additional_kwargs?: { [key: string]: unknown };
}
export function isAIMessage(x: unknown): x is AIMessage {
return x != null &&
typeof (x as AIMessage).content === "string" &&
["AIMessageChunk", "AIMessage"].includes((x as AIMessage).type);
}
export function ChatWindow(props: {
startStream: (input: unknown, config: unknown) => Promise<void>;
stopStream: (() => void) | undefined;
messagesInputKey: string;
inputKey?: string;
}) {
const { startStream, messagesInputKey, inputKey } = props;
const [currentInputValue, setCurrentInputValue] = useState("");
const [isLoading, setIsLoading] = useState(false);
const [messages, setMessages] = useState<ChatMessageBody[]>([]);
const messageInputRef = useRef<HTMLTextAreaElement>(null);
const feedbackEnabled = useFeedback()
const publicTraceLinksEnabled = usePublicTraceLink();
const submitMessage = () => {
const submittedValue = currentInputValue;
if (submittedValue.length === 0 || isLoading) {
return;
}
setIsLoading(true);
const newMessages = [
...messages,
{ type: "human", content: submittedValue } as const
];
setMessages(newMessages);
setCurrentInputValue("");
// TODO: Add config schema support
if (inputKey === undefined) {
startStream({ [messagesInputKey]: newMessages }, {});
} else {
startStream({
[messagesInputKey]: newMessages.slice(0, -1),
[inputKey]: newMessages[newMessages.length - 1].content
}, {});
}
};
const regenerateMessages = () => {
if (isLoading) {
return;
}
setIsLoading(true);
// TODO: Add config schema support
if (inputKey === undefined) {
startStream({ [messagesInputKey]: messages }, {});
} else {
startStream({
[messagesInputKey]: messages.slice(0, -1),
[inputKey]: messages[messages.length - 1].content
}, {});
}
};
useStreamCallback("onStart", () => {
setMessages((prevMessages) => [
...prevMessages,
{ type: "ai", content: "" },
]);
});
useStreamCallback("onChunk", (_chunk, aggregatedState) => {
const finalOutput = aggregatedState?.final_output;
if (typeof finalOutput === "string") {
setMessages((prevMessages) => [
...prevMessages.slice(0, -1),
{ type: "ai", content: finalOutput, runId: aggregatedState?.id }
]);
} else if (isAIMessage(finalOutput)) {
setMessages((prevMessages) => [
...prevMessages.slice(0, -1),
{ type: "ai", content: finalOutput.content, runId: aggregatedState?.id }
]);
}
});
useStreamCallback("onSuccess", () => {
setIsLoading(false);
});
useStreamCallback("onError", (e) => {
setIsLoading(false);
toast(e.message + "\nCheck your backend logs for errors.", { hideProgressBar: true });
setCurrentInputValue(messages[messages.length - 2]?.content);
setMessages((prevMessages) => [
...prevMessages.slice(0, -2),
]);
});
return (
<div className="flex flex-col h-screen w-screen">
<nav className="flex items-center justify-between p-8">
<div className="flex items-center">
<LangServeLogo />
<span className="ml-1">Playground</span>
</div>
<div className="flex items-center space-x-4">
<ShareDialog config={{}}>
<button
type="button"
className="px-3 py-1 border rounded-full px-8 py-2 share-button"
>
<span>Share</span>
</button>
</ShareDialog>
</div>
</nav>
<div className="flex-grow flex flex-col items-center justify-center mt-8">
{messages.length > 0 ? (
<div className="flex flex-col-reverse basis-0 overflow-auto flex-re grow max-w-[640px] w-[640px]">
{messages.map((message, i) => {
return (
<ChatMessage
message={message}
key={i}
isLoading={isLoading}
onError={(e: any) => toast(e.message, { hideProgressBar: true })}
feedbackEnabled={feedbackEnabled.data}
publicTraceLinksEnabled={publicTraceLinksEnabled.data}
isFinalMessage={i === messages.length - 1}
onRemove={() => setMessages(
(previousMessages) => [...previousMessages.slice(0, i), ...previousMessages.slice(i + 1)]
)}
onTypeChange={(newValue) => {
setMessages(
(previousMessages) => [
...previousMessages.slice(0, i),
{...message, type: newValue as ChatMessageType},
...previousMessages.slice(i + 1)
]
)
}}
onChange={(newValue) => {
setMessages(
(previousMessages) => [
...previousMessages.slice(0, i),
{...message, content: newValue},
...previousMessages.slice(i + 1)
]
);
}}
onRegenerate={() => regenerateMessages()}
></ChatMessage>
);
}).reverse()}
</div>
) : (
<div className="flex flex-col items-center justify-center">
<EmptyState />
<h1 className="text-lg">Start testing your application</h1>
</div>
)}
</div>
<div className="m-16 mt-4 flex justify-center">
<div className="flex items-center p-3 rounded-[48px] border shadow-sm max-w-[768px] grow" onClick={() => messageInputRef.current?.focus()}>
<AutosizeTextarea
inputRef={messageInputRef}
className="flex-grow mr-4 ml-8 border-none focus:ring-0 py-2 cursor-text"
placeholder="Send a message..."
value={currentInputValue}
onChange={(newValue) => {
setCurrentInputValue(newValue);
}}
onKeyDown={(e) => {
if (e.key === 'Enter' && !e.shiftKey) {
e.preventDefault();
submitMessage();
}
}}
/>
<button
className={"flex items-center justify-center px-3 py-1 rounded-[40px] " + (isLoading ? "" : currentInputValue.length > 0 ? "bg-button-green" : "bg-button-green-disabled")}
onClick={(e) => {
e.preventDefault();
submitMessage();
}}
>
{isLoading
? <CircleSpinIcon className="animate-spin w-5 h-5 text-background fill-background" />
: <ArrowUp className="mx-2 my-2 h-5 w-5 stroke-white" />}
</button>
</div>
</div>
<ToastContainer />
</div>
)
}
@@ -0,0 +1,141 @@
import { Drawer } from "vaul";
import { ReactNode, useEffect, useMemo, useRef, useState } from "react";
import CheckCircleIcon from "../assets/CheckCircleIcon.svg?react";
import CodeIcon from "../assets/CodeIcon.svg?react";
import CopyIcon from "../assets/CopyIcon.svg?react";
import PadlockIcon from "../assets/PadlockIcon.svg?react";
import ShareIcon from "../assets/ShareIcon.svg?react";
import { compressToEncodedURIComponent } from "lz-string";
import { getStateFromUrl } from "../utils/url";
const URL_LENGTH_LIMIT = 2000;
function CopyButton(props: { value: string }) {
const [copied, setCopied] = useState(false);
const cbRef = useRef<number | null>(null);
function toggleCopied() {
setCopied(true);
if (cbRef.current != null) window.clearTimeout(cbRef.current);
cbRef.current = window.setTimeout(() => setCopied(false), 1500);
}
useEffect(() => {
return () => {
if (cbRef.current != null) {
window.clearTimeout(cbRef.current);
}
};
}, []);
return (
<button
className="px-3 py-1"
onClick={() => {
navigator.clipboard.writeText(props.value).then(toggleCopied);
}}
>
{copied ? <CheckCircleIcon /> : <CopyIcon />}
</button>
);
}
export function ShareDialog(props: { config: unknown; children: ReactNode }) {
const hash = useMemo(() => {
return compressToEncodedURIComponent(JSON.stringify(props.config));
}, [props.config]);
const state = getStateFromUrl(window.location.href);
// get base URL
const targetUrl = `${state.basePath}/c/${hash}`;
// .../c/[hash]/playground
const playgroundUrl = `${targetUrl}/playground`;
// cURL, JS: .../c/[hash]/invoke
// Python: .../c/[hash]
const invokeUrl = `${targetUrl}/invoke`;
const pythonSnippet = `
from langserve import RemoteRunnable
chain = RemoteRunnable("${targetUrl}")
chain.invoke({ ... })
`;
const typescriptSnippet = `
import { RemoteRunnable } from "langchain/runnables/remote";
const chain = new RemoteRunnable({ url: \`${invokeUrl}\` });
const result = await chain.invoke({ ... });
`;
return (
<Drawer.Root>
<Drawer.Trigger asChild>{props.children}</Drawer.Trigger>
<Drawer.Portal>
<Drawer.Overlay className="fixed inset-0 bg-black/40" />
<Drawer.Content className="flex justify-center items-center mt-24 fixed bottom-0 left-0 right-0 !pointer-events-none after:!bg-background">
<div className="p-4 bg-background max-w-[calc(800px-2rem)] rounded-t-2xl border border-divider-500 border-b-background pointer-events-auto">
<h3 className="flex items-center text-lg font-light">
<ShareIcon className="flex-shrink-0 mr-2" />
<span>Share</span>
</h3>
<hr className="border-divider-500 my-4 -mx-4" />
<div className="flex flex-col gap-3">
{playgroundUrl.length < URL_LENGTH_LIMIT && (
<div className="flex flex-col gap-2 p-3 rounded-2xl">
<div className="flex items-center">
<div className="w-10 h-10 flex items-center justify-center text-center text-sm bg-background rounded-xl">
🦜
</div>
<span>Chat interface</span>
</div>
<div className="grid grid-cols-[auto,1fr,auto] rounded-xl text-sm items-center border">
<PadlockIcon className="mx-3" />
<div className="overflow-auto whitespace-nowrap py-3 no-scrollbar">
{playgroundUrl.split("://")[1]}
</div>
<CopyButton value={playgroundUrl} />
</div>
</div>
)}
<div className="flex flex-col gap-2 p-3 rounded-2xl">
<div className="flex items-center">
<div className="w-10 h-10 flex items-center justify-center text-center text-sm bg-background rounded-xl">
<CodeIcon className="w-4 h-4" />
</div>
<span>Get the code</span>
</div>
{targetUrl.length < URL_LENGTH_LIMIT && (
<div className="grid grid-cols-[1fr,auto] rounded-xl text-sm items-center border">
<div className="overflow-auto whitespace-nowrap px-3 py-3 no-scrollbar">
Python SDK
</div>
<CopyButton value={pythonSnippet.trim()} />
</div>
)}
{invokeUrl.length < URL_LENGTH_LIMIT && (
<div className="grid grid-cols-[1fr,auto] rounded-xl text-sm items-center border">
<div className="overflow-auto whitespace-nowrap px-3 py-3 no-scrollbar">
TypeScript SDK
</div>
<CopyButton value={typescriptSnippet.trim()} />
</div>
)}
</div>
</div>
</div>
</Drawer.Content>
</Drawer.Portal>
</Drawer.Root>
);
}
@@ -0,0 +1,102 @@
import { toast } from "react-toastify";
import ThumbsUpIcon from "../../assets/ThumbsUpIcon.svg?react";
import ThumbsDownIcon from "../../assets/ThumbsDownIcon.svg?react";
import CircleSpinIcon from "../../assets/CircleSpinIcon.svg?react";
import CheckCircleIcon2 from "../../assets/CheckCircleIcon2.svg?react";
import XCircle from "../../assets/XCircle.svg?react";
import { resolveApiUrl } from "../../utils/url";
import { useState } from "react";
import useSWRMutation from "swr/mutation";
const useFeedbackMutation = (runId: string, onError?: (e: any) => void) => {
interface FeedbackArguments {
key: string;
score: number;
}
const [lastArg, setLastArg] = useState<FeedbackArguments | null>(null);
const mutation = useSWRMutation(
["feedback", runId],
async ([, runId], { arg }: { arg: FeedbackArguments }) => {
const payload = { run_id: runId, key: arg.key, score: arg.score };
setLastArg(arg);
const request = await fetch(resolveApiUrl("/feedback"), {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify(payload),
});
if (!request.ok) {
if (request.status === 404) {
onError?.(new Error(`Feedback endpoint not found. Please enable it in your LangServe endpoint.`));
} else {
try {
const errorResponse = await request.json();
onError?.(new Error(`${errorResponse.detail}`));
} catch (e) {
onError?.(new Error(`Request failed with status: ${request.status}`));
}
}
throw new Error(`Failed request ${request.status}`)
}
const json: {
id: string;
score: number;
} = await request.json();
toast("Feedback sent successfully!", { hideProgressBar: true });
return json;
}
);
return { lastArg: mutation.isMutating ? lastArg : null, mutation };
};
export function CorrectnessFeedback(props: { runId: string, onError?: (e: any) => void }) {
const score = useFeedbackMutation(props.runId, props.onError);
if (props.runId == null) return null;
return (
<>
<button
type="button"
className={"bg-background rounded p-1 hover:opacity-80"}
disabled={score.mutation.isMutating}
onClick={() => {
if (score.mutation.data?.score !== 1) {
score.mutation.trigger({ key: "correctness", score: 1 });
}
}}
>
{score.lastArg?.score === 1 ? (
<CircleSpinIcon className="animate-spin w-4 h-4 text-white/50 fill-white" />
) : (
(score.mutation.data?.score !== 1
? <ThumbsUpIcon className="w-4 h-4" />
: <CheckCircleIcon2 className="w-4 h-4 stroke-teal-500" />)
)}
</button>
<button
type="button"
className={"bg-background rounded p-1 hover:opacity-80"}
disabled={score.mutation.isMutating}
onClick={() => {
if (score.mutation.data?.score !== 0) {
score.mutation.trigger({ key: "correctness", score: 0 });
}
}}
>
{score.lastArg?.score === 0 ? (
<CircleSpinIcon className="animate-spin w-4 h-4 text-white/50 fill-white" />
) : (
(score.mutation.data?.score !== 0
? <ThumbsDownIcon className="w-4 h-4" />
: <XCircle className="w-4 h-4 stroke-red-500" />)
)}
</button>
</>
);
}
+11
View File
@@ -0,0 +1,11 @@
import ReactDOM from "react-dom/client";
import App from "./App.tsx";
import dayjs from "dayjs";
import utc from "dayjs/plugin/utc";
import relativeDate from "dayjs/plugin/relativeTime";
dayjs.extend(relativeDate);
dayjs.extend(utc);
ReactDOM.createRoot(document.getElementById("root")!).render(<App />);
+9
View File
@@ -0,0 +1,9 @@
import type { Operation } from "fast-json-patch";
import type { RunState } from "./useStreamLog";
export interface StreamCallback {
onSuccess?: (ctx: { input: unknown; output: unknown }) => void;
onChunk?: (chunk: { ops?: Operation[] }, aggregatedState: RunState | null) => void;
onError?: (error: any) => void;
onStart?: (ctx: { input: unknown }) => void;
}
@@ -0,0 +1,131 @@
import { JsonSchema } from "@jsonforms/core";
import { compressToEncodedURIComponent } from "lz-string";
import { resolveApiUrl } from "./utils/url";
import { simplifySchema } from "./utils/simplifySchema";
import useSWR from "swr";
import defaults from "./utils/defaults";
declare global {
interface Window {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
CONFIG_SCHEMA?: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
INPUT_SCHEMA?: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
OUTPUT_SCHEMA?: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
FEEDBACK_ENABLED?: any;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
PUBLIC_TRACE_LINK_ENABLED?: any;
}
}
export function useFeedback() {
return useSWR(["/feedback"], async () => {
if (!import.meta.env.DEV && window.FEEDBACK_ENABLED) {
return window.FEEDBACK_ENABLED === "true";
}
const response = await fetch(resolveApiUrl("/feedback"), {
method: "HEAD",
});
return response.ok;
});
}
export function usePublicTraceLink() {
return useSWR(["/public_trace_link"], async () => {
if (!import.meta.env.DEV && window.PUBLIC_TRACE_LINK_ENABLED) {
return window.PUBLIC_TRACE_LINK_ENABLED === "true";
}
const response = await fetch(resolveApiUrl("/public_trace_link"), {
method: "HEAD",
});
return response.ok;
});
}
export function useConfigSchema() {
return useSWR(["/config_schema"], async () => {
let schema: JsonSchema | null = null;
if (!import.meta.env.DEV && window.CONFIG_SCHEMA) {
schema = await simplifySchema(window.CONFIG_SCHEMA);
} else {
const response = await fetch(resolveApiUrl(`/config_schema`));
if (!response.ok) throw new Error(await response.text());
const json = await response.json();
schema = await simplifySchema(json);
}
if (schema == null) return null;
return {
schema,
defaults: defaults(schema),
};
});
}
export function useInputSchema(configData?: unknown) {
return useSWR(
["/input_schema", configData],
async ([, configData]) => {
// TODO: this won't work if we're already seeing a prefixed URL
const prefix = configData
? `/c/${compressToEncodedURIComponent(JSON.stringify(configData))}`
: "";
let schema: JsonSchema | null = null;
if (!prefix && !import.meta.env.DEV && window.INPUT_SCHEMA) {
schema = await simplifySchema(window.INPUT_SCHEMA);
} else {
const response = await fetch(resolveApiUrl(`${prefix}/input_schema`));
if (!response.ok) throw new Error(await response.text());
const json = await response.json();
schema = await simplifySchema(json);
}
if (schema == null) return null;
return {
schema,
defaults: defaults(schema),
};
},
{ keepPreviousData: true }
);
}
export function useOutputSchema(configData?: unknown) {
return useSWR(
["/output_schema", configData],
async ([, configData]) => {
// TODO: this won't work if we're already seeing a prefixed URL
const prefix = configData
? `/c/${compressToEncodedURIComponent(JSON.stringify(configData))}`
: "";
let schema: JsonSchema | null = null;
if (!prefix && !import.meta.env.DEV && window.OUTPUT_SCHEMA) {
schema = await simplifySchema(window.OUTPUT_SCHEMA);
} else {
const response = await fetch(resolveApiUrl(`${prefix}/output_schema`));
if (!response.ok) throw new Error(await response.text());
const json = await response.json();
schema = await simplifySchema(json);
}
if (schema == null) return null;
return {
schema,
defaults: defaults(schema),
};
},
{ keepPreviousData: true }
);
}
@@ -0,0 +1,78 @@
import {
MutableRefObject,
createContext,
useContext,
useEffect,
useRef,
} from "react";
import { StreamCallback } from "./types";
export const AppCallbackContext = createContext<MutableRefObject<{
onStart: Exclude<StreamCallback["onStart"], undefined>[];
onChunk: Exclude<StreamCallback["onChunk"], undefined>[];
onSuccess: Exclude<StreamCallback["onSuccess"], undefined>[];
onError: Exclude<StreamCallback["onError"], undefined>[];
}> | null>(null);
export function useAppStreamCallbacks() {
// callbacks handling
const context = useRef<{
onStart: Exclude<StreamCallback["onStart"], undefined>[];
onChunk: Exclude<StreamCallback["onChunk"], undefined>[];
onSuccess: Exclude<StreamCallback["onSuccess"], undefined>[];
onError: Exclude<StreamCallback["onError"], undefined>[];
}>({ onStart: [], onChunk: [], onSuccess: [], onError: [] });
const callbacks: StreamCallback = {
onStart(...args) {
for (const callback of context.current.onStart) {
callback(...args);
}
},
onChunk(...args) {
for (const callback of context.current.onChunk) {
callback(...args);
}
},
onSuccess(...args) {
for (const callback of context.current.onSuccess) {
callback(...args);
}
},
onError(...args) {
for (const callback of context.current.onError) {
callback(...args);
}
},
};
return { context, callbacks };
}
export function useStreamCallback<
Type extends "onStart" | "onChunk" | "onSuccess" | "onError"
>(type: Type, callback: Exclude<StreamCallback[Type], undefined>) {
type CallbackType = Exclude<StreamCallback[Type], undefined>;
const appCbRef = useContext(AppCallbackContext);
const callbackRef = useRef<CallbackType>(callback);
callbackRef.current = callback;
useEffect(() => {
// @ts-expect-error Not sure why I can't expand the tuple
const current = (...args) => callbackRef.current?.(...args);
appCbRef?.current[type].push(current);
return () => {
if (!appCbRef) return;
// @ts-expect-error Assingability issues due to the tuple object
// eslint-disable-next-line react-hooks/exhaustive-deps
appCbRef.current[type] = appCbRef.current[type].filter(
(callbacks) => callbacks !== current
);
};
}, [type, appCbRef]);
}

Some files were not shown because too many files have changed in this diff Show More