mirror of
https://github.com/langchain-ai/langserve.git
synced 2026-07-18 19:04:27 -04:00
[PR #88] [MERGED] Add callback events from server #337
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/88
Author: @eyurtsev
Created: 10/23/2023
Status: ✅ Merged
Merged: 10/23/2023
Merged by: @eyurtsev
Base:
main← Head:eugene/add_server_side_callbacks📝 Commits (4)
4a24416x7de47aax5edb3a0x1ab54c5x📊 Changes
7 files changed (+792 additions, -90 deletions)
View changed files
➕
langserve/callbacks.py(+360 -0)📝
langserve/client.py(+22 -18)📝
langserve/serialization.py(+41 -28)📝
langserve/server.py(+107 -20)📝
langserve/validation.py(+194 -1)📝
tests/unit_tests/test_serialization.py(+8 -4)📝
tests/unit_tests/test_server_client.py(+60 -19)📄 Description
This PR allows the server to send callback events to the client.
Limited to the invoke and batch end points for the time being.
This PR does NOT include the client code to use the events (will be included
in a separate PR to keep things simple).
Also updating the serializer to use an interface -- placeholder for future code
to accommodate user adding their own custom pydantic objects.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.