mirror of
https://gitcode.com/ageerle/ruoyi-ai.git
synced 2026-03-13 20:53:42 +08:00
feat: 上传已经确定模型的选择,这里只需要根据名字获取模型直接使用就好;
This commit is contained in:
@@ -118,7 +118,7 @@ public class ImageServiceImpl implements IChatService {
|
|||||||
@Override
|
@Override
|
||||||
public SseEmitter chat(ChatRequest chatRequest, SseEmitter emitter) {
|
public SseEmitter chat(ChatRequest chatRequest, SseEmitter emitter) {
|
||||||
// 从数据库获取 image 类型的模型配置
|
// 从数据库获取 image 类型的模型配置
|
||||||
ChatModelVo chatModelVo = chatModelService.selectModelByCategory(ChatModeType.IMAGE.getCode());
|
ChatModelVo chatModelVo = chatModelService.selectModelByName(chatRequest.getModel());
|
||||||
if (chatModelVo == null) {
|
if (chatModelVo == null) {
|
||||||
log.error("未找到 image 类型的模型配置");
|
log.error("未找到 image 类型的模型配置");
|
||||||
emitter.completeWithError(new IllegalStateException("未找到 image 类型的模型配置"));
|
emitter.completeWithError(new IllegalStateException("未找到 image 类型的模型配置"));
|
||||||
|
|||||||
Reference in New Issue
Block a user