特邀发言官代码编写
This commit is contained in:
@@ -7,7 +7,6 @@ import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.huaweicloud.sdk.eg.v1.model.CloudEvents;
|
||||
import com.volvo.ai.analytic.center.dto.req.DiFyReq;
|
||||
import com.volvo.ai.analytic.center.dto.req.DifyCommunityTargetDTO;
|
||||
import com.volvo.ai.analytic.center.dto.req.DifyImageWorkFlow;
|
||||
import com.volvo.ai.analytic.center.dto.req.SpokesManDTO;
|
||||
import com.volvo.ai.analytic.center.entity.AiAnalysisErrors;
|
||||
@@ -53,8 +52,11 @@ public class SpokesManService {
|
||||
@Value("${dify.spokesMan.token}")
|
||||
private String spokesManToken;
|
||||
|
||||
@Value("${dify.spokesMan.channel}")
|
||||
private String channel;
|
||||
@Value("${huawei.cloud.EG.spokesMan.channelId}")
|
||||
private String channelId;
|
||||
|
||||
@Value("${huawei.cloud.EG.spokesMan.sourceId}")
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* 处理社区特邀发言官回调请求
|
||||
@@ -123,7 +125,11 @@ public class SpokesManService {
|
||||
//发送事件网格
|
||||
CloudEvents cloudEvents = new CloudEvents();
|
||||
cloudEvents.setData(difSpokesManResult);
|
||||
huaWeiEGService.sendEvent(cloudEvents, channel);
|
||||
cloudEvents.setSource(sourceId);
|
||||
cloudEvents.setSpecversion("3.1.51");
|
||||
cloudEvents.setType("ai-analytic-center");
|
||||
cloudEvents.setId(aiAnalysisRequestId);
|
||||
huaWeiEGService.sendEvent(cloudEvents, channelId);
|
||||
//异步更新dify响应日志
|
||||
syncUpdateDiFyResponse(difSpokesManResult, aiAnalysisRequestId);
|
||||
} catch (Exception e) {
|
||||
|
||||
Reference in New Issue
Block a user