mirror of
https://github.com/run-llama/llama_deploy.git
synced 2026-08-24 21:01:26 -04:00
[PR #541] [MERGED] Add an option to get raw serialized event in event stream #538
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/run-llama/llama_deploy/pull/541
Author: @leehuwuj
Created: 6/16/2025
Status: ✅ Merged
Merged: 6/17/2025
Merged by: @masci
Base:
main← Head:lee/serialize-event📝 Commits (4)
0f22c7cuse JsonSerializer to serialize whole event object853d917update api document8b27f0ffix wrong event type04ca51afix e2e tests and linting issue📊 Changes
5 files changed (+66 additions, -16 deletions)
View changed files
📝
docs/docs/module_guides/llama_deploy/apiserver.json(+1 -1)📝
e2e_tests/basic_streaming/test_run_client.py(+6 -4)📝
llama_deploy/apiserver/routers/deployments.py(+15 -3)📝
llama_deploy/services/workflow.py(+2 -1)📝
tests/apiserver/routers/test_deployments.py(+42 -7)📄 Description
Use the default llamaindex's JsonSerializer to serialize whole event object and send to event stream instead of just event data.
We have the same format of format when receiving and sending event to external system (as we are also using it in sending API, so it makes sense to me to have the same format in receiving API).
The format doesn't look nice for external system with unnecessary fields like
__is_pydanticorqualified_name.-> I think later on we can consider using a mapping to map the name with qualified name and store the mapping in deployment file or workflow context? Then we can get rid of the
__is_pydanticandqualified_nameFor backward compatibility, I added a new flag to the
/{deployment_name}/tasks/{task_id}/eventsAPI that the user can choose whether they want to get raw event or not.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.