AI聊天机器人设计

AI聊天机器人设计

技术选型

Spring-AI

模型选择

模型 作用 链接
qwen-audio-turbo-1204 语言识别回复 https://bailian.console.aliyun.com/#/model-market/detail/qwen-audio-turbo-1204
cosyvoice-v1 语言合成 https://bailian.console.aliyun.com/#/model-market/detail/cosyvoice-v1
SenseVoice 语音识别 https://github.com/FunAudioLLM/SenseVoice

音色:湾湾小何

1
setx DASHSCOPE_API_KEY "sk-9fba15d576ec47529925b14e526478f0"

参考资料

小智机器人

BUG记录

携带音频文件问答[400]

未携带则不报错

非模型错误

  • 模型:qwen2.5-omni-7b
1
2
3
4
5
6
org.springframework.web.reactive.function.client.WebClientResponseException$BadRequest: 400 Bad Request from POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions
at org.springframework.web.reactive.function.client.WebClientResponseException.create(WebClientResponseException.java:321) ~[spring-webflux-6.1.18.jar:6.1.18]
Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException:
Error has been observed at the following site(s):
*__checkpoint ⇢ 400 BAD_REQUEST from POST https://dashscope.aliyuncs.com/compatible-mode/v1/chat/completions [DefaultWebClient]
2025-04-06T21:11:15.479+08:00 ERROR 14328 --- [oundedElastic-2] o.s.ai.chat.model.MessageAggregator : Aggregation Error