fix: ollama兼容联网查询 知识库检索

This commit is contained in:
ageerle
2025-04-11 12:05:13 +08:00
parent af33040117
commit efeb0bd6fb
3 changed files with 97 additions and 62 deletions

View File

@@ -466,8 +466,8 @@ public class OpenAiStreamClient {
* @since 1.1.3
*/
public ResponseBody textToSpeech(TextToSpeech textToSpeech){
Call<ResponseBody> responseBody = this.openAiApi.textToSpeech(textToSpeech);
try {
Call<ResponseBody> responseBody = this.openAiApi.textToSpeech(textToSpeech);
return responseBody.execute().body();
} catch (IOException e) {
throw new BaseException("文本转语音(同步)失败: "+e.getMessage());

View File

@@ -26,6 +26,11 @@ public class ChatRequest {
*/
private String prompt;
/**
* 系统提示词
*/
private String sysPrompt;
/**
* 是否开启流式对话
*/