mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-11-29 05:09:46 +01:00
更新
This commit is contained in:
parent
87721b2787
commit
f843d1ef82
3 changed files with 3 additions and 10 deletions
|
|
@ -47,11 +47,7 @@
|
|||
import DeviceItem from '@/components/DeviceItem.vue'
|
||||
import AddWisdomBodyDialog from '@/components/AddWisdomBodyDialog.vue'
|
||||
import HeaderBar from '@/components/HeaderBar.vue'
|
||||
<<<<<<< HEAD
|
||||
import Api from '@/apis/api';
|
||||
=======
|
||||
|
||||
>>>>>>> 0c2b194444d33f83a3ae664ee5de702ac25bb1a3
|
||||
export default {
|
||||
name: 'HomePage',
|
||||
components: { DeviceItem, AddWisdomBodyDialog, HeaderBar },
|
||||
|
|
@ -75,7 +71,6 @@ export default {
|
|||
// 点击配置角色后跳转到角色配置页
|
||||
this.$router.push('/role-config')
|
||||
},
|
||||
<<<<<<< HEAD
|
||||
handleDeviceAdded(deviceCode) {
|
||||
// 根据需要处理添加设备后逻辑,比如刷新设备列表等
|
||||
console.log('设备验证码:', deviceCode)
|
||||
|
|
@ -84,7 +79,7 @@ export default {
|
|||
}).catch(err => {
|
||||
console.error('绑定设备失败:', err)
|
||||
})
|
||||
=======
|
||||
},
|
||||
handleWisdomBodyAdded(res) {
|
||||
console.log('新增智能体响应:', res);
|
||||
this.fetchAgentList();
|
||||
|
|
@ -105,9 +100,7 @@ export default {
|
|||
// 搜索更新智能体列表
|
||||
handleSearchResult(filteredList) {
|
||||
this.devices = filteredList; // 更新设备列表
|
||||
>>>>>>> 0c2b194444d33f83a3ae664ee5de702ac25bb1a3
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -102,7 +102,7 @@ class ConnectionHandler:
|
|||
async def handle_connection(self, ws):
|
||||
try:
|
||||
# 获取并验证headers
|
||||
self.headers = dict(ws.request.headers)
|
||||
self.headers = dict(ws.request_headers)
|
||||
# 获取客户端ip地址
|
||||
self.client_ip = ws.remote_address[0]
|
||||
self.logger.bind(tag=TAG).info(f"{self.client_ip} conn - Headers: {self.headers}")
|
||||
|
|
|
|||
|
|
@ -171,7 +171,7 @@ def save_audio(path: str,
|
|||
|
||||
|
||||
def init_jit_model(model_path: str,
|
||||
device=torch.device('cpu')):
|
||||
device=torch.device('mps')):
|
||||
model = torch.jit.load(model_path, map_location=device)
|
||||
model.eval()
|
||||
return model
|
||||
|
|
|
|||
Loading…
Reference in a new issue