Skip to content

Commit

Permalink
updated VonageCallStateManager and TwilioCallStateManager to use getters
Browse files Browse the repository at this point in the history
  • Loading branch information
rjheeta committed May 18, 2024
1 parent ab6a8ad commit 833ae2c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
4 changes: 2 additions & 2 deletions vocode/streaming/action/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ async def process(self, item: InterruptibleEvent[ActionInput]):
action_input=action_input,
action_output=action_output,
vonage_uuid=(
self.conversation_state_manager._call.vonage_uuid
self.conversation_state_manager.get_vonage_uuid()
if isinstance(self.conversation_state_manager, VonageCallStateManager)
else None
),
twilio_sid=(
self.conversation_state_manager._call.twilio_sid
self.conversation_state_manager.get_twilio_sid()
if isinstance(self.conversation_state_manager, TwilioCallStateManager)
else None
),
Expand Down
6 changes: 6 additions & 0 deletions vocode/streaming/utils/state_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,14 @@ def __init__(self, call: "VonageCall"):
super().__init__(call)
self._call = call

def get_vonage_uuid(self) -> str:
return self._call.vonage_uuid


class TwilioCallStateManager(ConversationStateManager):
def __init__(self, call: "TwilioCall"):
super().__init__(call)
self._call = call

def get_twilio_sid(self) -> str:
return self._call.twilio_sid

0 comments on commit 833ae2c

Please sign in to comment.