opt: close websocket connection when finish a chat call for XunFei API

This commit is contained in:
RockYang
2023-10-12 10:02:12 +08:00
parent 12e7837602
commit 1759fd4cf9
5 changed files with 106 additions and 158 deletions

View File

@@ -150,6 +150,7 @@ func (h *ChatHandler) sendXunFeiMessage(
})
if result.Payload.Choices.Status == 2 { // 最终结果
_ = conn.Close() // 关闭连接
break
}