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

feat: Add per-agent locking to send message #2109

Merged
merged 4 commits into from
Nov 26, 2024
Merged

Conversation

mattzh72
Copy link
Collaborator

Description

This is a short-term fix for send_message. If multiple send_message calls are sent, due to some state in the interface, it errors. This prevents multiple send_message calls from executing at the same time for the same agent.

Testing

We write a test simulating concurrent send_message requests. Without the changes in this PR, it errors:

FAILED tests/test_client.py::test_send_message_parallel[client0] - Failed: Task 0 failed with exception: Failed to send message: {"detail":"Generator is inactive"}

@mattzh72 mattzh72 changed the title feat: Add locking to send message feat: Add per-agent locking to send message Nov 26, 2024
@mattzh72 mattzh72 merged commit c2ee91c into main Nov 26, 2024
29 of 30 checks passed
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.

2 participants