mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-13 20:53:42 +08:00
Merge pull request #181 from LM20230311/feat-model-priority
解决问答实现类中重新查询模型逻辑可能导致自动选择的模型被重置问题
This commit is contained in:
@@ -118,7 +118,7 @@ public class ImageServiceImpl implements IChatService {
|
||||
@Override
|
||||
public SseEmitter chat(ChatRequest chatRequest, SseEmitter emitter) {
|
||||
// 从数据库获取 image 类型的模型配置
|
||||
ChatModelVo chatModelVo = chatModelService.selectModelByCategory(ChatModeType.IMAGE.getCode());
|
||||
ChatModelVo chatModelVo = chatModelService.selectModelByName(chatRequest.getModel());
|
||||
if (chatModelVo == null) {
|
||||
log.error("未找到 image 类型的模型配置");
|
||||
emitter.completeWithError(new IllegalStateException("未找到 image 类型的模型配置"));
|
||||
|
||||
Reference in New Issue
Block a user