skill module¶
-
class
skill.
Covid19
¶ Bases:
skill.Skill
[This skill provides the user, with covid-19 statistics from www.worldometers.info]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
error
(user: str, country: str, response: str, AIstatus: str, status: dict)¶ [Method that runs if the run() method fails to retrieve information]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
country (str) – [Country for which Covid-19 statistics were requested]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
prepare
(request: str, AIstatus: str, status: dict)¶ [Method that prepares the environment to retrieve Covid-19 statistics]
- Parameters
request (str) – [User’s request in raw format]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
- Returns
[Country for which Covid-19 statistics are required]
- Return type
[str]
-
run
(country: str, response: str, status: dict, AIstatus: str)¶ [Method that retrieves the Covid-19 statistics, and provides the information back to the user]
- Parameters
country (str) – [Country for which the Covid-19 statistics are required]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
-
class
skill.
Date
¶ Bases:
skill.Skill
[This skill provides the current date]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
prepare
(AIstatus: str, status: list)¶ [Method that retrieves the current date]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (list) – [Virtual assistant’s statuses available]
- Returns
[Current date]
- Return type
[str]
-
run
(date_today: str, AIstatus: str, response: str, status: dict)¶ [Method that returns the current date, and provides the information back to the user]
- Parameters
date_today (str) – [Current date]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
class
skill.
Definition
¶ Bases:
skill.Skill
[This skill provides the user a definition for a certain word from wikipedia]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
error
(user: str, word: str, response: str, AIstatus: str, status: dict)¶ [Method that runs if the run() method fails to retrieve information]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
word (str) – [The word for which the definition is requested for]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
prepare
(AIstatus: str, request: str, status: dict)¶ [Method that prepares the environment to retrieve a definition]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
request (str) – [User’s request in raw format]
status (dict) – [Virtual assistant’s statuses available]
- Returns
[The word for which the definition is request for]
- Return type
[str]
-
run
(response: str, AIstatus: str, word: str, status: dict)¶ [Method that retrieves the definition for the word requested, and provides the information back to the user]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
word (str) – [The word for which the definition was requested for]
status (dict) – [Virtual assistant’s statuses available]
-
class
skill.
Emergency
(user_device: str)¶ Bases:
skill.Skill
[This skill sends an emergency message, and calls the emergencies]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
confirm_send_SOS
(response: str, AIstatus: str, user_is_registered: bool, user_has_SOS_contact: bool)¶ [Method that allows the user to cancel the action of sending an emergency message and calling the emergencies]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
user_is_registered (bool) –
True -> the user is registered on the device
False -> the user is not registered on the device
user_has_SOS_contact (bool) –
True -> the user has an SOS contact designated
False -> the user has no SOS contact designated
- Returns
[“cancel” if the user cancels the action]
- Return type
[str]
-
run
(response: str, AIstatus: str, conn: object, status: dict, user_is_registered: bool, user_has_SOS_contact: bool)¶ - [Method that sends an emergency text message to the SOS contact and calls the emergency]
- Note
Performing the emergency call, I used the phone number of the SOS contact, but it can be replaced by 112 or 911
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
conn (Communication) – [GPS object]
status (dict) – [Virtual assistant’s statuses available]
user_is_registered (bool) –
True -> the user is registered on the deice
False -> the user is not registered on the device
user_has_SOS_contact (bool) –
True -> the user has an SOS contact designated
False -> the user has no SOS contact designated
-
class
skill.
Good_bye
¶ Bases:
skill.Skill
[This skill provides a good-bye message for the user]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
prepare
()¶ [Method that chooses a random good-bye message from a list]
- Returns
[Good-bye message]
- Return type
[str]
-
run
(AIstatus: str, response: str, message: str, status: dict)¶ [Method that retrieves a good-bye message, and provides the information back to the user]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
message (str) – [Good-bye message]
status (dict) – [Virtual assistant’s statuses available]
-
class
skill.
Greeting
¶ Bases:
skill.Skill
[This skill greets the user when the virtual assistant starts]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
prepare
(user: str)¶ [Method that prepares the greeting according to the current time of the day]
- Parameters
user (str) – [The user standing in front of the camera]
- Returns
[Greeting]
- Return type
[str]
-
run
(greeting: str, response: str)¶ [Method that greets the user that stands in front of the camera]
- Parameters
greeting (str) – [Greeting]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
class
skill.
Help
¶ Bases:
skill.Skill
[This skill provides the user some guidance on how to use the device]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
SOS_help
(user: str)¶ [SOS help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[SOS guidance]
- Return type
[str]
-
covid_help
(user: str)¶ [Covid-19 help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[Covid-19 guidance]
- Return type
[str]
-
error
(AIstatus: str, status: dict, response: str, user: str)¶ [Method that runs if the run() method fails to retrieve information]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
user (str) – [The name of the user that stands in front of the camera]
-
general_help
(user: str)¶ [General help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[General guidance on how to use the device]
- Return type
[str]
-
list_help
(user: str)¶ [Lists help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[Lists guidance]
- Return type
[str]
-
location_help
(user: str)¶ [Location help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[Location guidance]
- Return type
[str]
-
prepare
(AIstatus: str, status: dict, request: str)¶ [Method that prepares the environment to retrieve the help requested]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
request (str) – [User’s request in raw format]
status (dict) – [Virtual assistant’s statuses available]
- Returns
[The subject on which the user needs help with]
- Return type
str
-
register_help
(user: str)¶ [Register help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[Register guidance]
- Return type
[str]
-
run
(subject: str, AIstatus: str, status: dict, response: str, user: str)¶ [Method that retrieves the requested guidance about the device, and provides the information back to the user]
- Parameters
subject (str) – [The subject on which the user needs help with]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
user (str) – [The name of the user that stands in front of the camera]
-
weather_help
(user: str)¶ [Weather help]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
- Returns
[Weather guidance]
- Return type
[str]
-
class
skill.
List
(user_device: str)¶ Bases:
skill.Skill
[This skill allows the user to manipulate personal lists]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
add_item_to_list
(AIstatus: str, status: dict, name: str, the_list: str, item_to_add: str)¶ [Method that adds an item to a certain list and updates the pickle file containing the lists]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
name (str) – [The name of the user standing in front of the camera]
the_list (str) – [Name of the list where the item will be added]
item_to_add (str) – [Name of the item to be added]
- Returns
True -> the item was added to the list
False -> the item was not added to the list
- Return type
[type]
-
create_list
(name: str, AIstatus: str, status: dict, response: str, name_list: str)¶ [Method that creates a list and adds it to the correct pickle file]
- Parameters
name (str) – [Name of the user standing in front of the camera]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
name_list (str) – [Name of the list that needs to be created]
-
delete_item_from_list
(AIstatus: str, status: str, name: str, the_list: str, item_to_delete: str, response: str)¶ [Methods that deletes an item from a certain list and updates the pickle file containing the lists]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (str) – [Virtual assistant’s statuses available]
name (str) – [Name of the user in front of the camera]
the_list (str) – [Name of the list, from which an item will be deleted]
item_to_delete (str) – [Item to be deleted from the list]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
- Returns
True -> the item was removed from the list
False -> the item was not removed from the list
- Return type
[bool]
-
delete_list
(AIstatus: str, response: str, name_list: str, status: dict, name: str)¶ [Method that deletes a list from the pickle file]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
name_list (str) – [Name of the list to be deleted]
status (dict) – [Virtual assistant’s statuses available]
name (str) – [Name of the user in front of the camera]
-
error
(response: str, AIstatus: str, status: dict)¶ [Method that runs if the user requesting to manipulate a list is not registered on the device]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
list_exists
(lists: dict, name_of_list: str)¶ [Method that checks if a specific list already exists]
- Parameters
lists (dict) – [All saved lists]
name_of_list (str) – [List that needs to created]
- Returns
True -> the list already exists
False -> the list does not exist
- Return type
[type]
-
run_add_item_to_list
(AIstatus: str, response: str, status: dict, understanding: str, request: str)¶ [Method that prepares the environment to add an item to a list]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
request (str) – [User’s request in raw format]
-
run_create_list
(response: str, AIstatus: str, understanding: str, status: dict)¶ [Method that prepares the creation of a list]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
run_delete_list
(AIstatus: str, response: str, status: dict, understanding: str)¶ [Method that prepares the environment to delete of a certain list]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
-
run_remove_item_from_list
(AIstatus: str, status: dict, understanding: str, response: str, request: str)¶ [Method that prepares the environment to remove an item from a list]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
request (str) – [User’s request in raw format]
-
run_see_list
(AIstatus: str, response: str, status: dict, request: str, understanding: str)¶ [Method that prepares the environment to retrieve a certain list and its items]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
request (str) – [User’s request in raw format]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
-
see_all_lists
(AIstatus: str, status: dict, response: str)¶ [Method that retrieves all the lists that the user has already]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
see_list
(AIstatus: str, response: str, the_list: str, status: dict, name: str)¶ [Method that retrieves a certain list from the pickle file]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
the_list (str) – [List to be displayed]
status (dict) – [Virtual assistant’s statuses available]
name (str) – [Name of the user in front of the camera]
-
class
skill.
Location
¶ Bases:
skill.Skill
[This skill provides the user with details about a specific location, using Google Location API]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
call
(phone_number: str, location: str, conn: object, response: str, AIstatus: str, status: dict)¶ [Method that performs a call to a specific location]
- Parameters
phone_number (str) – [Location’s phone number]
location (str) – [Location’s details]
conn (Communication) – [GPS object]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
prepare
(request: str)¶ [Method that prepares the environment to retrieve location details]
- Parameters
request (str) – [User’s request in raw format]
- Returns
[User’s request after being cleaned from unnecessary words]
- Return type
str
-
run
(AIstatus: str, location: str, response: str, status: dict, conn: object, call: bool)¶ [Method that retrieves location details and provides the information back to the user]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
location (str) – [The location the user requested details about]
status (dict) – [Virtual assistant’s statuses available]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
class
skill.
Register
¶ Bases:
skill.Skill
[This skill registers a new user on the device]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
get_name
(AIstatus: str, response: str, understanding: str, user: str)¶ [Method that retrieves the name the user wants to use to register on the device]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
user (str) – [The name of the user that stands in front of the camera]
- Returns
[The name the user wants to be registered with]
- Return type
[str]
-
prepare
(name: str)¶ [Method that prepares the environment to run the registration]
- Parameters
name (str) – [Name of the user standing in front of the mirror (“stranger” if the user is not registered)]
- Returns
True -> The user is not registered
False -> The user is already registered
- Return type
[bool]
-
registration_diaglog
(picture_number: int, name: str, len_images: int, response)¶ [Method that makes the registration interactive, by communicating with the user during the process]
- Parameters
picture_number (int) – [The picture number that the process of training is at]
name (str) – [The name of the user and the name of the folder where the pictures are]
len_images (int) – [The total number of pictures used for the registration process]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
run
(AIstatus: str, cameraRunning: bool, name: str, response: str, status: dict)¶ Method that controls the registration process.
This method takes control of the camera module from the main Camera process until pictures with the user are taken
When the process of taking pictures with the user is finished, the control of the camera module is given back to the main Camera process
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
cameraRunning (bool) – [Variable that controls the camera module for the main Camera process]
name (str) – [Name of the user that registers]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
take_pictures
(name: str, response: str)¶ [Method takes approximately 80 pictures with the user that is in front of the camera]
- Parameters
name (str) – [Name of the user that registers]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
train
(name: str, response: str)¶ [Method that trains the device to recognize a certain user. This method converts images to embedded 128-d vectors and saves the vector to a pickle file]
- Parameters
name (str) – [Name of the user that requested to register]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
-
user_exists
(user: str, response: str)¶ [Method that checks if the user requesting to register is already registered or not]
- Parameters
user (str) –
Name of the user requesting to register:
stranger -> unregistered user
other name -> if the user is already registered
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
- Returns
True - > the user is already registered
False -> the user is not registered
- Return type
[bool]
-
class
skill.
SOS
(user: str)¶ Bases:
skill.Skill
[This skill manages the SOS contact]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
get_name
(response: str, AIstatus: str, understanding: str)¶ [Method that retrieves the name of the emergency contact from the user]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
- Returns
[Name of the emergency contact]
- Return type
[str]
-
get_phone_number
(response: str, AIstatus: str, name: str, understanding: str)¶ [Method that retrieves the phone number of the emergency contact from the user]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
name (str) – [Name of the emergency contact]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
- Returns
[Phone number of the emergency contact]
- Return type
[str]
-
run_add_contact
(response: str, AIstatus: str, conn: object, understanding: str, status: dict, user_is_registered: bool)¶ [Mehtod that controls the creation of the SOS contact]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
conn (Communication) – [GPS object]
understanding (str) – [What the virtual assistant understood from the user’s request (in text format). This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
user_is_registered (bool) –
True -> the user is registered on the device
False -> the user is not registered on the device
-
save_contact
(name: str, number: str, name_user: str)¶ [Saving the new emergency contact in a pickle file]
- Parameters
name (str) – [Name of the emergency contact]
number (str) – [Phone number of the emergency contact]
name_user (str) – [Name of the user in front of the camera]
-
send_sms_to_new_contact
(response: str, AIstatus: str, conn: object, name: str, number: str)¶ [Method that sends a text message to the emergency contact, informing that particular person that it had been assigned as an emergency contact by the user]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
conn (Communication) – [GPS object]
name (str) – [Name of the emergency contact]
number (str) – [Phone number of the emergency contact]
-
class
skill.
Skill
¶ Bases:
abc.ABC
[This class is an abstract class for Skill derivated classes]
-
error
()¶ [Method that runs, if the run() method fails]
-
prepare
()¶ [Method that prepares all the necessary resources to run the skill]
-
run
()¶ [Method that runs the skill and provides the information back to the user]
-
-
class
skill.
Thank_you
¶ Bases:
skill.Skill
[This skill provides the user with a response for ‘Thank you’]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
prepare
(user: str, AIstatus: str, status: dict)¶ [Method that chooses randomly a thank you message from a list]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
- Returns
[Random thank you message]
- Return type
[str]
-
run
(response: str, AIstatus: str, status: list, answer)¶ [Method that answers back to a thank you request]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (list) – [Virtual assistant’s statuses available]
answer ([str]) – [The thank you answer returned by the prepare() method]
-
class
skill.
Time
¶ Bases:
skill.Skill
[This skill provides current time]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
prepare
(AIstatus: str, status: dict)¶ [Method that retrieves current time]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
- Returns
[Current time]
- Return type
[str]
-
run
(now: str, AIstatus: str, response: str, status: dict)¶ [Method that provides the current time back to the user]
- Parameters
now (str) – [Current time]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
class
skill.
Weather
¶ Bases:
skill.Skill
[This skill provides weather details to particular locations]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
error
(user: str, response: str, AIstatus: str, status: list, city: str)¶ [Method that runs if the run() method fails to retrieve information]
- Parameters
user (str) – [The name of the user that stands in front of the camera]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (list) – [Virtual assistant’s statuses available]
city (str) – [The city for which the weather forecast is requested]
-
prepare
(AIstatus: str, status: list, request: str, conn: object)¶ [Method that prepares the environment to retrieve weather details]
- Parameters
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
status (list) – [Virtual assistant’s statuses available]
request (str) – [User’s request in raw format]
- Returns
[The location requested for weather forecast]
- Return type
str
-
run
(city: str, AIstatus: str, response: str, status: dict)¶ [Method that retrieves weather details and provides the information back to the user]
- Parameters
city (str) – [The city for which weather forecast is provided]
AIstatus (str) – [Virtual assistant’s current status: listening, answer, etc. This status is displayed on the mirror surface]
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]
status (dict) – [Virtual assistant’s statuses available]
-
class
skill.
not_understanding
¶ Bases:
skill.Skill
[This skill informs the user that the request does not match any skill]
- Parameters
Skill ([abstract class]) – [Skill - is the parent abstract class]
-
run
(response: str)¶ [Method that informs the user that no skill matched its request]
- Parameters
response (str) – [The Virtual Assistant’s answer in text format. This text is displayed on the mirror surface]