diff --git a/tests/streaming/models/test_transcript.py b/tests/streaming/models/test_transcript.py new file mode 100644 index 000000000..66dc23818 --- /dev/null +++ b/tests/streaming/models/test_transcript.py @@ -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 du@de.com" + ), + ActionStart( + action_type="action_nylas_send_email", + action_input=TwilioPhoneCallActionOutput( + action_config=NylasSendEmailActionConfig(), + conversation_id="123", + params=NylasSendEmailParameters( + recipient_email="du@de.com", + body="What up", + subject="This is the bot" + ), + user_message_tracker=asyncio.Event() + ), + ), + ActionFinish( + action_type="action_nylas_send_email", + action_output=ActionOutput( + + ) + ) + ] + ) \ No newline at end of file