| def take_a_photo(camera="back", resolution="1080p"): | |
| """ | |
| Captures a photo using the specified camera and resolution settings. | |
| Parameters: | |
| - camera (str, optional): Specifies the camera to use. Can be 'front' or 'back'. The default is 'back'. Optional to provide. | |
| - resolution (str, optional): Sets the photo resolution. Options include '720p', '1080p', and '4K'. The default is '1080p'. Optional to provide. | |
| Returns: | |
| - str: The string contains the file path of the captured photo if successful, or an error message if not. Example: '/storage/emulated/0/Pictures/MyApp/IMG_20240310_123456.jpg' | |
| """ | |
| def get_trending_news(category=None, region='US', language='en', max_results=5): | |
| """ | |
| Fetches trending news articles based on category, region, and language. | |
| Parameters: | |
| - category (str, optional): News category to filter by, by default use None for all categories. Optional to provide. | |
| - region (str, optional): ISO 3166-1 alpha-2 country code for region-specific news, by default, uses 'US'. Optional to provide. | |
| - language (str, optional): ISO 639-1 language code for article language, by default uses 'en'. Optional to provide. | |
| - max_results (int, optional): Maximum number of articles to return, by default, uses 5. Optional to provide. | |
| Returns: | |
| - list[str]: A list of strings, each representing an article. Each string contains the article's heading and URL. | |
| """ | |
| def get_weather_forecast(location, days=1): | |
| """ | |
| Provides a weather forecast for a specified location over a given number of days. Each day's forecast includes a brief description of the expected weather conditions. | |
| Parameters: | |
| - location (str): The location for which the weather forecast is desired. Can be a city name, ZIP code, or other location identifiers. | |
| - days (int, optional): The number of days to include in the forecast, starting from today. The default is 1 day. Optional to provide. | |
| Returns: | |
| - list[str]: A list of strings, each representing the weather forecast for one day. Each string includes the date and a brief description of the weather conditions. Formatted in 'YYYY-MM-DD: Description' format. | |
| """ | |
| def send_email(recipient, subject, body, attachments=None, cc=None, bcc=None): | |
| """ | |
| Sends an email with optional attachments, CC, and BCC. | |
| Parameters: | |
| - recipient (str): Primary recipient's email address. | |
| - subject (str): Email subject line. | |
| - body (str): Main email body content. | |
| - attachments (list of str, optional): A list of file paths representing files to attach to the email. Defaults to None, indicating no attachments. Optional to provide. | |
| - cc (list of str, optional): A list of email addresses to include in the Carbon Copy (CC) field. Defaults to None. Optional to provide. | |
| - bcc (list of str, optional): A list of email addresses to include in the Blind Carbon Copy (BCC) field. Defaults to None. Optional to provide. | |
| Returns: | |
| """ | |
| def search_youtube_videos(query, max_results=10, search_filter="Relevance"): | |
| """ | |
| Searches YouTube for videos matching a query. | |
| Parameters: | |
| - query (str): Search query. | |
| - max_results (int, optional): Maximum number of search results, by default, use 10. Optional to provide. | |
| - search_filter (enum, optional): Filter for search results, chosen from 'Relevance', 'Upload date', 'View Count', 'Rating'. By default, use 'Relevance'. Optional to provide. | |
| Returns: | |
| - list[str]: A list of strings, each string includes video names and URLs. | |
| """ | |
| def find_route_google_maps(origin, destination, mode="driving"): | |
| """ | |
| Computes a route using Google Maps from an origin to a destination. | |
| Parameters: | |
| - origin (str): Starting location. | |
| - destination (str): Target location. | |
| - mode (enum, optional): Mode of transportation, options include 'driving', 'walking', 'bicycling', and 'transit'. The default mode is 'driving'. Optional to provide. | |
| Returns: | |
| - List[str]: The string provides the route details. | |
| """ | |
| def check_nest_smoke_detector_status(): | |
| """ | |
| Check the current status of a Nest Smoke Detector. | |
| Parameters: | |
| Returns: | |
| - str: A message with the detailed smoke detector status. This message includes information about battery level, sensor functionality, and connectivity status. | |
| """ | |
| def send_text_message(contact_name, message): | |
| """ | |
| Sends a text message to the specified contact. | |
| Parameters: | |
| - contact_name (str): The name of the recipient contact. This is the identifier used to locate the contact in the messaging service or device's contact list. | |
| - message (str): The content of the message to be sent. This is what the recipient will receive. | |
| Returns: | |
| """ | |
| def make_phone_call(phone_number): | |
| """ | |
| Initiates a phone call to the given phone number. It can handle both international and domestic numbers. | |
| Parameters: | |
| - phone_number (str): The target phone number. For international numbers, use the international format (+country_code national_number). For domestic numbers, use the standard national format without the country code. | |
| Returns: | |
| """ | |
| def create_contact(name, phone_number, email=None, organization=None, notes=None): | |
| """ | |
| Creates a new contact entry in the device's address book. | |
| Parameters: | |
| - name (str): Full name of the contact. | |
| - phone_number (str): Primary phone number of the contact. | |
| - email (str, optional): Email address of the contact, default is None, optional to provide. | |
| - organization (str, optional): Associated organization name, default is None, optional to provide. | |
| - notes (str, optional): Additional notes or comments, default is None, optional to provide. | |
| Returns: | |
| """ | |
| def set_timer_alarm(time, repeat=False, label=None): | |
| """ | |
| Sets a timer or alarm for a specified time. | |
| Parameters: | |
| - time (str): Alarm time in "HH:MM" 24-hour format. For example, "07:12" for 7:12 AM. | |
| - repeat (bool, optional): Whether the alarm should repeat daily, default is False, optional to provide. | |
| - label (str, optional): Custom label for the alarm, default is None, optional to provide. | |
| Returns: | |
| """ | |
| def change_screen_brightness(level): | |
| """ | |
| Adjust the device's screen brightness level. | |
| Parameters: | |
| - level (int): Desired brightness level, on a scale from 0 (minimum) to 10 (maximum). | |
| Returns: | |
| """ | |
| def create_calendar_event(title, start_time, end_time, location=None, description=None): | |
| """ | |
| Schedules a new event in the calendar. | |
| Parameters: | |
| - title (str): Event title. | |
| - start_time (str): Event start time as a string in ISO 8601 format "YYYY-MM-DD-HH-MM". For example, "2022-12-31-23-59" for 11:59 PM on December 31, 2022. | |
| - end_time (str): Event end time as a string in ISO 8601 format "YYYY-MM-DD-HH-MM". Must be after start_time. For example, "2023-01-01-00-00" for 12:00 AM on January 1, 2023. | |
| - location (str, optional): Location of the event. The default is None, optional to provide. | |
| - description (str, optional): Detailed event description. The default is None, optional to provide. | |
| Returns: | |
| """ | |
| def set_volume(level, volume_type = VolumeType.RING): | |
| """ | |
| Sets the volume level for a specified type (ring, media, alarm). | |
| Parameters: | |
| - level (int): Target volume level, from 0 (mute) to 10 (maximum). | |
| - volume_type (enum): The category of volume to adjust, select from VolumeType.RING, VolumeType.MEDIA, VolumeType.ALARM, by default it is VolumeType.RING, optional to provide. | |
| Returns: | |
| """ | |
| def connect_to_bluetooth_device(device_name, timeout=10): | |
| """ | |
| Attempts to connect to a specified Bluetooth device within a given timeout. | |
| Parameters: | |
| - device_name (str): The name of the Bluetooth device to connect to. | |
| - timeout (int, optional): The maximum time, in seconds, to attempt a connection. The default is 10 seconds. Optional to provide. | |
| Returns: | |
| - bool: Returns True if the device was successfully connected within the timeout period, False otherwise. | |
| """ | |
| def enable_do_not_disturb(enabled): | |
| """ | |
| Toggles the Do Not Disturb mode on or off. | |
| Parameters: | |
| - enabled (bool): True to enable, False to disable Do Not Disturb mode. | |
| Returns: | |
| """ | |
| def set_nest_temperature(target_temperature): | |
| """ | |
| Sets a Nest Thermostat to a desired temperature. | |
| Parameters: | |
| - target_temperature (float): Target temperature in degrees Fahrenheit, ranging from 50 to 90. | |
| Returns: | |
| """ | |
| def play_music_on_nest_hub(music_service, playlist_name): | |
| """ | |
| Streams music on a Google Nest Audio device from a specified service. | |
| Parameters: | |
| - music_service (str): Music streaming service name. | |
| - playlist_name (str): Playlist name to play. | |
| Returns: | |
| """ | |
| def play_video_on_nest_hub(video_service, playlist_name, resolution="2K"): | |
| """ | |
| Streams video on a Google Nest Hub device from a specified service. | |
| Parameters: | |
| - video_service (str): Video streaming service name. | |
| - playlist_name (str): Video playlist name to play. | |
| - resolution (enum, optional): Desired video resolution, chosen from '360p', '720p', '1080p', '2K', '4K'. default is '1080p', optional to provide. | |
| Returns: | |
| """ | |
| def open_or_lock_door(status): | |
| """ | |
| Opens or locks a door using a Google-compatible smart lock. | |
| Parameters: | |
| - status (enum): Desired action, chosen from 'open' or 'lock'. | |
| Returns: | |
| """ |