Merge branch 'function-call-v2' of https://github.com/xinnan-tech/xiaozhi-esp32-server into function-call-v2

This commit is contained in:
玄凤科技 2025-04-17 10:00:23 +08:00
commit 652f5a3247

View file

@ -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"]