Commit 85a587a8 authored by 林洋洋's avatar 林洋洋

修改模型,修改流返回

parent 39155e13
......@@ -161,20 +161,20 @@ public class ChatController {
}
@Operation(summary = "智能数据报表对话", description = "智能数据报表对话")
@GetMapping(value = "/chat/report")
public String reportChat(@RequestParam String message,
@GetMapping(value = "/chat/report", produces = MediaType.TEXT_EVENT_STREAM_VALUE)
public Flux<String> reportChat(@RequestParam String message,
@RequestParam String conversationId) {
Message systemMessage = new SystemMessage("你是一个AI问答助手,请用回答用户问题,使用相关工具");
Message userMessage = new UserMessage(message);
Prompt prompt = new Prompt(List.of(systemMessage, userMessage));
return openAiChatClient.prompt(prompt)
return FluxUtils.wrapDeepSeekStream(deepseekChatClient.prompt(prompt)
.advisors(messageChatMemoryAdvisor)
.advisors(a -> a.param(ChatMemory.CONVERSATION_ID, conversationId))
.tools(excelTools)
.call()
.content();
.stream()
.chatResponse());
}
}
\ No newline at end of file
......@@ -57,6 +57,7 @@ public class ConvertUtils {
log.error("文档生成或上传失败: {}", e.getMessage(), e);
return false;
} catch (Exception e) {
log.error("文档生成或上传失败: {}", e.getMessage(), e);
return false;
}
return true;
......
......@@ -49,7 +49,7 @@ spring:
chat:
enabled: true
options:
model: deepseek-r1-distill-llama-70b
model: deepseek-r1-0528
mybatis-plus:
mapper-locations: classpath*:/mapper/*Mapper.xml # mapper文件位置
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment