class @org.thingpedia.builtin.thingengine.builtin extends @org.thingpedia.volume-control #_[thingpedia_name="Miscellaneous Interfaces"] #_[thingpedia_description="Time, random numbers, and other commands not specific to any skill."] #_[name="Miscellaneous Interfaces"] #_[description="Time, random numbers, and other commands not specific to any skill."] #_[canonical="miscellaneous interfaces"] #_[help="I can give you the current date and time, pick random numbers, and help you set various preferences."] #[repository="https://github.com/stanford-oval/genie-toolkit"] #[subcategory="service"] #[license="Apache-2.0"] #[license_gplcompatible=true] { import loader from @org.thingpedia.builtin(); import config from @org.thingpedia.config.builtin(); monitorable query get_gps(out location: Location #_[canonical={ default="preposition", base=["coordinates"], preposition=["in #", "at #", "around #"] }], out altitude: Measure(m) #_[canonical={ default="base", base=["altitude"], preposition=["at # above sea level"] }] #[min_number=0m] #[max_number=15000m], // not approved for use in the ISS out bearing: Number #_[canonical={ base=["bearing"], passive_verb=["facing #"] // FIXME we want to say "facing 30 degrees north" but we can't quite do that... }], out speed: Measure(mps) #_[canonical={ base=["speed"], passive_verb=["going at #", "moving at #"], preposition=["at #"] }] ) #_[canonical=["my current location", "my current position", "my current geocoordinates"]] #_[result=["your current location is ${location}", "you are currently in ${location}"]] #_[on_error={ unsupported_platform=["i cannot access your location in this version of Genie"] }] #[minimal_projection=["location"]] #[poll_interval=0ms] #[doc="get last known GPS location"] #[confirm=false]; query get_time(out time: Time #_[canonical=["time"]] #[filterable=false]) #_[canonical=["current time", "time", "time of day"]] #_[result=["right now, it's ${time}", "it's ${time}", "the current time is ${time}"]] #[doc="get the current time"] #[confirm=false]; query get_date(out date: Date #_[canonical=["date"]] #[filterable=false]) #_[canonical=["today 's date", "date", "current date"]] #_[confirmation="today's date"] #_[result=["today is ${date}-absolute."]] #[doc="get the current date"] #[confirm=false]; query get_random_between(in opt low: Number #_[canonical={ base=["lower bound", "minimum number"], passive_verb=["higher than #", "more than #"] // the sentence is "give me a random number higher than X", so "higher than X" is pvp not apv }], in opt high: Number #_[canonical={ base=["upper bound", "maximum number"], passive_verb=["higher than #", "more than #"] // the sentence is "give me a random number higher than X", so "higher than X" is pvp not apv }], out random: Number #_[canonical={ base=["number", "result"], }] #[filterable=false]) #_[canonical=["random number", "random integer"]] #_[result=["${random}", "your number is ${random}", "i chose ${random}"]] #_[confirmation="a random integer between $low and $high"] #[doc="get a uniform random integer between `low` and `high`"] #[confirm=false]; query get_name(out name: String #[string_values="tt:person_first_name"] #_[canonical=["name"]] #[filterable=false]) #_[canonical=["my name", "user 's name"]] #_[result=["your name is ${name}", "you are ${name}"]] #_[on_error={ unset=["i do not know your name yet . would you like to tell me ?", "you have not told me your name yet"], }] #_[confirmation="your name"] #[doc="get the user's preferred name (a setting)"] #[confirm=false]; // XXX this is temporary, long term we'll merge this with "list available skills" query device_info(in req id : Entity(tt:device) #_[canonical={ base=["name"], passive_verb=["named #", "called #"], }], out help : String #_[canonical={ base=["help", "documentation"] }] #[string_values="tt:long_free_text"] #[filterable=false], out description : String #_[canonical={ base=["description"] }] #[string_values="tt:long_free_text"] #[filterable=false], out category : Enum(service, media, social_network, communication, home, health, data_management) #_[canonical={ base=["category"], adjective=["#"], preposition=["in the # category"] }], out thingpedia_url : Entity(tt:url) #_[canonical={ base=["thingpedia page", "thingpedia link"] }] #[filterable=false], out website : Entity(tt:url) #_[canonical={ base=["website", "link", "url"] }] #[filterable=false], out issue_tracker : Entity(tt:url) #_[canonical={ base=["issue tracking website", "bug report url"] }] #[filterable=false]) #_[canonical=["information about a device", "information about a skill", "information about a thingpedia device", "information about a supported skill", "help about a skill", "skill help", "skill documentation", "help with a skill"]] #_[result=["with ${id} , ${help} . visit the thingpedia page for additional information", "the description of ${id} is ${description} . visit the thingpedia page for additional information"]] #_[formatted=[{type="rdl",displayTitle="${id}",webCallback="${thingpedia_url}"}]] #[doc="query info about supported Thingpedia devices"] // specify minimal_projection explicitly otherwise we'll default to ["id"] // which is incorrect because "id" is input not output #[minimal_projection=[]] #[confirm=false]; list query configured_device_info(out id : Entity(tt:device_id) #_[canonical={ base=["name"], passive_verb=["named #", "called #"] }], out description : String #_[canonical={ base=["description"] }] #[string_values="tt:long_free_text"] #[filterable=false], out kind : Entity(tt:device) #_[canonical={ base=["kind"], adjective=["#"], preposition=["in the # kind"] }], out version : Number #_[canonical={ base=["version"], passive_verb=["version #"] }], out category : Enum(physical, online, data, system) #_[canonical={ base=["category"], adjective=["#"], preposition=["in the # category"] }], out is_transient : Boolean #_[canonical={ base=["is transient"] }], out auth_type : String #_[canonical={ base=["authentication type"] }] #[filterable=false]) #_[canonical=["information about configured devices", "information about configured entities", "configured devices", "configured entities", "device list", "entity list", "iot devices", "iot entities"]] #_[result={ list="You have ${id}" }] #[doc="query info about configured devices"] #[minimal_projection=[]] #[confirm=false]; /* list query commands(out id : Entity(tt:command_id), out device: Entity(tt:device) #_[canonical={ base=["device", "account", "skill"], adjective=["# 's"], preposition=["of #", "in #"] }] #_[prompt=["what device do you want help for", "for what device"]], out program: Entity(tt:program) #_[canonical=["program", "command"]] #[filterable=false]) #_[canonical="supported command"] #_[confirmation="the list of commands of $device"] #[doc="retrieve the list of supported commands for the given device"] #[confirm=false]; */ action open_url(in req url: Entity(tt:url) #_[prompt=["what url do you want to open", "what do you want to open"]] #_[canonical={ base=["url", "link", "page"], preposition=["to #"] }]) #_[canonical=["open a url", "open a link"]] #_[on_error={ unsupported_platform=["opening files is not possible in this version of Genie"] }] #[doc="open a file/link"] #[confirm=false]; action say(in req message: String #_[prompt="what would you like me to say"] #[string_values="tt:long_free_text"] #_[canonical="message"], out message_output: String #_[canonical="message"]) #_[result="${message_output}"] #_[formatted=[ { type="sound", name="alarm-clock-elapsed", exclusive=false, before=true } ]] #_[canonical="say"] #[doc="makes Genie say something"] #[confirm=false]; action alert(out time: Time #_[canonical=["time"]]) #_[result="It is ${time}"] #_[formatted=[ { type="sound", name="alarm-clock-elapsed", exclusive=false, before=true } ]] #_[canonical="alert"] #[doc="makes Genie show/play a generic alert"] #[confirm=false]; action timer_expire(out duration: Measure(ms) #_[canonical="duration"]) #_[result="It has been ${duration}"] #_[formatted=[ { type="sound", name="alarm-clock-elapsed", exclusive=false, before=true } ]] #_[canonical="timer expire"] #[doc="makes Genie play a generic alert and show/say the elapsed time"] #[confirm=false]; action debug_log(in req message: String #_[prompt=["what should i write in the logs", "what do you want me to write"]] #[string_values="tt:long_free_text"] #_[canonical="message"]) #_[canonical=["log a message", "record a message", "write a message in the logs"]] #_[confirmation="write $message in the developer logs"] #[doc="log a message in the developer logs"] #[confirm=false]; action faq_reply(in req question: Enum(__faq__) #_[prompt="what would you like to know"] #_[canonical="message"], out reply: String #_[canonical=["reply", "answer"]]) #_[result="${reply}"] #_[canonical="ask question about Genie"] #_[confirmation="reply to $question"] #[doc="asks a question about Genie"] #[confirm=false]; action configure(in req device: Entity(tt:device) #_[prompt="what device do you want to configure"]) #_[canonical=["configure a new skill", "enable a new skill"]] #_[on_error={ unsupported_skill=["i do not know ${device} yet", "${device} is not supported yet"], unsupported_platform=["you need to go to the configure new skill page to enable new skills"], }] #_[confirmation="configure a new $device"] #[doc="configure a specific device by type"] #[confirm=false]; /* action discover() #_[canonical="discover"] #_[confirmation="search for new devices"] #[doc="start interactive discovery for new devices"] #[confirm=false]; */ action set_language(in req language : Entity(tt:iso_lang_code) #_[canonical={ base=["language"], preposition=["to #"] }]) #_[canonical=["set the language", "change the language", "set the assistant language", "set the language of the assistant"]] #_[on_error={ unsupported_language=["${language} is not supported yet", "i do not support ${language} yet"], unsupported_platform_cloud=["you need to go to the user profile page to change the language"], }] #_[confirmation="set the language to $language"] #[doc="change the assistant language (not supported on all platforms)"] #[confirm=false]; action set_timezone(in req timezone : Entity(tt:timezone) #_[canonical={ base=["time zone"], preposition=["to #"] }]) #_[canonical=["set the time zone", "change the time zone", "set the time zone of the assistant"]] #_[on_error={ unsupported_platform=["i cannot change the time zone on this system . use the system settings to change my timezone"], unsupported_platform_cloud=["you need to go to the user profile page to change the time zone"], }] #_[confirmation="set the time zone to $timezone"] #[doc="change the assistant time zone (not supported on all platforms)"] #[confirm=false]; action set_wake_word(in req word : String #[string_values="tt:word"] #_[canonical={ base=["word"], preposition=["to #"] }]) #_[canonical=["set the name of the assistant", "set the wake word", "set the hot word", "change the wake word", "set the assistant name", "change the assistant name"]] #_[on_error={ unsupported=["changing the wake word is not supported yet", "i do not yet support changing my name"], }] #_[confirmation="set the wake word to $language"] #[doc="change the assistant name (wake word) (not supported yet)"] #[confirm=false]; action set_voice_output(in req status : Enum(on, off) #_[canonical={ base=["status", "preference"], preposition=["to #"], }]) #_[canonical=["change the voice output setting"]] #_[on_error={ unsupported=["voice output is not supported on this platform"], }] #_[confirmation="turn ${status} voice output"] #[doc="turn on or off voice output"] #[confirm=false]; action set_voice_input(in req status : Enum(on, off) #_[canonical={ base=["status", "preference"], preposition=["to #"], }]) #_[canonical=["change the voice input setting"]] #_[on_error={ unsupported=["voice input is not supported on this platform"], }] #_[confirmation="turn ${status} voice input"] #[doc="turn on or off voice input"] #[confirm=false]; action set_name(in req name : String #[string_values="tt:person_first_name"] #_[canonical={ base=["name"], preposition=["to #"], }]) #_[canonical=["change my name", "set my name"]] #_[confirmation="change your name to ${name}"] #[doc="change the user's preferred name (a setting)"] #[confirm=false]; action set_location(in opt type : Enum(current,home,work) #_[prompt="what type of location would you like to change"] #[default=enum(current)], in req location : Location #_[canonical={ base=["location", "place", "address"], preposition=["to #", "as #"], }]) #_[canonical=["set my location", "set my address", "remember my location", "configure my location"]] #_[confirmation="change your ${type} location to ${name}"] #[doc="change the user's preferred locations (a setting)"] #[confirm=false]; action set_temperature_unit(in req unit : Enum(celsius,fahrenheit,kelvin) #_[prompt="what unit should i use"] #_[canonical={ base=["unit"], preposition=["to #", "as #"], }]) #_[canonical=["set my preferred temperature unit", "change the temperature unit", "set the default temperature unit"]] #[doc="change the user's preferred temperature unit (a setting)"] #[confirm=false]; action stop() #_[canonical=["stop audio", "stop playing", "stop playback"]] #[doc="pause the currently playing skill"] #[confirm=false]; action pause() #_[canonical=["pause", "pause audio", "pause playback", "pause playing"]] #[doc="pause the currently playing skill"] #[confirm=false]; action resume() #_[canonical=["resume", "resume audio", "resume playback", "resume playing", "start playing again", "continue playback", "continue playing"]] #[doc="resume the currently playing skill"] #[confirm=false] #_[on_error={ unsupported=["the current skill does not support resuming audio. please report this issue to the skill developer."], no_device_playing=["nothing is currently playing yet. to play music, you can say play music."], }]; /* action next() #_[canonical=["next"]] #[doc="go next for the currently playing skill"] #[confirm=false]; action previous() #_[canonical=["previous"]] #[doc="go previous for the currently playing skill"] #[confirm=false]; */ }