-
Notifications
You must be signed in to change notification settings - Fork 493
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
11 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,14 @@ | ||
from vocode.streaming.action.base_action import BaseAction | ||
from vocode.streaming.action.nylas_send_email import NylasSendEmail | ||
from vocode.streaming.action.transfer_call import TransferCall | ||
from vocode.streaming.models.actions import ActionType | ||
|
||
|
||
class ActionFactory: | ||
def create_action(self, action_type: str) -> BaseAction: | ||
if action_type == ActionType.NYLAS_SEND_EMAIL: | ||
return NylasSendEmail(should_respond=True) | ||
elif action_type == ActionType.TRANSFER_CALL: | ||
return TransferCall(to_phone="+15555555555") | ||
else: | ||
raise Exception("Invalid action type") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters