use gpt function

This commit is contained in:
fiatrete
2023-06-16 15:58:57 +08:00
parent 88e3ed0648
commit 0a4feb1daf
11 changed files with 181 additions and 135 deletions
+10 -1
View File
@@ -4,7 +4,16 @@ from jarvis.functional_modules.functional_module import functional_module, Calle
@functional_module(
name="toggle_light",
description="Turn on/off the light.",
signature={"room": "The room name", "on": "Turn on or off, bool type>"})
signature={
"room": {
"type": "string",
"description": "The room name"
},
"on": {
"type": "boolean",
"description": "Turn on or off"
}
})
async def light_switch(context: CallerContext, room: str, on: bool):
# Do the actual control here, something like this
# room_id = convert_room_name_to_id(room)