mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-16 09:34:30 -04:00
[PR #361] [MERGED] Add ability to pass path dependencies through add_routes #516
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/langchain-ai/langserve/pull/361
Author: @eyurtsev
Created: 1/3/2024
Status: ✅ Merged
Merged: 1/3/2024
Merged by: @eyurtsev
Base:
main← Head:eugene/expose_dependencies📝 Commits (6)
4aacd6cxaca37a3x3620a60make test more robust74f5a10xbf9e65bx5e6e60cx📊 Changes
3 files changed (+210 additions, -24 deletions)
View changed files
➕
examples/auth/path_dependencies/server.py(+50 -0)📝
langserve/server.py(+63 -15)📝
tests/unit_tests/test_server_client.py(+97 -9)📄 Description
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 privilegies.
https://github.com/langchain-ai/langserve/issues/354
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.