Commit cab016c0 authored by R10's avatar R10

法律文书ai写作

parent 2908e0d9
......@@ -33,6 +33,16 @@ public class AiLawDialoguesDto {
*/
private Integer[] databaseIds;
/**
* 是否开启联网检索
*/
private boolean enableSearchEngine;
/**
* 是否开启思考模式
*/
private boolean enableDeepThinking;
public String getDialoguesId() {
return dialoguesId;
}
......@@ -72,4 +82,20 @@ public class AiLawDialoguesDto {
public void setDatabaseIds(Integer[] databaseIds) {
this.databaseIds = databaseIds;
}
public boolean getEnableSearchEngine() {
return enableSearchEngine;
}
public void setEnableSearchEngine(boolean enableSearchEngine) {
this.enableSearchEngine = enableSearchEngine;
}
public boolean getEnableDeepThinking() {
return enableDeepThinking;
}
public void setEnableDeepThinking(boolean enableDeepThinking) {
this.enableDeepThinking = enableDeepThinking;
}
}
package cn.com.poc.law.rest;
import cn.com.poc.ai_finance.dto.AiFinanceDialoguesDto;
import cn.com.poc.law.dto.AiLawDialoguesDto;
import cn.com.poc.law.dto.LegalFileDto;
import cn.com.yict.framemax.core.rest.BaseRest;
import cn.com.yict.framemax.web.permission.Access;
......@@ -25,7 +26,7 @@ public interface LegalRest extends BaseRest {
/**
* ai对话
*/
void call(@RequestBody AiFinanceDialoguesDto dto) throws Exception;
void call(@RequestBody AiLawDialoguesDto dto) throws Exception;
}
......@@ -4,8 +4,10 @@ import cn.com.poc.ai_finance.aggregate.AiFinanceService;
import cn.com.poc.ai_finance.dto.AiFinanceDialoguesDto;
import cn.com.poc.common.utils.Assert;
import cn.com.poc.common.utils.BlContext;
import cn.com.poc.law.dto.AiLawDialoguesDto;
import cn.com.poc.law.dto.LegalFileDto;
import cn.com.poc.law.rest.LegalRest;
import cn.com.poc.law.service.AiLawService;
import cn.com.poc.support.security.oauth.entity.UserBaseEntity;
import cn.com.poc.thirdparty.resource.demand.ai.aggregate.LegalService;
import cn.com.poc.thirdparty.resource.demand.ai.entity.legal.LegalFileResponse;
......@@ -43,10 +45,10 @@ public class LegalRestImpl implements LegalRest {
}
@Resource
private AiFinanceService aiFinanceService;
private AiLawService aiLawService;
@Override
public void call(AiFinanceDialoguesDto dto) throws Exception {
public void call(AiLawDialoguesDto dto) throws Exception {
cn.hutool.core.lang.Assert.notNull(dto.getDialoguesId(), "对话id不能为空");
cn.hutool.core.lang.Assert.notNull(dto.getInput(), "问题不能为空");
UserBaseEntity userBaseEntity = BlContext.getCurrentUserNotException();
......@@ -54,6 +56,6 @@ public class LegalRestImpl implements LegalRest {
throw new BusinessException("用户未登录");
}
aiFinanceService.call(dto.getDialoguesId(), dto.getInput(), dto.getFileUrl(), dto.getKnowledgeIds(), dto.getDatabaseIds(), userBaseEntity.getUserId());
aiLawService.call(dto.getDialoguesId(), dto.getInput(), dto.getEnableSearchEngine(), dto.getEnableDeepThinking(), dto.getFileUrl(), dto.getKnowledgeIds(), dto.getDatabaseIds(), userBaseEntity.getUserId());
}
}
......@@ -14,10 +14,12 @@ public interface AiLawService {
* @param dialoguesId 对话id
* @param input 问题
* @param fileUrl 文件地址
* @param enableSearchEngine 是否开启联网检索
* @param enableDeepThinking 是否开启思考模式
* @param knowledgeIds 知识库ids
* @param databaseIds 数据库ids
* @param userId 用户id
*/
void call(String dialoguesId, String input, String fileUrl, Integer[] knowledgeIds, Integer[] databaseIds, Long userId) throws Exception;
void call(String dialoguesId, String input, boolean enableSearchEngine, boolean enableDeepThinking, String fileUrl, Integer[] knowledgeIds, Integer[] databaseIds, Long userId) throws Exception;
}
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