Datasets:

Modalities:
Text
Formats:
csv
Size:
< 1K
Libraries:
Datasets
pandas
text
stringlengths
43
210
test
stringlengths
532
6.45k
imports
stringclasses
2 values
guid
stringlengths
36
36
Check the availability of Pepsi at Walmart and also check it at Walgreens.
# test data data_model = DataModel(reset=True) data_product_name_pepsi = ProductName(text="Pepsi") data_model.append(data_product_name_pepsi) data_product_name_coca = ProductName(text="coca cola") data_model.append(data_product_name_coca) data_location1 = Location(text="Walmart") data_model.append(data_location1) data_location2 = Location(text="Walgreens") data_model.append(data_location2) data_location3 = Location(text="CVS") data_model.append(data_location3) data_product1 = ProductEntity( product_name=data_product_name_pepsi, location=data_location1 ) data_model.append(data_product1) data_product2 = ProductEntity( product_name=data_product_name_pepsi, location=data_location2 ) data_model.append(data_product2) data_product3 = ProductEntity( product_name=data_product_name_coca, location=data_location1 ) data_model.append(data_product3) data_product4 = ProductEntity( product_name=data_product_name_coca, location=data_location2 ) data_model.append(data_product4) data_product5 = ProductEntity( product_name=data_product_name_pepsi, location=data_location3 ) data_model.append(data_product5) data_product6 = ProductEntity( product_name=data_product_name_pepsi, location=data_location1 ) data_model.append(data_product6) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([ProductEntity])) expected = [data_product1, data_product6] actual = next(iterator, None) response_assertions(expected, actual, test_results) expected = [data_product2] actual = next(iterator, None) response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
b6589fc6-ab0d-c82c-f120-99d1c2d40ab9
If it's raining tomorrow morning, set my alarm for 7:30, if it's not, set my alarm for 8.
# test data data_model = DataModel(reset=True) data_date_time = DateTime( text="tomorrow morning", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time) data_weather_attribute = WeatherAttribute(text="raining", value="rain") data_model.append(data_weather_attribute) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute, date_time=data_date_time ) ) data_date_time730 = DateTime(text="7:30", value=datetime(2022, 11, 13, 7, 30)) data_model.append(data_date_time730) data_date_time800 = DateTime(text="8", value=datetime(2022, 11, 13, 8, 00)) data_model.append(data_date_time800) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"date_time": data_date_time730}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
97dacd70-dd76-5bb8-c19a-adbe64119028
If it's raining tomorrow morning, set my alarm for 7:30, if it's not, set my alarm for 8.
# test data data_model = DataModel(reset=True) data_date_time = DateTime( text="tomorrow morning", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time) data_weather_attribute = WeatherAttribute(text="raining", value="rain") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="sunny", value="sun") data_model.append(data_weather_attribute_neg) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, date_time=data_date_time ) ) data_date_time730 = DateTime(text="7:30", value=datetime(2022, 11, 13, 7, 30)) data_model.append(data_date_time730) data_date_time800 = DateTime(text="8", value=datetime(2022, 11, 13, 8, 00)) data_model.append(data_date_time800) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"date_time": data_date_time800}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
a34bbe61-27c5-3447-4a6a-f1d7fd15f092
Play the new Taylor Swift album and pull up my shopping list for today.
# test data data_model = DataModel(reset=True) data_album = Album(text="the new Taylor Swift album") data_model.append(data_album) data_date_time_today = DateTime(text="today", value=datetime.now()) data_model.append(data_date_time_today) data_shopping_list1 = ShoppingListEntity(date_time=data_date_time_today) data_model.append(data_shopping_list1) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_shopping_list2 = ShoppingListEntity(date_time=data_date_time_tomorrow) data_model.append(data_shopping_list2) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MusicEntity) expected = [{"album": data_album}] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([ShoppingListEntity])) actual = next(iterator, None) expected = [data_shopping_list1] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
da4b9237-bacc-cdf1-9c07-60cab7aec4a8
Send a message to dad if it rains tomorrow.
# test data data_model = DataModel(reset=True) data_recipient = Contact(text="dad", value="Father") data_model.append(data_recipient) data_date_time = DateTime(text="tomorrow", value=datetime.now() + timedelta(days=1)) data_model.append(data_date_time) data_weather_attribute = WeatherAttribute(text="rains", value="rain") data_model.append(data_weather_attribute) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute, date_time=data_date_time ) ) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
dffff454-5ba0-c6ab-a9aa-6ff950bddc82
Send a message to dad if it rains tomorrow.
# test data data_model = DataModel(reset=True) data_recipient = Contact(text="dad", value="Father") data_model.append(data_recipient) data_date_time = DateTime(text="tomorrow", value=datetime.now() + timedelta(days=1)) data_model.append(data_date_time) data_weather_attribute = WeatherAttribute(text="rains", value="rain") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="sunny", value="sun") data_model.append(data_weather_attribute_neg) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, date_time=data_date_time ) ) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
94a27c17-ef51-adc0-db1f-85e1a20519fc
Give me directions to Navy pier in Chicago and tell me what the current traffic is looking like.
# test data data_model = DataModel(reset=True) data_location = Location(text="Navy pier in Chicago", value="Navy pier in Chicago") data_model.append(data_location) data_directions = NavigationDirectionEntity(destination=data_location) data_model.append(data_directions) data_traffic_info = NavigationTrafficInfoEntity(destination=data_location) data_model.append(data_traffic_info) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_directions] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationTrafficInfoEntity])) actual = next(iterator, None) expected = [data_traffic_info] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
1b645389-2473-a467-d073-72d45eb05abc
Check the next time Blink 182 will be in Chicago and tell me the ticket prices.
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="Blink 182") data_model.append(data_event_name) data_location = Location(text="in Chicago") data_model.append(data_location) data_event = EventEntity(event_name=data_event_name, location=data_location) data_model.append(data_event) data_tickets = EventTicketEntity(event_name=data_event_name, location=data_location) data_model.append(data_tickets) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventEntity])) actual = next(iterator, None) expected = [data_event] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([EventTicketEntity])) actual = next(iterator, None) expected = [data_tickets] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
ac3478d6-9a3c-81fa-62e6-0f5c3696165a
Remind me tomorrow to email Jim about lunch and schedule a reservation for noon at the cafe.
# test data data_model = DataModel(reset=True) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime(2022, 11, 14, 00, 00) ) data_model.append(data_date_time_tomorrow) data_contact = Contact(text="me", value="Asaf") data_model.append(data_contact) data_content = Content(text="email Jim about lunch", value="email Jim about lunch") data_model.append(data_content) data_date_time_noon = DateTime(text="noon", value=datetime(2022, 11, 13, 12, 00)) data_model.append(data_date_time_noon) data_location = Location(text="the cafe", value="the cafe") data_model.append(data_location) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ReminderEntity) expected = [ { "person_reminded": data_contact, "date_time": data_date_time_tomorrow, "content": data_content, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(EventEntity) expected = [{"date_time": data_date_time_noon, "location": data_location}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c1dfd96e-ea8c-c2b6-2785-275bca38ac26
Can you place an order for two turkeys to arrive the 22nd, and remind me about it on the 21st?
# test data data_model = DataModel(reset=True) data_amount = Amount(text="two", value=2) data_model.append(data_amount) data_product_name = ProductName(text="turkeys") data_model.append(data_product_name) data_date_time_22 = DateTime(text="22nd", value=datetime(2022, 11, 22)) data_model.append(data_date_time_22) data_contact = Contact(text="me", value="me") data_model.append(data_contact) data_date_time_21 = DateTime(text="21st", value=datetime(2022, 11, 21)) data_model.append(data_date_time_21) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(OrderEntity) expected = [ { "product_name": data_product_name, "amount": data_amount, "date_time": data_date_time_22, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [ { "date_time": data_date_time_21, "person_reminded": data_contact, "content": Content(value=order), } for order in data_model.get_data(OrderEntity) ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
902ba3cd-a188-3801-594b-6e1b452790cc
How long will it take to get to AMC theater at 8pm tonight and tell me what tonight's weather outlook is.
# test data data_model = DataModel(reset=True) data_location = Location(text="AMC theater", value="AMC theater") data_model.append(data_location) data_date_time_8pm = DateTime( text="at 8pm tonight", value=datetime(2022, 11, 13, 20, 00) ) data_model.append(data_date_time_8pm) data_estimated_arrival = NavigationEstimatedArrivalEntity( destination=data_location, arrival_date_time=data_date_time_8pm ) data_model.append(data_estimated_arrival) data_date_time_tonight = DateTime( text="tonight", value=datetime(2022, 11, 13, 18, 00) ) data_model.append(data_date_time_tonight) data_weather_forecast = WeatherForecastEntity(date_time=data_date_time_tonight) data_model.append(data_weather_forecast) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([NavigationEstimatedArrivalEntity])) actual = next(iterator, None) expected = [data_estimated_arrival] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fe5dbbce-a5ce-7e29-88b8-c69bcfdfde89
Check the weather for the 4th of July and send a text to Grandpa to invite him over and tell him the weather.
# test data data_model = DataModel(reset=True) data_date_time = DateTime(text="the 4th of July", value=datetime(2022, 7, 4)) data_model.append(data_date_time) data_weather_forecast = WeatherForecastEntity(date_time=data_date_time) data_model.append(data_weather_forecast) data_recipient = Contact(text="Grandpa", value="Grandpa") data_model.append(data_recipient) data_content1 = Content(text="invite him over", value="invite him over") data_model.append(data_content1) data_content2 = Content(value=[data_weather_forecast]) data_model.append(data_content2) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": content, } for content in [ data_content1, data_content2, ] ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
0ade7c2c-f97f-75d0-0997-5f4d720d1fa6
Set a timer for one hour and text Stacy that dinner will be ready in one hour.
# test data data_model = DataModel(reset=True) data_duration = DateTime(text="one hour", value=datetime(2022, 11, 14, 1, 0)) data_model.append(data_duration) data_contact = Contact(text="Stacy", value="Stacy") data_model.append(data_contact) data_content = Content(text="dinner will be ready in one hour") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [ { "duration": data_duration, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_contact, "content": data_content, } ] entity_assertions(expected, actual, test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
b1d57811-11d8-4f7b-3fe4-5a0852e59758
If the weather is cold tomorrow please remind me to grab my winter jacket.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="cold", value="cold") data_model.append(data_weather_attribute) data_date_time = DateTime(text="tomorrow", value=datetime(2022, 11, 15)) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( date_time=data_date_time, weather_attribute=data_weather_attribute ) ) data_person_reminded = Contact(text="me", value="I") data_model.append(data_person_reminded) data_content = Content( text="grab my winter jacket.", value="grab my winter jacket.", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} data_reminder_list = data_model.get_data(ReminderEntity) assert_equal(len(data_reminder_list), 1, test_results) data_reminder = data_reminder_list[0] assert_equal(data_reminder.person_reminded, data_person_reminded, test_results) assert_equal(data_reminder.content, data_content, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
71b18005-4c28-b40b-7600-ccc90b3fa123
If the weather is cold tomorrow please remind me to grab my winter jacket.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="cold", value="cold") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="hot", value="hot") data_model.append(data_weather_attribute_neg) data_date_time = DateTime(text="tomorrow", value=datetime.now() + timedelta(days=1)) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( date_time=data_date_time, weather_attribute=data_weather_attribute_neg ) ) data_person_reminded = Contact(text="me", value="I") data_model.append(data_person_reminded) data_content = Content( text="grab my winter jacket.", value="grab my winter jacket.", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ReminderEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
ef0d89d0-7160-68b2-1b63-833c6a28d0e9
What is the weather going to be at 5:00 PM today and navigate destination set to home after 5:00 PM.
# test data data_model = DataModel(reset=True) data_date_time = DateTime(text="5:00 PM today", value=datetime(2022, 11, 14, 17, 0)) data_model.append(data_date_time) data_weather_attribute = WeatherAttribute(text="cold", value="cold") data_model.append(data_weather_attribute) data_weather_forecast = WeatherForecastEntity( date_time=data_date_time, weather_attribute=data_weather_attribute ) data_model.append(data_weather_forecast) data_destination = Location(text="home", value="23e 8th st, new york, ny") data_model.append(data_destination) data_departure_date_time = DateTime( text="after 5:00 PM", value=datetime(2022, 11, 14, 17, 1) ) data_model.append(data_departure_date_time) data_direction = NavigationDirectionEntity( destination=data_destination, departure_date_time=data_departure_date_time ) data_model.append(data_direction) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_direction] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fa35e192-121e-abf3-dabf-9f5ea6abdbcb
If it's snowing in Boulder, Colorado by 6pm, text Lauren to tell her to let the dog inside.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="snowing", value="snow") data_model.append(data_weather_attribute) data_location = Location(text="Boulder, Colorado") data_model.append(data_location) data_date_time = DateTime(text="by 6pm", value=datetime(2022, 11, 15, 18, 00)) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute, location=data_location, date_time=data_date_time, ) ) data_recipient = Contact(text="Lauren", value="Lauren Hill") data_model.append(data_recipient) data_content = Content( text="let the dog inside", value="let the dog inside", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
04a7d094-9ee7-0c56-808a-83b79b41bdc9
If it's snowing in Boulder, Colorado by 6pm, text Lauren to tell her to let the dog inside.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="snowing", value="snow") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="rain", value="rain") data_model.append(data_weather_attribute_neg) data_location = Location(text="Boulder, Colorado") data_model.append(data_location) data_date_time = DateTime(text="by 6pm", value=datetime(2022, 11, 15, 18, 00)) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, location=data_location, date_time=data_date_time, ) ) data_recipient = Contact(text="Lauren", value="Lauren Hill") data_model.append(data_recipient) data_content = Content( text="let the dog inside", value="let the dog inside", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
92dec2ef-9ba6-4fdc-36d6-33d5e4cd189f
Text my brother I am on my way and also tell me the current traffic conditions.
# test data data_model = DataModel(reset=True) data_recipient = Contact(text="my brother", value="Jim Hill") data_model.append(data_recipient) data_content_omw = Content( text="I am on my way", value="I am on my way", ) data_model.append(data_content_omw) data_navigation_traffic_info = NavigationTrafficInfoEntity() data_model.append(data_navigation_traffic_info) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content_omw}] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationTrafficInfoEntity])) actual = next(iterator, None) expected = [data_navigation_traffic_info] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
1574bddb-75c7-8a6f-d225-1d61e2993b51
Start my shower playlist and text Lucas that I'm just now getting in the shower and it will be 15 or 20 minutes until I'm out.
# test data data_model = DataModel(reset=True) data_playlist = Playlist(text="shower playlist") data_model.append(data_playlist) data_recipient = Contact(text="Lucas") data_model.append(data_recipient) data_content = Content( text="I'm just now getting in the shower and it will be 15 or 20 minutes until I'm out", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
0716d970-8d32-1ffb-6a00-818614779e77
Tell Abe to pick up bread on his way home and set a timer for 60 minutes.
# test data data_model = DataModel(reset=True) data_recipient = Contact(text="Abe") data_model.append(data_recipient) data_content = Content( text="pick up bread on his way home", ) data_model.append(data_content) data_duration = TimeDuration(text="60 minutes") data_model.append(data_duration) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(TimerEntity) expected = [{"duration": data_duration}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
9e6a55b6-b456-3e65-2a23-be9d623ca505
Check the weather in Indianapolis, and if it's sunny, text Bob to remind him about the concert today.
# test data data_model = DataModel(reset=True) data_location = Location(text="Indianapolis") data_model.append(data_location) data_weather_attribute = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute, location=data_location, ) data_model.append(data_weather_forecast) data_recipient = Contact(text="Bob") data_model.append(data_recipient) data_content = Content( text="remind him about the concert today", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
378a41e7-1462-4e55-0f24-34847a1bdfe8
Check the weather in Indianapolis, and if it's sunny, text Bob to remind him about the concert today.
# test data data_model = DataModel(reset=True) data_location = Location(text="Indianapolis") data_model.append(data_location) data_weather_attribute = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="rain") data_model.append(data_weather_attribute_neg) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, location=data_location, ) data_model.append(data_weather_forecast) data_recipient = Contact(text="Bob") data_model.append(data_recipient) data_content = Content( text="remind him about the concert today", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c41c37ed-1f36-a5c0-2692-99ffe45f64ae
Give me directions to the nearest movie theater and text Mike to meet me there in a half hour.
# test data data_model = DataModel(reset=True) data_destination1 = Location( text="movie theater", value="movie theater 1", nearest=100 ) data_model.append(data_destination1) data_destination2 = Location( text="movie theater", value="movie theater 2", nearest=1 ) data_model.append(data_destination2) data_destination3 = Location( text="movie theater", value="movie theater 3", nearest=30 ) data_model.append(data_destination3) data_directions = NavigationDirectionEntity( destination=data_destination2, ) data_model.append(data_directions) data_recipient = Contact(text="Mike") data_model.append(data_recipient) data_content = Content( text="meet me there in a half hour", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_directions] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
91032ad7-bbcb-6cf7-2875-e8e8207dcfba
Check my calendar for when my aunt's birthday is this month and then set a reminder for three days before, so I can remember to buy a gift.
# test data data_model = DataModel(reset=True) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_event_name = EventName( text="my aunt's birthday", value="Auntie Rachel's Birthday" ) data_model.append(data_event_name) data_date_time = DateTime(text="this month", value=datetime(2022, 11, 8, 00, 00)) data_model.append(data_date_time) data_event = EventEntity( event_name=data_event_name, date_time=data_date_time, event_calendar=data_calendar, ) data_model.append(data_event) data_date_time2 = DateTime( text="three days before", value=datetime(2022, 11, 5, 00, 00) ) data_model.append(data_date_time2) data_content = Content(text="remember to buy a gift") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventEntity])) actual = next(iterator, None) expected = [data_event] response_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [{"date_time": data_date_time2, "content": data_content}] entity_assertions(expected, actual, test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
472b07b9-fcf2-c245-1e87-81e944bf5f77
Set alarm for 6 AM and set the bedroom lights to turn on at 6 AM.
# test data data_model = DataModel(reset=True) data_date_time = DateTime(text="6 AM", value="6 AM") data_model.append(data_date_time) data_home_device_action = HomeDeviceAction(text="turn on", value="turn on") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="the bedroom lights") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="turn on") data_model.append(data_home_device_value) data_date_time2 = DateTime(text="at 6 AM") data_model.append(data_date_time2) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"date_time": data_date_time}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_action": data_home_device_action, "device_value": data_home_device_value, "date_time": data_date_time2, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
12c6fc06-c99a-4623-75ee-b3f43dfd832b
If the weather is nice tomorrow, text Jenny if she would like to go to the park
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="nice") data_model.append(data_weather_attribute) data_date_time = DateTime(text="tomorrow") data_model.append(data_date_time) data_model.append( WeatherForecastEntity( date_time=data_date_time, weather_attribute=data_weather_attribute ) ) data_recipient = Contact(text="Jenny") data_model.append(data_recipient) data_content = Content( text="if she would like to go to the park", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
442dde44-84c9-2e73-a121-7a610a64dfd6
If the weather is nice tomorrow, text Jenny if she would like to go to the park
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="nice", value="nice") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="stormy", value="storm") data_model.append(data_weather_attribute_neg) data_date_time = DateTime(text="tomorrow", value="tomorrow") data_model.append(data_date_time) data_model.append( WeatherForecastEntity( date_time=data_date_time, weather_attribute=data_weather_attribute_neg ) ) data_recipient = Contact(text="Jenny", value="Jennifer Lopez") data_model.append(data_recipient) data_content = Content( text="if she would like to go to the park", value="if she would like to go to the park", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fa09371c-f935-550e-7f9f-04329f07bd64
Send Tyler a text saying hi and send one to Susan too.
# test data data_model = DataModel(reset=True) data_tyler = Contact(text="Tyler") data_model.append(data_tyler) data_susan = Contact(text="Susan") data_model.append(data_susan) data_content = Content( text="hi", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [ {"recipient": data_tyler, "content": data_content}, {"recipient": data_susan, "content": data_content}, ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
bc33ea4e-26e5-e1af-1408-321416956113
Set timer for one hour labeled workout and start playing my music playlist titled workout tunes.
# test data data_model = DataModel(reset=True) data_duration = TimeDuration(text="one hour") data_model.append(data_duration) data_playlist = Playlist(text="workout tunes") data_model.append(data_playlist) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [{"duration": data_duration}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
22d200f8-670d-bdb3-e253-a90eee509847
Turn on the living room lights and navigate Home.
# test data data_model = DataModel(reset=True) data_home_device_action = HomeDeviceAction(text="Turn") data_model.append(data_home_device_action) data_home_device_value = HomeDeviceValue(text="on", value="on") data_model.append(data_home_device_value) data_home_device_name = HomeDeviceName( text="the living room lights", value="the living room lights" ) data_model.append(data_home_device_name) data_destination = Location(text="Home", value="Home") data_model.append(data_destination) data_navigation_direction = NavigationDirectionEntity(destination=data_destination) data_model.append(data_navigation_direction) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_action": data_home_device_action, "device_value": data_home_device_value, } ] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_navigation_direction] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
63266754-7e7c-d3e0-4665-47863e1207a8
Look up directions to the Sushi House and text my mom, telling her that I'm leaving soon
# test data data_model = DataModel(reset=True) data_destination = Location(text="the Sushi House", value="the Sushi House") data_model.append(data_destination) data_directions = NavigationDirectionEntity(destination=data_destination) data_model.append(data_directions) data_recipient = Contact(text="my mom") data_model.append(data_recipient) data_content = Content(text="I'm leaving soon") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_directions] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
cb4e5208-b4cd-8726-8b20-8e49452ed6e8
Add eggs to my shopping list and text Steve to please buy eggs at the grocery store.
# test data data_model = DataModel(reset=True) data_product_name = ProductName(text="eggs") data_model.append(data_product_name) data_shopping_list_name = ShoppingListName(text="my shopping list") data_model.append(data_shopping_list_name) data_recipient = Contact(text="Steve") data_model.append(data_recipient) data_content = Content(text="please buy eggs at the grocery store") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ShoppingListEntity) expected = [ { "product_name": data_product_name, "shopping_list_name": data_shopping_list_name, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
b6692ea5-df92-0cad-691c-20319a6fffd7
If I receive a text from Ruby tonight, change my alarm to 7am.
# test data data_model = DataModel(reset=True) data_sender_ruby = Contact(text="Ruby", value="Ruby Chen") data_model.append(data_sender_ruby) data_sender_steve = Contact(text="Steve", value="Steven Smith") data_model.append(data_sender_steve) data_date_time_tonight = DateTime(text="tonight", value=datetime.now()) data_model.append(data_date_time_tonight) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_model.append( MessageEntity(sender=data_sender_ruby, date_time=data_date_time_tonight) ) data_model.append( MessageEntity(sender=data_sender_ruby, date_time=data_date_time_tomorrow) ) data_model.append( MessageEntity(sender=data_sender_steve, date_time=data_date_time_tonight) ) data_alarm_date_time_9 = DateTime( text="9am", value=datetime.now().replace(hour=9, minute=0, second=0, microsecond=0), ) data_model.append(data_alarm_date_time_9) data_alarm_date_time_7 = DateTime( text="7am", value=datetime.now().replace(hour=7, minute=0, second=0, microsecond=0), ) data_model.append(data_alarm_date_time_7) data_alarm_name = AlarmName(text="my alarm") data_model.append(data_alarm_name) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"alarm_name": data_alarm_name, "date_time": data_alarm_date_time_7}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
490b5c96-9899-b6b8-b49c-095559958c3f
If I receive a text from Ruby tonight, change my alarm to 7am.
# test data data_model = DataModel(reset=True) data_sender_ruby = Contact(text="Ruby") data_model.append(data_sender_ruby) data_sender_steve = Contact(text="Steve") data_model.append(data_sender_steve) data_date_time_tonight = DateTime(text="tonight") data_model.append(data_date_time_tonight) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_model.append( MessageEntity(sender=data_sender_ruby, date_time=data_date_time_tomorrow) ) data_model.append( MessageEntity(sender=data_sender_steve, date_time=data_date_time_tonight) ) data_alarm_date_time_9 = DateTime( text="9am", value=datetime.now().replace(hour=9, minute=0, second=0, microsecond=0), ) data_model.append(data_alarm_date_time_9) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c17b63c6-672e-d06f-f0e1-b1667f035bd6
Add Jake's birthday party to the calendar for 7pm Saturday then send an email to Tom are you going to the party?
# test data data_model = DataModel(reset=True) data_date_time_sat7pm = DateTime( text="7pm Saturday", value=( datetime.now() + timedelta( days=((12 - datetime.now().weekday()) % 7) ) # find next Sat https://stackoverflow.com/a/16770463/1609802 ).replace(hour=19, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time_sat7pm) data_event_name = EventName(text="Jake's birthday party") data_model.append(data_event_name) data_recipient = Contact(text="Tom") data_model.append(data_recipient) data_content = Content(text="are you going to the party?") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(EventEntity) expected = [{"event_name": data_event_name, "date_time": data_date_time_sat7pm}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fc074d50-1302-eb2b-93e2-554793fcaf50
Buy tickets to Black Adam and email the time of the show to Carlos.
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="Black Adam") data_model.append(data_event_name) data_date_time = DateTime(text="the time of the show") data_model.append(data_date_time) data_event = EventEntity(event_name=data_event_name, date_time=data_date_time) data_model.append(data_event) data_recipient = Contact(text="Carlos") data_model.append(data_recipient) data_message_content_type = MessageContentType(text="email") data_model.append(data_message_content_type) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(EventTicketEntity) expected = [ { "event": data_event } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": Content(value=event),#, text="the time of the show"), "message_content_type": message_content_type, } for event in data_model.get_data(EventEntity) ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
5b384ce3-2d8c-def0-2bc3-a139d4cac0a2
Look up what the weather will be like tomorrow, if it's not raining, message my sister saying we should go out for lunch tomorrow.
# test data data_model = DataModel(reset=True) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_weather_attribute = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute) data_weather_attribute_raining = WeatherAttribute(text="raining") data_model.append(data_weather_attribute_raining) data_weather_forecast = WeatherForecastEntity( date_time=data_date_time_tomorrow, weather_attribute=data_weather_attribute ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="message") data_model.append(data_message_content_type) data_recipient = Contact(text="my sister") data_model.append(data_recipient) data_content = Content( text="we should go out for lunch tomorrow", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c9b4f6f9-d2ab-0719-de56-dc4e63623c51
Look up what the weather will be like tomorrow, if it's not raining, message my sister saying we should go out for lunch tomorrow.
# test data data_model = DataModel(reset=True) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_weather_attribute = WeatherAttribute(text="raining") data_model.append(data_weather_attribute) data_weather_forecast = WeatherForecastEntity( date_time=data_date_time_tomorrow, weather_attribute=data_weather_attribute ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="message") data_model.append(data_message_content_type) data_recipient = Contact(text="my sister") data_model.append(data_recipient) data_content = Content( text="we should go out for lunch tomorrow", ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
a39f8dcb-b77e-ec1a-9801-8791939859bf
If I don't have anything scheduled on the 20th of this month on my calendar, message Alice and ask if she wants to go dinner.
# test data data_model = DataModel(reset=True) data_date_time_20 = DateTime( text="20th of this month", value=datetime.now().replace(day=20) ) data_model.append(data_date_time_20) data_date_time_19 = DateTime( text="19th of this month", value=datetime.now().replace(day=19) ) data_model.append(data_date_time_19) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_event_name = EventName(text="dinner") data_model.append( EventEntity( date_time=data_date_time_19, event_calendar=data_calendar, event_name=data_event_name, ) ) data_recipient = Contact(text="Alice") data_model.append(data_recipient) data_content = Content(text="she wants to go dinner") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
071c725c-ab7a-ecba-6ded-15f5e6079061
If I don't have anything scheduled on the 20th of this month on my calendar, message Alice and ask if she wants to go dinner.
# test data data_model = DataModel(reset=True) data_date_time_20 = DateTime( text="20th of this month", value=datetime.now().replace(day=20) ) data_model.append(data_date_time_20) data_date_time_19 = DateTime( text="19th of this month", value=datetime.now().replace(day=19) ) data_model.append(data_date_time_19) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_event_name = EventName(text="dinner") data_model.append( EventEntity( date_time=data_date_time_20, event_calendar=data_calendar, event_name=data_event_name, ) ) data_recipient = Contact(text="Alice") data_model.append(data_recipient) data_content = Content(text="she wants to go dinner") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c7c54e7b-425b-7a0c-9790-53c6633eec5b
Set the A/C to 72 degrees and set a timer for 30 minutes.
# test data data_model = DataModel(reset=True) data_home_device_action = HomeDeviceAction(text="set") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="the A/C", value="A/C") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="72 degrees", value=72) data_model.append(data_home_device_value) data_duration_30 = TimeDuration(text="30 minutes") data_model.append(data_duration_30) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_action": data_home_device_action, "device_value": data_home_device_value, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(TimerEntity) expected = [{"duration": data_duration_30}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
761f22b2-c159-3d0b-b87e-0b606f990ba4
Buy a ticket for the new Wakanda movie, What is Friday's weather going to be like?
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="the new Wakanda movie") data_model.append(data_event_name) data_event = EventEntity(event_name=data_event_name) data_model.append(data_event) data_date_time = DateTime( text="Friday", value=datetime.now() + timedelta(days=((7 + 4 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time) data_weather_forecast = WeatherForecastEntity(date_time=data_date_time) data_model.append(data_weather_forecast) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(EventTicketEntity) expected = [{"event": data_event}] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
98fbc42f-aedc-0249-2397-cb5962ea3a3f
Set a timer for 5 minutes and then when the timer is up send a message to Justin, telling him I am finished with the job.
# test data data_model = DataModel(reset=True) data_duration = TimeDuration(text="5 minutes") data_model.append(data_duration) data_date_time_5m = DateTime( text="5 minutes", value=datetime.now() + timedelta(minutes=5) ) data_model.append(data_date_time_5m) data_recipient = Contact(text="Justin", value="Justin Bieber") data_model.append(data_recipient) data_content = Content( text="I am finished with the job", value="I am finished with the job" ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [{"duration": data_duration}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": data_content, "date_time": data_date_time_5m, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fb644351-560d-8296-fe6d-a332236b1f8d
Find the nearest In N Out and send a text to Bryan asking for his order.
# test data data_model = DataModel(reset=True) data_location1 = Location(text="In N Out", nearest=10) data_model.append(data_location1) data_location2 = Location(text="In N Out", nearest=2) data_model.append(data_location2) data_location3 = Location(text="In N Out", nearest=5) data_model.append(data_location3) data_map_entity1 = MapEntity(location=data_location1) data_model.append(data_map_entity1) data_map_entity2 = MapEntity(location=data_location2) data_model.append(data_map_entity2) data_map_entity3 = MapEntity(location=data_location3) data_model.append(data_map_entity3) data_recipient = Contact(text="Bryan") data_model.append(data_recipient) data_content = Content(text="his order") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([MapEntity])) actual = next(iterator, None) expected = [data_map_entity2] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
fe2ef495-a115-2561-5729-49784c16bf23
Set a timer for 6 AM to wake up, also set the thermostat to turn up the temperature by 5 degrees at 6 AM.
# test data data_model = DataModel(reset=True) data_date_time_6am = DateTime( text="6 AM", value=datetime.now().replace(hour=6, minute=0) ) data_model.append(data_date_time_6am) data_home_device_name = HomeDeviceName( text="the thermostat", ) data_model.append(data_home_device_name) data_home_device_action = HomeDeviceAction( text="turn up the temperature", ) data_model.append(data_home_device_action) data_home_device_value = HomeDeviceValue(text="by 5 degrees", value=25) data_model.append(data_home_device_value) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [{"date_time": data_date_time_6am}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_value": data_home_device_value, "device_action": data_home_device_action, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
827bfc45-8708-f0b4-4200-9c9c9836f7e4
Turn on the lights in the hallway at 7 pm and start playing my playlist at 8 pm.
# test data data_model = DataModel(reset=True) data_home_device_action = HomeDeviceAction(text="turn on") data_model.append(data_home_device_action) data_home_device_value = HomeDeviceValue(text="on") data_model.append(data_home_device_value) data_home_device_name = HomeDeviceName(text="the lights in the hallway") data_model.append(data_home_device_name) data_date_time_7pm = DateTime( text="at 7 pm", value=datetime.now().replace(hour=6, minute=0) ) data_model.append(data_date_time_7pm) data_playlist = Playlist(text="my playlist") data_model.append(data_playlist) data_date_time_8pm = DateTime( text="at 8 pm", value=datetime.now().replace(hour=8, minute=0) ) data_model.append(data_date_time_8pm) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_action": data_home_device_action, "device_value": data_home_device_value, "date_time": data_date_time_7pm, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist, "date_time": data_date_time_8pm}] entity_assertions(expected, actual, test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
64e095fe-763f-c624-1837-8753f9402623
Set a reminder at 3:00 PM that I will need to pick up my items from the store, and text Jason to meet me at the store at 2:50 PM.
# test data data_model = DataModel(reset=True) data_date_time = DateTime(text="at 3 PM") data_model.append(data_date_time) data_content = Content( text="I will need to pick up my items from the store", ) data_model.append(data_content) data_message_content_type = MessageContentType(text="text") data_model.append(data_message_content_type) data_recipient = Contact(text="Jason") data_model.append(data_recipient) data_content_message = Content(text="meet me at the store at 2:50 PM") data_model.append(data_content_message) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ReminderEntity) expected = [{"date_time": data_date_time, "content": data_content}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": data_content_message, "message_content_type": data_message_content_type, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
a9334987-ece7-8b6f-e8bf-130ef00b7484
Set the thermostat to 70 degrees and play my romantic playlist.
# test data data_model = DataModel(reset=True) data_home_device_action = HomeDeviceAction(text="set") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="the thermostat") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="70 degrees") data_model.append(data_home_device_value) data_playlist = Playlist(text="my romantic playlist", value="my romantic playlist") data_model.append(data_playlist) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_name": data_home_device_name, "device_action": data_home_device_action, "device_value": data_home_device_value, } ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
80e28a51-cbc2-6fa4-bd34-938c5e593b36
Remind me to send an email to Mom and Dad tomorrow and delete the appointment in my calendar for Tuesday.
# test data data_model = DataModel(reset=True) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) data_content = Content(text="send an email to Mom and Dad") data_model.append(data_content) data_date_time = DateTime(text="Tuesday") data_model.append(data_date_time) data_date_time2 = DateTime(text="Wednesday") data_model.append(data_date_time2) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_event1 = EventEntity(date_time=data_date_time, event_calendar=data_calendar) data_model.append(data_event1) data_event2 = EventEntity(date_time=data_date_time2, event_calendar=data_calendar) data_model.append(data_event2) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ReminderEntity) expected = [{"person_reminded": data_person_reminded, "content": data_content}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(EventEntity) expected = [{"date_time": data_date_time2, "event_calendar": data_calendar}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
8effee40-9c62-5e1a-2d8f-5033631840e6
If Walmart has Jurassic World on bluray, buy it so I can pick it up tomorrow morning.
# test data data_model = DataModel(reset=True) data_store = Location(text="Walmart") data_model.append(data_store) data_product_name = ProductName(text="Jurassic World on bluray") data_model.append(data_product_name) data_product = ProductEntity(location=data_store, product_name=data_product_name) data_model.append(data_product) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(OrderEntity) expected = [{"product_name": data_product_name, "location": data_store}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
a19f469a-ee1c-af42-afcd-6dfd2aa9d4e2
If Walmart has Jurassic World on bluray, buy it so I can pick it up tomorrow morning.
# test data data_model = DataModel(reset=True) data_store1 = Location(text="Amazon") data_model.append(data_store1) data_store2 = Location(text="Walmart") data_model.append(data_store2) data_product_name = ProductName(text="Jurassic World on bluray") data_model.append(data_product_name) data_product = ProductEntity(location=data_store1, product_name=data_product_name) data_model.append(data_product) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(OrderEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
1fa6447b-3a56-084e-2a72-22e3fe725f53
Get directions to Portland, and tell me if it will snow along the route in the next hour
# test data data_model = DataModel(reset=True) data_destination = Location(text="Portland") data_model.append(data_destination) data_direction = NavigationDirectionEntity(destination=data_destination) data_model.append(data_direction) data_weather_attribute = WeatherAttribute(text="snow") data_model.append(data_weather_attribute) data_date_time = DateTime( text="in the next hour", ) data_model.append(data_date_time) data_location = Location(value=data_direction) data_model.append(data_location) data_weather_forecast = WeatherForecastEntity( location=data_location, weather_attribute=data_weather_attribute, date_time=data_date_time, ) data_model.append(data_weather_forecast) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_direction] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
5a5b0f9b-7d3f-8fc8-4c3c-ef8fd8efaaa6
Check the weather and text Mike that I will meet them later if it's hot.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="hot") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="cold") data_model.append(data_weather_attribute2) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute1 ) data_model.append(data_weather_forecast) data_recipient = Contact(text="Mike") data_model.append(data_recipient) data_content = Content(text="I will meet them later") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
933ebca0-b2ae-a422-dbad-d84726497721
Check the weather and text Mike that I will meet them later if it's hot.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="hot") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="cold") data_model.append(data_weather_attribute2) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute2 ) data_model.append(data_weather_forecast) data_recipient = Contact(text="Mike") data_model.append(data_recipient) data_content = Content(text="I will meet them later") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
9a1f1f6d-833a-ad81-c985-670c3647353f
If the weather is going to be sunny Saturday morning, send an email to Ashley asking if she wants to go for a hike.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="cloudy") data_model.append(data_weather_attribute2) data_date_time_sat = DateTime( text="Saturday morning", value=datetime.now() + timedelta(days=((7 + 5 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_sat) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute1, date_time=data_date_time_sat ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="email") data_model.append(data_message_content_type) data_recipient = Contact(text="Ashley", value="Ashley Smith") data_model.append(data_recipient) data_content = Content(text="she wants to go for a hike") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": data_content, "message_content_type": data_message_content_type, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c0c42ffc-8bb3-e3e9-89f5-9e5dfd2b7ae7
If the weather is going to be sunny Saturday morning, send an email to Ashley asking if she wants to go for a hike.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="cloudy") data_model.append(data_weather_attribute2) data_date_time_sat = DateTime( text="Saturday morning", value=datetime.now() + timedelta(days=((7 + 5 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_sat) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute2, date_time=data_date_time_sat ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="email") data_model.append(data_message_content_type) data_recipient = Contact(text="Ashley", value="Ashley Smith") data_model.append(data_recipient) data_content = Content(text="she wants to go for a hike") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
dabfe7ab-2862-4f70-7a38-3cb0a847c10a
Send a message to my friends list on Monday telling them to remember to vote and set a reminder to me too.
# test data data_model = DataModel(reset=True) data_message_content_type = MessageContentType(text="a message") data_model.append(data_message_content_type) data_recipients = [] for text, value in [ ("my friends list", "Tom"), ("my friends list", "Jerry"), ("my friends list", "Mike"), ("my friends list", "Ashley"), ]: data_recipient = Contact(text=text, value=value) data_model.append(data_recipient) data_recipients.append(data_recipient) data_date_time_mon = DateTime( text="on Monday", value=datetime.now() + timedelta(days=((7 + 0 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_mon) data_content = Content(text="remember to vote") data_model.append(data_content) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = list( map( lambda data_recipient: { "recipient": data_recipient, "content": data_content, "message_content_type": data_message_content_type, }, data_recipients, ) ) entity_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [{"person_reminded": data_person_reminded, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
2a459380-709e-2fe4-ac2d-ae5733c73225
Show me all of the musical events within 10 miles of me.
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="all of the musical events") data_model.append(data_event_name) data_location = Location(text="within 10 miles of me") data_model.append(data_location) data_expected_events = [] for _ in range(3): data_event = EventEntity( event_name=data_event_name, location=data_location, ) data_model.append(data_event) data_expected_events.append(data_event) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventEntity])) actual = next(iterator, None) expected = data_expected_events response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
59129aac-fb6c-ebbe-2c52-f30ef3424209
Play my favorite music playlist and tell John I am running late and will be there soon.
# test data data_model = DataModel(reset=True) data_playlist = Playlist(text="my favorite music playlist") data_model.append(data_playlist) data_recipient = Contact(text="John") data_model.append(data_recipient) data_content = Content(text="I am running late and will be there soon") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [{"recipient": data_recipient, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
b4c96d80-854d-d27e-76d8-cc9e21960eeb
Look up current prices for Chicago Blackhawks tickets for tomorrow's game and tell me what the traffic conditions will be like around 5 PM
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="Chicago Blackhawks") data_model.append(data_event_name) data_date_time_tomorrow = DateTime( text="tomorrow", value=datetime.now() + timedelta(days=1) ) data_model.append(data_date_time_tomorrow) data_event_ticket = EventTicketEntity( event_name=data_event_name, date_time=data_date_time_tomorrow ) data_model.append(data_event_ticket) data_date_time_5pm = DateTime(text="5 PM", value=datetime.now().replace(hour=17)) data_model.append(data_date_time_5pm) data_nav_traffic_info = NavigationTrafficInfoEntity(date_time=data_date_time_5pm) data_model.append(data_nav_traffic_info) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventTicketEntity])) actual = next(iterator, None) expected = [data_event_ticket] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationTrafficInfoEntity])) actual = next(iterator, None) expected = [data_nav_traffic_info] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
b7103ca2-78a7-5cad-8f7d-065acda0c2e8
Set timer to 30 mins and remind me to take the fish out of the oven.
# test data data_model = DataModel(reset=True) data_time_duration = TimeDuration(text="30 mins") data_model.append(data_time_duration) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) data_content = Content(text="take the fish out of the oven") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [{"duration": data_time_duration}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [{"person_reminded": data_person_reminded, "content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
d02560dd-9d7d-b446-7627-745bd6701e80
Check the weather and if it's above 80 degrees, set a reminder on my calendar for "Go to the park later"
# test data data_model = DataModel(reset=True) data_weather_temperature1 = WeatherTemperature(text="above 80 degrees") data_model.append(data_weather_temperature1) data_weather_temperature2 = WeatherTemperature(text="79 degrees") data_model.append(data_weather_temperature2) data_weather_forecast = WeatherForecastEntity( weather_temperature=data_weather_temperature1 ) data_model.append(data_weather_forecast) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_content = Content(text="Go to the park later") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [{"content": data_content}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
c8a43ea6-1fb6-4fb1-e2f8-af24a3cc9814
Check the weather and if it's above 80 degrees, set a reminder on my calendar for "Go to the park later"
# test data data_model = DataModel(reset=True) data_weather_temperature1 = WeatherTemperature(text="above 80 degrees") data_model.append(data_weather_temperature1) data_weather_temperature2 = WeatherTemperature(text="79 degrees") data_model.append(data_weather_temperature2) data_weather_forecast = WeatherForecastEntity( weather_temperature=data_weather_temperature2 ) data_model.append(data_weather_forecast) data_calendar = EventCalendar(text="my calendar") data_model.append(data_calendar) data_content = Content(text="Go to the park later") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
3c4fcdc0-45f4-f9df-6394-352a8b4a10bd
Remind me on Sunday about my doctor's appointment next Monday and give me directions to the doctor's office.
# test data data_model = DataModel(reset=True) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) data_date_time_sunday = DateTime( text="on Sunday", value=datetime.now() + timedelta(days=((7 + 6 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_sunday) data_content = Content(text="my doctor's appointment next Monday") data_model.append(data_content) data_destination = Location(text="the doctor's office") data_model.append(data_destination) data_navigation_direction = NavigationDirectionEntity(destination=data_destination) data_model.append(data_navigation_direction) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ReminderEntity) expected = [ { "person_reminded": data_person_reminded, "date_time": data_date_time_sunday, "content": data_content, } ] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_navigation_direction] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
35e995c1-07a7-1cae-b833-bb3b79f9f547
For Shakey Graves' upcoming summer tour, what will be the closest show to me and how many miles away is the venue?
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="Shakey Graves' upcoming summer tour") data_model.append(data_event_name) data_event1 = EventEntity(event_name=data_event_name, closest=10) data_model.append(data_event1) data_event2 = EventEntity(event_name=data_event_name, closest=25) data_model.append(data_event2) data_event3 = EventEntity(event_name=data_event_name, closest=3) data_model.append(data_event3) data_destination = Location(value=data_event3) data_model.append(data_destination) data_navigation_distance = NavigationDistanceEntity(destination=data_destination) data_model.append(data_navigation_distance) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response(EventEntity)) actual = next(iterator, None) expected = [data_event3] response_assertions(expected, [actual], test_results) iterator = iter(data_model.get_response([NavigationDistanceEntity])) actual = next(iterator, None) expected = [data_navigation_distance] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
450ddec8-dd20-6c2e-2ab1-aeeaa90e85e5
If is is raining at 8pm turn the heat up 5 degrees.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="raining") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="clear blue sky") data_model.append(data_weather_attribute2) data_date_time = DateTime( text="8pm", value=datetime.now().replace(hour=20, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute1, date_time=data_date_time ) ) data_home_device_name = HomeDeviceName(text="the heat") data_model.append(data_home_device_name) data_home_device_action = HomeDeviceAction(text="turn") data_model.append(data_home_device_action) data_home_device_value = HomeDeviceValue(text="up 5 degrees") data_model.append(data_home_device_value) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_action": data_home_device_action, "device_name": data_home_device_name, "device_value": data_home_device_value, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
4b0f78fa-63de-2412-141b-f387999591d5
If is is raining at 8pm turn the heat up 5 degrees.
# test data data_model = DataModel(reset=True) data_weather_attribute1 = WeatherAttribute(text="raining") data_model.append(data_weather_attribute1) data_weather_attribute2 = WeatherAttribute(text="clear blue sky") data_model.append(data_weather_attribute2) data_date_time = DateTime( text="8pm", value=datetime.now().replace(hour=20, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute2, date_time=data_date_time ) ) data_home_device_name = HomeDeviceName(text="the heat") data_model.append(data_home_device_name) data_home_device_action = HomeDeviceAction(text="turn") data_model.append(data_home_device_action) data_home_device_value = HomeDeviceValue(text="up 5 degrees") data_model.append(data_home_device_value) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [] entity_assertions(expected, actual, test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import ( assert_equal, response_assertions, assert_test, entity_assertions, )
f2dc1d5d-2333-a6e0-f759-49ce45e6234d
If I get a text message from my boss Tony, then check my mail to see if I have any emails from work.
# test data data_model = DataModel(reset=True) data_message_content_type = MessageContentType(text="a text message") data_model.append(data_message_content_type) data_sender_boss = Contact(text="my boss Tony") data_model.append(data_sender_boss) data_sender_work1 = Contact(text="work", value="worker 1") data_model.append(data_sender_work1) data_sender_work2 = Contact(text="work", value="worker 2") data_model.append(data_sender_work2) data_message = MessageEntity( message_content_type=data_message_content_type, sender=data_sender_boss ) data_model.append(data_message) data_recipient = Contact(text="I") data_model.append(data_recipient) data_message_content_type_email = MessageContentType(text="any emails") data_model.append(data_message_content_type_email) data_message2 = MessageEntity( sender=data_sender_work1, recipient=data_recipient, message_content_type=data_message_content_type_email, ) data_model.append(data_message2) data_message3 = MessageEntity( sender=data_sender_work2, recipient=data_recipient, message_content_type=data_message_content_type_email, ) data_model.append(data_message3) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([MessageEntity])) actual = next(iterator, None) expected = [data_message2, data_message3] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
adcb15ca-c578-a73b-db5b-bf2d9bc6a664
If I get a text message from my boss Tony, then check my mail to see if I have any emails from work.
# test data data_model = DataModel(reset=True) data_message_content_type = MessageContentType(text="a text message") data_model.append(data_message_content_type) data_sender_boss = Contact(text="my boss Tony") data_model.append(data_sender_boss) data_sender_work1 = Contact(text="work", value="worker 1") data_model.append(data_sender_work1) data_sender_work2 = Contact(text="work", value="worker 2") data_model.append(data_sender_work2) data_message = MessageEntity( message_content_type=data_message_content_type, sender=data_sender_work1 ) data_model.append(data_message) data_recipient = Contact(text="I") data_model.append(data_recipient) data_message_content_type_email = MessageContentType(text="any emails") data_model.append(data_message_content_type_email) data_message2 = MessageEntity( sender=data_sender_work1, recipient=data_recipient, message_content_type=data_message_content_type, ) data_model.append(data_message2) data_message3 = MessageEntity( sender=data_sender_work2, recipient=data_recipient, message_content_type=data_message_content_type, ) data_model.append(data_message3) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([MessageEntity])) actual = next(iterator, None) expected = [] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
5d58cb96-cbb5-72fd-10ac-239fbab8a52b
Check the weather for next tuesday and create a beach day event on my calendar if the temperature is above 90 degrees.
# test data data_model = DataModel(reset=True) data_date_time_tuesday = DateTime( text="next tuesday", value=datetime.now() + timedelta(days=((7 + 1 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_tuesday) data_weather_temperature = WeatherTemperature(text="above 90 degrees") data_model.append(data_weather_temperature) data_weather_temperature_neg = WeatherTemperature(text="below 80") data_model.append(data_weather_temperature_neg) data_weather_forecast = WeatherForecastEntity( date_time=data_date_time_tuesday, weather_temperature=data_weather_temperature ) data_model.append(data_weather_forecast) data_event_name = EventName(text="beach day") data_model.append(data_event_name) data_event_calendar = EventCalendar(text="my calendar") data_model.append(data_event_calendar) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(EventEntity) expected = [{"event_name": data_event_name, "event_calendar": data_event_calendar}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
b959b88c-8828-d389-5203-748f64704555
Check the weather for next tuesday and create a beach day event on my calendar if the temperature is above 90 degrees.
# test data data_model = DataModel(reset=True) data_date_time_tuesday = DateTime( text="next tuesday", value=datetime.now() + timedelta(days=((7 + 1 - datetime.now().weekday()) % 7)), ) data_model.append(data_date_time_tuesday) data_weather_temperature = WeatherTemperature(text="above 90 degrees") data_model.append(data_weather_temperature) data_weather_temperature_neg = WeatherTemperature(text="below 80") data_model.append(data_weather_temperature_neg) data_weather_forecast = WeatherForecastEntity( date_time=data_date_time_tuesday, weather_temperature=data_weather_temperature_neg, ) data_model.append(data_weather_forecast) data_event_name = EventName(text="beach day") data_model.append(data_event_name) data_event_calendar = EventCalendar(text="my calendar") data_model.append(data_event_calendar) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(EventEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
6989c50b-d2e0-8e7e-0423-aad5428a545e
Message my brother I will not be able to make it to his house for dinner because of a flat tire, also look up tire repair places nearby.
# test data data_model = DataModel(reset=True) data_message_content_type = MessageContentType(text="message") data_model.append(data_message_content_type) data_recipient = Contact(text="my brother") data_model.append(data_recipient) data_content = Content( text="I will not be able to make it to his house for dinner because of a flat tire" ) data_model.append(data_content) data_location1 = Location(text="tire repair places", nearby=12) data_model.append(data_location1) data_location2 = Location(text="tire repair places", nearby=11) data_model.append(data_location2) data_location3 = Location(text="tire repair places", nearby=10) data_model.append(data_location3) data_map_entity1 = MapEntity(location=data_location1) data_model.append(data_map_entity1) data_map_entity2 = MapEntity(location=data_location2) data_model.append(data_map_entity2) data_map_entity3 = MapEntity(location=data_location3) data_model.append(data_map_entity3) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": data_content, "message_content_type": data_message_content_type, } ] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([MapEntity])) actual = next(iterator, None) expected = [data_map_entity3] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
b888b298-26bb-53dc-5314-37e723738383
Set a timer for 3:00 PM then enable home security alarm system to stay on until 8:00 PM
# test data data_model = DataModel(reset=True) data_date_time_3pm = DateTime( text="3:00 PM", value=datetime.now().replace(hour=15, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time_3pm) data_home_device_action = HomeDeviceAction(text="enable") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="home security alarm") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="stay on") data_model.append(data_home_device_value) data_date_time_8pm = DateTime( text="until 8:00 PM", value=datetime.now().replace(hour=20, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time_8pm) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(TimerEntity) expected = [{"date_time": data_date_time_3pm}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_action": data_home_device_action, "device_name": data_home_device_name, "device_value": data_home_device_value, "date_time": data_date_time_8pm, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
1d513c0b-cbe3-3b2e-7440-e5e14d0b22ef
If it starts raining between 3pm-5pm, turn the thermostat up to 73 degrees.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="raining") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute_neg) data_date_time = DateTime( text="between 3pm-5pm", value=datetime.now().replace(hour=15, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute, date_time=data_date_time ) ) data_home_device_action = HomeDeviceAction(text="turn") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="the thermostat") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="up tp 73 degrees") data_model.append(data_home_device_value) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [ { "device_action": data_home_device_action, "device_name": data_home_device_name, "device_value": data_home_device_value, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
58a59665-c255-17a7-d64e-05943bb63614
If it starts raining between 3pm-5pm, turn the thermostat up to 73 degrees.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="raining") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="sunny") data_model.append(data_weather_attribute_neg) data_date_time = DateTime( text="between 3pm-5pm", value=datetime.now().replace(hour=15, minute=0, second=0, microsecond=0), ) data_model.append(data_date_time) data_model.append( WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, date_time=data_date_time ) ) data_home_device_action = HomeDeviceAction(text="turn") data_model.append(data_home_device_action) data_home_device_name = HomeDeviceName(text="the thermostat") data_model.append(data_home_device_name) data_home_device_value = HomeDeviceValue(text="up tp 73 degrees") data_model.append(data_home_device_value) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(HomeDeviceEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
c0f00a63-0854-ea1e-cc43-c1f53dfdb559
Show me a map of downtown Phoenix and give me directions to the airport.
# test data data_model = DataModel(reset=True) data_location = Location(text="downtown Phoenix") data_model.append(data_location) data_place = MapEntity(location=data_location) data_model.append(data_place) data_destination = Location(text="airport") data_model.append(data_destination) data_navigation_direction = NavigationDirectionEntity(destination=data_destination) data_model.append(data_navigation_direction) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([MapEntity])) actual = next(iterator, None) expected = [data_place] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_navigation_direction] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
3c26dffc-8a2e-8804-dfe2-c8a1195cfaa5
Play my lofi Spotify playlist and buy tickets to the upcoming Joji show.
# test data data_model = DataModel(reset=True) data_playlist = Playlist(text="my lofi Spotify playlist") data_model.append(data_playlist) data_event_name = EventName(text="the upcoming Joji show") data_model.append(data_event_name) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(MusicEntity) expected = [{"playlist": data_playlist}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(EventTicketEntity) expected = [{"event_name": data_event_name}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
e62d7f1e-b43d-87c2-02d2-f164ba61297e
Check if it's supposed to rain tonight and if it's not text Brian that I want to go out tonight
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="rain") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="not rain") data_model.append(data_weather_attribute_neg) data_date_time = DateTime(text="tonight") data_model.append(data_date_time) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, date_time=data_date_time ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="text") data_model.append(data_message_content_type) data_contact_brian = Contact(text="Brian") data_model.append(data_contact_brian) data_content = Content(text="I want to go out tonight") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "message_content_type": data_message_content_type, "recipient": data_contact_brian, "content": data_content, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
fca81add-6423-fd6d-e07b-86a7f22eb161
Check if it's supposed to rain tonight and if it's not text Brian that I want to go out tonight
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="rain") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="not rain") data_model.append(data_weather_attribute_neg) data_date_time = DateTime(text="tonight") data_model.append(data_date_time) data_weather_forecast = WeatherForecastEntity( weather_attribute=data_weather_attribute, date_time=data_date_time ) data_model.append(data_weather_forecast) data_message_content_type = MessageContentType(text="text") data_model.append(data_message_content_type) data_contact_brian = Contact(text="Brian") data_model.append(data_contact_brian) data_content = Content(text="I want to go out tonight") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
271462c2-cebd-512e-1c20-f9e8409b2e70
Look up free events for this weekend and let me know what the weather will be.
# test data data_model = DataModel(reset=True) data_event_name1 = EventName(text="free events", value="art show") data_model.append(data_event_name1) data_event_name2 = EventName(text="free events", value="community event") data_model.append(data_event_name2) data_date_time1 = DateTime( text="this weekend", value=datetime.now() + timedelta(days=0) ) data_model.append(data_date_time1) data_date_time2 = DateTime( text="this weekend", value=datetime.now() + timedelta(days=0) ) data_model.append(data_date_time2) data_model.append( data_event1 := EventEntity( event_name=data_event_name1, date_time=data_date_time1 ) ) data_model.append( data_event2 := EventEntity( event_name=data_event_name1, date_time=data_date_time2 ) ) data_model.append( data_event3 := EventEntity( event_name=data_event_name2, date_time=data_date_time2 ) ) data_model.append( data_weather_forecast1 := WeatherForecastEntity(date_time=data_date_time1) ) data_model.append( data_weather_forecast2 := WeatherForecastEntity(date_time=data_date_time2) ) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventEntity])) actual = next(iterator, None) expected = [data_event1, data_event2, data_event3] response_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast1, data_weather_forecast2] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
8ee51caa-a2c2-f4ee-2e5b-4b7ef5a89db7
When rain is forecasted for tomorrow? remind me at 9pm the night before to put out Quinten's boots by the front door.
# test data data_model = DataModel(reset=True) data_weather_attribute = WeatherAttribute(text="rain") data_model.append(data_weather_attribute) data_weather_attribute_neg = WeatherAttribute(text="not rain") data_model.append(data_weather_attribute_neg) data_date_time_tomorrow = DateTime( text="tomorrow", ) data_model.append(data_date_time_tomorrow) data_model.append( data_weather_forecast1 := WeatherForecastEntity( weather_attribute=data_weather_attribute, date_time=data_date_time_tomorrow ) ) data_model.append( data_weather_forecast2 := WeatherForecastEntity( weather_attribute=data_weather_attribute_neg, date_time=data_date_time_tomorrow, ) ) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) data_date_time_9pm = DateTime( text="9pm the night before", ) data_model.append(data_date_time_9pm) data_content = Content(text="put out Quinten's boots by the front door") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([WeatherForecastEntity])) actual = next(iterator, None) expected = [data_weather_forecast1] response_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [ { "person_reminded": data_person_reminded, "date_time": data_date_time_9pm, "content": data_content, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
215bb47d-a8fa-c334-2b85-8ac3db09b033
Add almond milk, pomegranate seeds, and granola to my shopping list and set a reminder for Saturday morning at 9am that I need to be home from the store by noon.
# test data data_model = DataModel(reset=True) data_product_name1 = ProductName( text="almond milk, pomegranate seeds, and granola", value="almond milk" ) data_model.append(data_product_name1) data_product_name2 = ProductName( text="almond milk, pomegranate seeds, and granola", value="pomegranate seeds" ) data_model.append(data_product_name2) data_product_name3 = ProductName( text="almond milk, pomegranate seeds, and granola", value="granola" ) data_model.append(data_product_name3) data_shopping_list_name = ShoppingListName(text="my shopping list") data_model.append(data_shopping_list_name) data_date_time = DateTime(text="Saturday morning at 9am") data_model.append(data_date_time) data_content = Content(text="I need to be home from the store by noon") data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(ShoppingListEntity) expected = [ { "product_name": data_product_name, "shopping_list_name": data_shopping_list_name, } for data_product_name in [ data_product_name1, data_product_name2, data_product_name3, ] ] entity_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [ { "date_time": data_date_time, "content": data_content, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
6fb84aed-32fa-cd12-99ee-1e77c8fd2b1a
Check my calendar for this weekend and message Ashley to invite her to lunch for whichever day I have free time in the afternoon.
# test data data_model = DataModel(reset=True) data_event_calendar = EventCalendar(text="my calendar") data_model.append(data_event_calendar) data_date_time1 = DateTime(text="this weekend", value="Saturday") data_model.append(data_date_time1) data_date_time2 = DateTime(text="this weekend", value="Sunday") data_model.append(data_date_time2) data_event1 = EventEntity( event_calendar=data_event_calendar, date_time=data_date_time1 ) data_model.append(data_event1) data_event2 = EventEntity( event_calendar=data_event_calendar, date_time=data_date_time2 ) data_model.append(data_event2) data_recipient = Contact(text="Ashley") data_model.append(data_recipient) data_content = Content( text="invite her to lunch for whichever day I have free time in the afternoon" ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response([EventEntity])) actual = next(iterator, None) expected = [data_event1, data_event2] response_assertions(expected, actual, test_results) actual = data_model.get_data(MessageEntity) expected = [ { "recipient": data_recipient, "content": data_content, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
31bd9b9f-5f7b-338e-41b5-6183a2f3008b
Go shopping and buy multiples of items on my shopping list and prompt me after you buy it, as well as set a reminder of the time it will be delivered.
# test data data_model = DataModel(reset=True) data_shopping_list_name = ShoppingListName(text="my shopping list") data_model.append(data_shopping_list_name) # start code block to test # end code block to test # assertions test_results = {} iterator = iter(data_model.get_response(OrderEntity)) actual = next(iterator, None) expected = OrderEntity(shopping_list_name=data_shopping_list_name) response_assertions([expected], [actual], test_results) actual = data_model.get_data(ReminderEntity) expected = [ { "date_time": DateTime(value=order), } for order in data_model.get_data(OrderEntity) ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
9a79be61-1e02-67e1-d943-da0737c6c51b
Set an alarm for 7:30am and notify me with a reminder 2 hours later that I need to message Vincent with an update on our work project.
# test data data_model = DataModel(reset=True) data_date_time = DateTime(text="7:30am") data_model.append(data_date_time) data_person_reminded = Contact(text="me") data_model.append(data_person_reminded) data_date_time2 = DateTime(text="2 hours later") data_model.append(data_date_time2) data_content = Content( text="I need to message Vincent with an update on our work project" ) data_model.append(data_content) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"date_time": data_date_time}] entity_assertions(expected, actual, test_results) actual = data_model.get_data(ReminderEntity) expected = [ { "person_reminded": data_person_reminded, "date_time": data_date_time2, "content": data_content, } ] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
c8306ae1-39ac-98f4-3293-2286151dc0ec
In the event that Jessica messages with road closure information downtown, create a 3pm alarm, so I can leave earlier.
# test data data_model = DataModel(reset=True) data_sender = Contact(text="Jessica") data_model.append(data_sender) data_content = Content(text="road closure information downtown") data_model.append(data_content) data_content_neg = Content(text="all roads are clear") data_model.append(data_content_neg) data_date_time = DateTime(text="3pm") data_model.append(data_date_time) data_message = MessageEntity(sender=data_sender, content=data_content) data_model.append(data_message) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [{"date_time": data_date_time}] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
9e50a4e6-2ab0-01f0-149a-144043d83e14
In the event that Jessica messages with road closure information downtown, create a 3pm alarm, so I can leave earlier.
# test data data_model = DataModel(reset=True) data_sender = Contact(text="Jessica") data_model.append(data_sender) data_content = Content(text="road closure information downtown") data_model.append(data_content) data_content_neg = Content(text="all roads are clear") data_model.append(data_content_neg) data_date_time = DateTime(text="3pm") data_model.append(data_date_time) data_message = MessageEntity(sender=data_sender, content=data_content_neg) data_model.append(data_message) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(AlarmEntity) expected = [] entity_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
36ba6496-dd1a-39ce-aa44-babed71ee5ea
Order tickets for the art festival this weekend and add the address to my navigation.
# test data data_model = DataModel(reset=True) data_event_name = EventName(text="the art festival") data_model.append(data_event_name) data_date_time1 = DateTime(text="this weekend", value="Saturday") data_model.append(data_date_time1) data_date_time2 = DateTime(text="this weekend", value="Sunday") data_model.append(data_date_time2) data_event1 = EventEntity(event_name=data_event_name, date_time=data_date_time1) data_model.append(data_event1) data_event2 = EventEntity(event_name=data_event_name, date_time=data_date_time2) data_model.append(data_event2) data_destination1 = Location(value=data_event1) data_model.append(data_destination1) data_destination2 = Location(value=data_event2) data_model.append(data_destination2) data_navigation_direction1 = NavigationDirectionEntity( destination=data_destination1 ) data_model.append(data_navigation_direction1) data_navigation_direction2 = NavigationDirectionEntity( destination=data_destination2 ) data_model.append(data_navigation_direction2) # start code block to test # end code block to test # assertions test_results = {} actual = data_model.get_data(EventTicketEntity) expected = [ { "event": data_event1, }, { "event": data_event2, }, ] entity_assertions(expected, actual, test_results) iterator = iter(data_model.get_response([NavigationDirectionEntity])) actual = next(iterator, None) expected = [data_navigation_direction1, data_navigation_direction2] response_assertions(expected, actual, test_results) assert_test(test_results)
from entities.generic import * from entities.calendar import * from entities.home import * from entities.map import * from entities.message import * from entities.music import * from entities.navigation import * from entities.reminder import * from entities.shopping import * from entities.weather import * from actions.calendar import * from actions.clock import * from actions.calendar import * from actions.home import * from actions.map import * from actions.messages import * from actions.music import * from actions.navigation import * from actions.reminders import * from actions.responder import * from actions.shopping import * from actions.weather import * from providers.data_model import DataModel from datetime import datetime, timedelta import utils.api_utils as utils from utils.test_utils import *
e114c448-f4ab-8554-ad14-eff3d66dfeb3

No dataset card yet

New: Create and edit this dataset card directly on the website!

Contribute a Dataset Card
Downloads last month
10
Add dataset card