alibaba / spring-ai-alibaba

An Application Framework for Java Developers
https://sca.aliyun.com/ai
Apache License 2.0
429 stars 111 forks source link

DashScopeAudioSpeechModelOpenAPI.createRequest method throws an exception #95

Open Dream-Pursuer opened 1 week ago

Dream-Pursuer commented 1 week ago

Which Component DashScopeAudioSpeechModelOpenAPI

Describe the bug According to the source code in line 169: String input = ObjectUtils.isEmpty(options.getText()) ? options.getText() : request.getInstructions().getText(); input must always be empty. So when invoke requestBuilder.build(); in line 177, it will trigger Assert.hasText(input, "input must not be empty"); and throws an exception.

Dream-Pursuer commented 1 week ago

Also an other issue: In DashScopeAudioApi.java line 640, web client will request url https://dashscope.aliyuncs.com/v1/audio/speech, but it returns HTTP/1.1 404 Not Found. Here is the request body: {"model":"sambert-zhide-v1","input":"test","response_format":"mp3","speed":1.0}

yuluo-yx commented 4 days ago

这代码是自己使用的问题吗还是 example 使用出现的问题,给个完整的上下文

673575554 commented 2 days ago

升级下版本