Commit 86b395ce authored by jennie chen's avatar jennie chen

在biz_agent_application_info中添加变量结构

parent ecccb7de
......@@ -349,6 +349,8 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
* @throws Exception
*/
private BufferedReader invokeLLM(String largeModel, Message[] messageArray, Float topP) throws Exception {
// todo 配置tools
LargeModelResponse largeModelResponse = new LargeModelResponse();
largeModelResponse.setModel(largeModel);
largeModelResponse.setMessages(messageArray);
......@@ -356,6 +358,8 @@ public class AgentApplicationInfoServiceImpl implements AgentApplicationInfoServ
largeModelResponse.setStream(true);
largeModelResponse.setUser("POE");
return llmService.chatChunk(largeModelResponse);
//todo
}
/**
......
......@@ -29,6 +29,9 @@ public class AgentApplicationInfoConvert {
entity.setAgentPublishStatus(model.getAgentPublishStatus());
entity.setPreamble(model.getPreamble());
entity.setPublishTime(model.getPublishTime());
if(StringUtils.isNotBlank(model.getVariableStructure())) {
entity.setVariableStructure(JsonUtils.deSerialize(model.getVariableStructure(), String[].class));
}
if (StringUtils.isNotBlank(model.getFeaturedQuestions())) {
entity.setFeaturedQuestions(JsonUtils.deSerialize(model.getFeaturedQuestions(), String[].class));
}
......@@ -65,6 +68,9 @@ public class AgentApplicationInfoConvert {
model.setAgentPublishStatus(entity.getAgentPublishStatus());
model.setPreamble(entity.getPreamble());
model.setPublishTime(entity.getPublishTime());
if (ArrayUtils.isNotEmpty(entity.getVariableStructure())) {
model.setVariableStructure(JsonUtils.serialize(entity.getVariableStructure()));
}
if (ArrayUtils.isNotEmpty(entity.getFeaturedQuestions())) {
model.setFeaturedQuestions(JsonUtils.serialize(entity.getFeaturedQuestions()));
}
......@@ -107,6 +113,7 @@ public class AgentApplicationInfoConvert {
commConfig.setContinuousQuestionStatus(entity.getContinuousQuestionStatus());
commConfig.setContinuousQuestionSystem(entity.getContinuousQuestionSystem());
commConfig.setContinuousQuestionTurn(entity.getContinuousQuestionTurn());
commConfig.setVariableStructure(entity.getVariableStructure());
AgentApplicationKnowledgeConfig knowledgeConfig = new AgentApplicationKnowledgeConfig();
knowledgeConfig.setKnowledgeIds(entity.getKnowledgeIds());
......@@ -148,6 +155,9 @@ public class AgentApplicationInfoConvert {
entity.setContinuousQuestionStatus(dto.getCommConfig().getContinuousQuestionStatus());
entity.setContinuousQuestionSystem(dto.getCommConfig().getContinuousQuestionSystem());
entity.setContinuousQuestionTurn(dto.getCommConfig().getContinuousQuestionTurn());
if (ObjectUtil.isNotEmpty(dto.getCommConfig().getVariableStructure())) {
entity.setVariableStructure(dto.getCommConfig().getVariableStructure());
}
}
if (ObjectUtil.isNotEmpty(dto.getKnowledgeConfig())) {
......@@ -180,6 +190,10 @@ public class AgentApplicationInfoConvert {
entity.setAgentPublishStatus(infoQueryItem.getAgentPublishStatus());
entity.setPreamble(infoQueryItem.getPreamble());
entity.setPublishTime(infoQueryItem.getPublishTime());
if(StringUtils.isNotBlank(infoQueryItem.getVariableStructure())) {
entity.setVariableStructure(JsonUtils.deSerialize(infoQueryItem.getVariableStructure(), String[].class));
}
if (StringUtils.isNotBlank(infoQueryItem.getFeaturedQuestions())) {
entity.setFeaturedQuestions(JsonUtils.deSerialize(infoQueryItem.getFeaturedQuestions(), String[].class));
}
......
......@@ -4,8 +4,6 @@ import cn.com.poc.agent_application.domain.AgentApplicationBaseInfo;
import cn.com.poc.agent_application.domain.AgentApplicationCommConfig;
import cn.com.poc.agent_application.domain.AgentApplicationCommModelConfig;
import cn.com.poc.agent_application.domain.AgentApplicationKnowledgeConfig;
import cn.com.poc.agent_application.dto.AgentApplicationInfoDto;
import cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity;
import cn.com.poc.agent_application.model.BizAgentApplicationPublishModel;
import cn.com.poc.agent_application.entity.BizAgentApplicationPublishEntity;
import cn.com.poc.agent_application.dto.BizAgentApplicationPublishDto;
......@@ -28,6 +26,9 @@ public class BizAgentApplicationPublishConvert {
entity.setAgentDesc(model.getAgentDesc());
entity.setAgentSystem(model.getAgentSystem());
entity.setPreamble(model.getPreamble());
if(StringUtils.isNotBlank(model.getVariableStructure())) {
entity.setVariableStructure(JsonUtils.deSerialize(model.getVariableStructure(), String[].class));
}
if (StringUtils.isNotBlank(model.getFeaturedQuestions())) {
entity.setFeaturedQuestions(JsonUtils.deSerialize(model.getFeaturedQuestions(), String[].class));
}
......@@ -62,6 +63,9 @@ public class BizAgentApplicationPublishConvert {
model.setAgentDesc(entity.getAgentDesc());
model.setAgentSystem(entity.getAgentSystem());
model.setPreamble(entity.getPreamble());
if (ArrayUtils.isNotEmpty(entity.getVariableStructure())) {
model.setVariableStructure(JsonUtils.serialize(entity.getVariableStructure()));
}
if (ArrayUtils.isNotEmpty(entity.getFeaturedQuestions())) {
model.setFeaturedQuestions(JsonUtils.serialize(entity.getFeaturedQuestions()));
}
......@@ -104,6 +108,7 @@ public class BizAgentApplicationPublishConvert {
commConfig.setContinuousQuestionStatus(entity.getContinuousQuestionStatus());
commConfig.setContinuousQuestionSystem(entity.getContinuousQuestionSystem());
commConfig.setContinuousQuestionTurn(entity.getContinuousQuestionTurn());
commConfig.setVariableStructure(entity.getVariableStructure());
AgentApplicationKnowledgeConfig knowledgeConfig = new AgentApplicationKnowledgeConfig();
knowledgeConfig.setKnowledgeIds(entity.getKnowledgeIds());
......@@ -145,6 +150,9 @@ public class BizAgentApplicationPublishConvert {
entity.setContinuousQuestionStatus(dto.getCommConfig().getContinuousQuestionStatus());
entity.setContinuousQuestionSystem(dto.getCommConfig().getContinuousQuestionSystem());
entity.setContinuousQuestionTurn(dto.getCommConfig().getContinuousQuestionTurn());
if (ObjectUtil.isNotEmpty(dto.getCommConfig().getVariableStructure())) {
entity.setVariableStructure(dto.getCommConfig().getVariableStructure());
}
}
if (ObjectUtil.isNotEmpty(dto.getKnowledgeConfig())) {
......
......@@ -74,4 +74,18 @@ public class AgentApplicationCommConfig {
public void setContinuousQuestionTurn(java.lang.Integer continuousQuestionTurn) {
this.continuousQuestionTurn = continuousQuestionTurn;
}
/** variable_structure
*变量结构
*/
private java.lang.String[] variableStructure;
public java.lang.String[] getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String[] variableStructure){
this.variableStructure = variableStructure;
}
}
package cn.com.poc.agent_application.entity;
import java.util.Arrays;
public class BizAgentApplicationInfoEntity {
......@@ -234,6 +233,20 @@ public class BizAgentApplicationInfoEntity {
public void setUnitIds(java.lang.String[] unitIds){
this.unitIds = unitIds;
}
/** variable_structure
*变量结构
*/
private java.lang.String[] variableStructure;
public java.lang.String[] getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String[] variableStructure){
this.variableStructure = variableStructure;
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
*/
......
......@@ -124,6 +124,20 @@ public class BizAgentApplicationPublishEntity {
public void setPreamble(java.lang.String preamble){
this.preamble = preamble;
}
/** variable_structure
*变量结构
*/
private java.lang.String[] variableStructure;
public java.lang.String[] getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String[] variableStructure){
this.variableStructure = variableStructure;
}
/** featured_questions
*推荐问
*/
......
......@@ -328,7 +328,22 @@ public class BizAgentApplicationInfoModel extends BaseModelClass implements Seri
this.unitIds = unitIds;
super.addValidField("unitIds");
}
/** variable_structure
*变量结构
*/
private java.lang.String variableStructure;
@Column(name = "variable_structure",length = 2147483647)
public java.lang.String getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String variableStructure){
this.variableStructure = variableStructure;
super.addValidField("variableStructure");
}
/** is_deleted
*是否删除 1、Y 是 2、N 否
......
......@@ -152,6 +152,21 @@ public class BizAgentApplicationPublishModel extends BaseModelClass implements S
this.preamble = preamble;
super.addValidField("preamble");
}
/** variable_structure
*变量结构
*/
private java.lang.String variableStructure;
@Column(name = "variable_structure",length = 2147483647)
public java.lang.String getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String variableStructure){
this.variableStructure = variableStructure;
super.addValidField("variableStructure");
}
/** featured_questions
......
......@@ -18,6 +18,7 @@ select distinct
large_model,
top_p,
unit_ids,
variable_structure,
is_deleted,
CREATOR,
CREATED_TIME,
......
......@@ -299,6 +299,21 @@ public class AgentApplicationInfoQueryItem extends BaseItemClass implements Seri
this.unitIds = unitIds;
}
/** variable_structure
*变量结构
*/
private java.lang.String variableStructure;
@Column(name = "variable_structure")
public java.lang.String getVariableStructure(){
return this.variableStructure;
}
public void setVariableStructure(java.lang.String variableStructure){
this.variableStructure = variableStructure;
}
/**
* is_deleted
* is_deleted
......
......@@ -176,6 +176,7 @@ public class BizAgentApplicationInfoServiceImpl extends BaseServiceImpl
model.setContinuousQuestionStatus(entity.getContinuousQuestionStatus());
model.setContinuousQuestionSystem(entity.getContinuousQuestionSystem());
model.setKnowledgeIds(JsonUtils.serialize(entity.getKnowledgeIds()));
model.setVariableStructure(JsonUtils.serialize(entity.getVariableStructure()));
model.setLargeModel(entity.getLargeModel());
model.setUnitIds(JsonUtils.serialize(entity.getUnitIds()));
}
......
package cn.com.poc.agent_application.service.impl;
import cn.com.poc.agent_application.constant.AgentApplicationConstants;
import cn.com.poc.agent_application.entity.BizAgentApplicationInfoEntity;
import cn.com.poc.agent_application.model.BizAgentApplicationInfoModel;
import cn.com.poc.common.constant.CommonConstant;
import cn.com.poc.common.utils.JsonUtils;
import cn.com.yict.framemax.core.exception.BusinessException;
......
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