CoolFace
Modelpublic

NexaAI/Octopus-v2

sourceHugging Facecc-by-nc-4.0updated 2y agoView on Hugging Face
892likes464downloads
android_functions.txt238 linesDownload Raw Back to root
1def take_a_photo(camera):2    """3    Captures a photo using the specified camera and resolution settings.4 5    Parameters:6    - camera (str): Specifies the camera to use. Can be 'front' or 'back'. The default is 'back'.7 8    Returns:9    - 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'10    """11 12 13def get_trending_news(query, language):14    """15    Retrieves a collection of trending news articles relevant to a specified query and language.16 17    Parameters:18    - query (str): Topic for news articles.19    - language (str): ISO 639-1 language code. The default language is English ('en'), but it can be set to any valid ISO 639-1 code to accommodate different language preferences (e.g., 'es' for Spanish, 'fr' for French).20 21    Returns:22    - list[str]: A list of strings, where each string represents a single news article. Each article representation includes the article's title and its URL, allowing users to easily access the full article for detailed information.23    """24 25 26def get_weather_forecast(location):27    """28    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.29 30    Parameters:31    - location (str): The location for which the weather forecast is desired. Can be a city name, ZIP code, or other location identifiers.32 33    Returns:34    - 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.35    """36 37 38def send_email(recipient, title, content):39    """40    Sends an email to a specified recipient with a given title and content.41 42    Parameters:43    - recipient (str): The email address of the recipient.44    - title (str): The subject line of the email. This is a brief summary or title of the email's purpose or content.45    - content (str): The main body text of the email. It contains the primary message, information, or content that is intended to be communicated to the recipient.46 47    Returns:48    """49 50 51def search_youtube_videos(query):52    """53    Searches YouTube for videos matching a query.54 55    Parameters:56    - query (str): Search query.57 58    Returns:59    - list[str]: A list of strings, each string includes video names and URLs.60    """61 62 63def find_route_google_maps(origin, destination, mode):64    """65    Computes a route using Google Maps from an origin to a destination.66 67    Parameters:68    - origin (str): Starting location.69    - destination (str): Target location.70    - mode (enum): Mode of transportation, options include 'driving', 'walking', 'bicycling', and 'transit'. The default mode is 'driving'.71 72    Returns:73    - List[str]:  The string provides the route details.74    """75 76 77def check_nest_smoke_detector_status():78    """79    Check the current status of a Nest Smoke Detector.80 81    Parameters:82 83    Returns:84    - str: A message with the detailed smoke detector status. This message includes information about battery level, sensor functionality, and connectivity status.85    """86 87 88def send_text_message(contact_name, message):89    """90    Sends a text message to the specified contact.91 92    Parameters:93    - contact_name (str): The name of the recipient contact.94    - message (str): The content of the message to be sent. This is what the recipient will receive.95 96    Returns:97    """98 99 100def make_phone_call(phone_number):101    """102    Initiates a phone call to the given phone number. It can handle both international and domestic numbers.103 104    Parameters:105    - phone_number (str): phone number of the contact. The phone number should be provided in a standard format, preferably in E.164 format (e.g., +12345678900 for an international format).106 107    Returns:108    """109 110 111def create_contact(name, phone_number):112    """113    Creates a new contact entry in the device's address book.114 115    Parameters:116    - name (str): Full name of the contact. This should include first and last name.117    - phone_number (str): phone number of the contact. The phone number should be provided in a standard format, preferably in E.164 format (e.g., +12345678900 for an international format).118 119    Returns:120    """121 122 123def set_timer_alarm(time, label):124    """125    Sets a timer or alarm for a specified time.126 127    Parameters:128    - time (str): Alarm time in "HH:MM" 24-hour format. For example, "07:12" for 7:12 AM.129    - label (str): Custom label for the alarm, default is "alarm".130 131    Returns:132    """133 134 135def change_screen_brightness(level):136    """137    Adjust the device's screen brightness level.138 139    Parameters:140    - level (int): Desired brightness level, on a scale from 0 (minimum) to 10 (maximum).141 142    Returns:143    """144 145 146def create_calendar_event(title, start_time, end_time):147    """148    Schedules a new event in the calendar.149 150    Parameters:151    - title (str): Event title.152    - 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.153    - 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.154 155    Returns:156    """157 158 159def set_volume(level, volume_type):160    """161    Sets the volume level for a specified type : "ring" , "media" , "alarm".162 163    Parameters:164    - level (int): Target volume level, from 0 (mute) to 10 (maximum).165    - volume_type (enum): The category of volume to adjust, select from "ring" , "media" , "alarm".166 167    Returns:168    """169 170 171def connect_to_bluetooth_device(device_name, timeout):172    """173    Attempts to connect to a specified Bluetooth device within a given timeout.174 175    Parameters:176    - device_name (str): The name of the Bluetooth device to connect to.177    - timeout (int): The maximum time, in seconds, to attempt a connection. The default is 10 seconds.178 179    Returns:180    - bool: Returns True if the device was successfully connected within the timeout period, False otherwise.181    """182 183 184def enable_do_not_disturb(enabled):185    """186    Toggles the Do Not Disturb mode on or off.187 188    Parameters:189    - enabled (bool): True to enable, False to disable Do Not Disturb mode.190 191    Returns:192    """193 194 195def set_nest_temperature(target_temperature):196    """197    Sets a Nest Thermostat to a desired temperature.198 199    Parameters:200    - target_temperature (float): Target temperature in degrees Fahrenheit, ranging from 50 to 90.201 202    Returns:203    """204 205 206def play_music_on_nest_hub(music_service, music_name):207    """208    Streams music on a Google Nest Audio device from a specified service.209 210    Parameters:211    - music_service (str): Music streaming service name.212    - music_name (str): Playlist name to play.213 214    Returns:215    """216 217 218def play_video_on_nest_hub(video_service, video_name):219    """220    Streams video on a Google Nest Hub device from a specified service.221 222    Parameters:223    - video_service (str): Video streaming service name.224    - video_name (str): Video playlist name to play.225 226    Returns:227    """228 229 230def open_or_lock_door(status):231    """232    Opens or locks a door using a Google-compatible smart lock.233 234    Parameters:235    - status (enum): Desired action, chosen from 'open' or 'lock'.236 237    Returns:238    """