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

adjust ActionWorker to read twilio ID from the convo state manager #611

Closed

Conversation

rjheeta
Copy link
Contributor

@rjheeta rjheeta commented Jul 5, 2024

In certain cases, the ActionWorker class does not correctly pass the twilio_sid or vonage_uuid. This is because the action_input is not always a reliable source of truth for obtaining these vars. Instead, this fix uses ConversationStateManager which is a more reliable method to obtaining these variables.

See 550 for full details

@@ -5,12 +5,12 @@
from vocode.streaming.action.abstract_factory import AbstractActionFactory
Copy link
Contributor

Choose a reason for hiding this comment

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

do we need the changes in this file?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I found that, action_input.twilio_sid was not reliably returning the Twilio SID the way self.conversation_state_manager was.

So the change in state_manager.py was to expose the Twilio SID, and the subsequent change in worker.py is to modify the ActionWorker.process method to use conversation_state_manager to get the SID instead of the action_input

Does something look off with that logic / approach?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sorry, I see what you mean - there were some unintended changes to this, as I used an older copy as a reference. The intention was only to modify the part that reads the twilio (and vonage) ID form the convo state manager. Let me correct that!

@rjheeta rjheeta closed this Jul 6, 2024
@rjheeta rjheeta force-pushed the fix-action-worker-twilio-sid-capture branch from 53a2c0f to 6b41941 Compare July 6, 2024 11:17
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