Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to send_event to a Worfklow's service ongoing task/run. #330

Merged
merged 8 commits into from
Oct 22, 2024

Conversation

nerdai
Copy link
Contributor

@nerdai nerdai commented Oct 18, 2024

With current implementation:

  • User sends event via client.send_event(task_id, session_id, event_def)
  • EventDefinition contains event_obj_str which is serialized representation of event as well as agent_id
  • Within the execution of the Workflow, that is under WorkflowService.process_call a background asyncio Task is spawned that deals with passing events to the Workflow.

Testing:

  • a new e2e test is added
  • a new unit test to workflow_service has been added

@coveralls
Copy link

coveralls commented Oct 21, 2024

Coverage Status

coverage: 65.613% (+0.1%) from 65.5%
when pulling aaca655 on nerdai/add-send_event-to-sessionclient
into 73ea594 on main.

@nerdai nerdai force-pushed the nerdai/add-send_event-to-sessionclient branch from c6686fc to 478204d Compare October 21, 2024 23:15
@nerdai nerdai marked this pull request as ready for review October 21, 2024 23:15
Copy link
Collaborator

@logan-markewich logan-markewich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a pretty straightforward change, I don't have any issues with this!

Thanks for adding tests 🙏🏻

@nerdai nerdai merged commit 3c8410b into main Oct 22, 2024
10 checks passed
@nerdai nerdai deleted the nerdai/add-send_event-to-sessionclient branch October 22, 2024 15:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add send_event method to SessionClient (to enable a user to do the equivalent of ctx.send_event(ev))
3 participants