mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-27 01:23:55 +08:00
update:修复iot的bug (#407)
* fix: 修复manual模式无法识别 (#404) * feat(docs): 新增Issues模板 * fix: 补全core依赖 * fix: 修复manual模式无法识别 * 去除重复依赖.txt 已经有torch和torchaudio --------- Co-authored-by: 欣南科技 <huangrongzhuang@xin-nan.com> * 修复iot功能中表达式问题 (#400) * Custom paths asr tts (#388) * #164 自定义asr、tts缓存目录,项目启动自动创建目录 * #164 自定义asr、tts缓存目录,项目启动自动创建目录 * fix:修复语音无法找到新配置项output_file的bug * fix:电脑不支持iot音量控制bug --------- Co-authored-by: Junsen <66542771+Huang-junsen@users.noreply.github.com> Co-authored-by: tang <tangyiyong@gmail.com> Co-authored-by: shudongW <178200623@qq.com> Co-authored-by: hrz <1710360675@qq.com>
This commit is contained in:
co-authored by
Junsen
tang
shudongW
hrz
parent
af2ae11eb1
commit
878809ecb4
@@ -197,12 +197,12 @@ def register_device_type(descriptor):
|
||||
|
||||
# 为每个属性创建查询函数
|
||||
for prop_name, prop_info in descriptor["properties"].items():
|
||||
func_name = f"get_{device_name.lower()}_{prop_name.lower()}"
|
||||
func_name = f"get_{{device_name.lower()}}_{{prop_name.lower()}}"
|
||||
func_desc = {
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": func_name,
|
||||
"description": f"查询{descriptor['description']}的{prop_info['description']}",
|
||||
"description": f"查询{{descriptor['description']}}的{{prop_info['description']}}",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -212,7 +212,7 @@ def register_device_type(descriptor):
|
||||
},
|
||||
"response_failure": {
|
||||
"type": "string",
|
||||
"description": "查询失败时的友好回复,例如:'无法获取{device_name}的{prop_info['description']}'"
|
||||
"description": f"查询失败时的友好回复,例如:'无法获取{{device_name}}的{{prop_info['description']}}'"
|
||||
}
|
||||
},
|
||||
"required": ["response_success", "response_failure"]
|
||||
@@ -256,7 +256,7 @@ def register_device_type(descriptor):
|
||||
"type": "function",
|
||||
"function": {
|
||||
"name": func_name,
|
||||
"description": f"{descriptor['description']} - {method_info['description']}",
|
||||
"description": f"{{descriptor['description']}} - {{method_info['description']}}",
|
||||
"parameters": {
|
||||
"type": "object",
|
||||
"properties": parameters,
|
||||
|
||||
Reference in New Issue
Block a user