1.调整ai话术生成逻辑

master
gitee 1 week ago
parent e07684fbb4
commit dc15471f2e

@ -75,16 +75,17 @@ public class LiveDigitalServiceImpl implements LiveDigitalService {
continue;
}
// 生成销售话术
String productCategory = CollUtil.getFirst(scriptKeyPointsDTOList).getProductCategory();
String scriptType = CollUtil.getFirst(scriptKeyPointsDTOList).getScriptType();
String salesPitch = null;
ScriptKeyPointsDTO first = CollUtil.getFirst(scriptKeyPointsDTOList);
try {
salesPitch = generateSalesPitchByPoints(productCategory, scriptType,
String salesPitch = generateSalesPitchByPoints(first.getProductCategory(), first.getScriptType(),
salespitchReqVo.buildProductInfo(), scriptKeyPointsDTOList);
salesPitchResVos.add(
new SalesPitchResVo(salesPitch, first.getScriptType(),
first.getScriptName(), first.getScriptTypeOrderNum(), first.getScriptGroupId()));
} catch (Exception e) {
log.error("generateSalesPitch:生成销售话术失败", e);
}
salesPitchResVos.add(new SalesPitchResVo(scriptType, salesPitch, CollUtil.getFirst(scriptKeyPointsDTOList).getScriptName()));
}
}
return salesPitchResVos;

@ -20,11 +20,23 @@ public class SalesPitchResVo {
*/
private String scriptName;
/**
*
*/
private Integer scriptTypeOrderNum;
/**
* id
*/
private String scriptGroupId;
public SalesPitchResVo() {
}
public SalesPitchResVo(String salesPitch, String scriptType, String scriptName) {
public SalesPitchResVo(String salesPitch, String scriptType, String scriptName, Integer scriptTypeOrderNum,String scriptGroupId) {
this.salesPitch = salesPitch;
this.scriptType = scriptType;
this.scriptName = scriptName;
this.scriptTypeOrderNum = scriptTypeOrderNum;
this.scriptGroupId = scriptGroupId;
}
}

Loading…
Cancel
Save