1.调整ai话术生成逻辑

master
gitee 1 week ago
parent e07684fbb4
commit dc15471f2e

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

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

Loading…
Cancel
Save