-
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
1 changed file
with
42 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,42 @@ | ||
|
||
import asyncio | ||
from vocode.streaming.models.actions import ActionInput | ||
from vocode.streaming.models.transcript import ActionStart, ActionFinish | ||
from vocode.streaming.models.events import Sender | ||
from vocode.streaming.models.transcript import Message | ||
from vocode.streaming.models.transcript import Transcript | ||
from vocode.streaming.action.nylas_send_email import NylasSendEmailActionConfig, NylasSendEmailParameters | ||
|
||
|
||
def test_transcript_to_string(): | ||
transcript = Transcript( | ||
event_logs=[ | ||
Message( | ||
sender=Sender.BOT, | ||
text="What up" | ||
), | ||
Message( | ||
sender=Sender.HUMAN, | ||
text="Send me an email you bot. My email is [email protected]" | ||
), | ||
ActionStart( | ||
action_type="action_nylas_send_email", | ||
action_input=TwilioPhoneCallActionOutput( | ||
action_config=NylasSendEmailActionConfig(), | ||
conversation_id="123", | ||
params=NylasSendEmailParameters( | ||
recipient_email="[email protected]", | ||
body="What up", | ||
subject="This is the bot" | ||
), | ||
user_message_tracker=asyncio.Event() | ||
), | ||
), | ||
ActionFinish( | ||
action_type="action_nylas_send_email", | ||
action_output=ActionOutput( | ||
|
||
) | ||
) | ||
] | ||
) |