mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
Merge branch 'function-call-v2' of https://github.com/xinnan-tech/xiaozhi-esp32-server into function-call-v2
This commit is contained in:
commit
652f5a3247
1 changed files with 27 additions and 25 deletions
|
|
@ -144,6 +144,7 @@ class IotDescriptor:
|
|||
self.methods = []
|
||||
|
||||
# 根据描述创建属性
|
||||
if properties is not None:
|
||||
for key, value in properties.items():
|
||||
property_item = globals()[key] = {}
|
||||
property_item["name"] = key
|
||||
|
|
@ -157,6 +158,7 @@ class IotDescriptor:
|
|||
self.properties.append(property_item)
|
||||
|
||||
# 根据描述创建方法
|
||||
if methods is not None:
|
||||
for key, value in methods.items():
|
||||
method = globals()[key] = {}
|
||||
method["description"] = value["description"]
|
||||
|
|
|
|||
Loading…
Reference in a new issue