dms验证接口
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
package com.volvo.ai.analytic.center.dto;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class DifyRunDTO {
|
||||
|
||||
private String authorization;
|
||||
private String reqData;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,127 @@
|
||||
package com.volvo.ai.analytic.center.dto.corpus;
|
||||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonRawValue;
|
||||
|
||||
public class AicorpusTelephoneDTO {
|
||||
private String appid;
|
||||
private String audioUrl;
|
||||
private String audioFileId;
|
||||
private String sourceId;
|
||||
private String categoryCode;
|
||||
private String transcribeTime;
|
||||
private String callDirect;
|
||||
private String status;
|
||||
@JsonRawValue
|
||||
private String display;
|
||||
private int platformType;
|
||||
private String displayUrl;
|
||||
|
||||
// Getters and Setters
|
||||
public String getAppid() {
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getAudioUrl() {
|
||||
return audioUrl;
|
||||
}
|
||||
|
||||
public void setAudioUrl(String audioUrl) {
|
||||
this.audioUrl = audioUrl;
|
||||
}
|
||||
|
||||
public String getAudioFileId() {
|
||||
return audioFileId;
|
||||
}
|
||||
|
||||
public void setAudioFileId(String audioFileId) {
|
||||
this.audioFileId = audioFileId;
|
||||
}
|
||||
|
||||
public String getSourceId() {
|
||||
return sourceId;
|
||||
}
|
||||
|
||||
public void setSourceId(String sourceId) {
|
||||
this.sourceId = sourceId;
|
||||
}
|
||||
|
||||
public String getCategoryCode() {
|
||||
return categoryCode;
|
||||
}
|
||||
|
||||
public void setCategoryCode(String categoryCode) {
|
||||
this.categoryCode = categoryCode;
|
||||
}
|
||||
|
||||
public String getTranscribeTime() {
|
||||
return transcribeTime;
|
||||
}
|
||||
|
||||
public void setTranscribeTime(String transcribeTime) {
|
||||
this.transcribeTime = transcribeTime;
|
||||
}
|
||||
|
||||
public String getCallDirect() {
|
||||
return callDirect;
|
||||
}
|
||||
|
||||
public void setCallDirect(String callDirect) {
|
||||
this.callDirect = callDirect;
|
||||
}
|
||||
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getDisplay() {
|
||||
return display;
|
||||
}
|
||||
|
||||
public void setDisplay(String display) {
|
||||
this.display = display;
|
||||
}
|
||||
|
||||
public int getPlatformType() {
|
||||
return platformType;
|
||||
}
|
||||
|
||||
public void setPlatformType(int platformType) {
|
||||
this.platformType = platformType;
|
||||
}
|
||||
|
||||
public String getDisplayUrl() {
|
||||
return displayUrl;
|
||||
}
|
||||
|
||||
public void setDisplayUrl(String displayUrl) {
|
||||
this.displayUrl = displayUrl;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AicorpusTelephone{" +
|
||||
"appid='" + appid + '\'' +
|
||||
", audioUrl='" + audioUrl + '\'' +
|
||||
", audioFileId='" + audioFileId + '\'' +
|
||||
", sourceId='" + sourceId + '\'' +
|
||||
", categoryCode='" + categoryCode + '\'' +
|
||||
", transcribeTime='" + transcribeTime + '\'' +
|
||||
", callDirect='" + callDirect + '\'' +
|
||||
", status='" + status + '\'' +
|
||||
", display=" + display +
|
||||
", platformType=" + platformType +
|
||||
", displayUrl='" + displayUrl + '\'' +
|
||||
'}';
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.volvo.ai.analytic.center.dto.corpus;
|
||||
|
||||
public class AnalysisInfoDTO {
|
||||
private String role;
|
||||
private String emotion;
|
||||
private double speed;
|
||||
|
||||
// Getters and Setters
|
||||
public String getRole() {
|
||||
return role;
|
||||
}
|
||||
|
||||
public void setRole(String role) {
|
||||
this.role = role;
|
||||
}
|
||||
|
||||
public String getEmotion() {
|
||||
return emotion;
|
||||
}
|
||||
|
||||
public void setEmotion(String emotion) {
|
||||
this.emotion = emotion;
|
||||
}
|
||||
|
||||
public double getSpeed() {
|
||||
return speed;
|
||||
}
|
||||
|
||||
public void setSpeed(double speed) {
|
||||
this.speed = speed;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "AnalysisInfo{" +
|
||||
"role='" + role + '\'' +
|
||||
", emotion='" + emotion + '\'' +
|
||||
", speed=" + speed +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
package com.volvo.ai.analytic.center.dto.corpus;
|
||||
|
||||
public class DisplayDTO {
|
||||
private String status;
|
||||
private String create_time;
|
||||
private String start_time;
|
||||
private String finish_time;
|
||||
private SegmentDTO[] segments;
|
||||
private int audio_duration;
|
||||
|
||||
// Getters and Setters
|
||||
public String getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(String status) {
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public String getCreate_time() {
|
||||
return create_time;
|
||||
}
|
||||
|
||||
public void setCreate_time(String create_time) {
|
||||
this.create_time = create_time;
|
||||
}
|
||||
|
||||
public String getStart_time() {
|
||||
return start_time;
|
||||
}
|
||||
|
||||
public void setStart_time(String start_time) {
|
||||
this.start_time = start_time;
|
||||
}
|
||||
|
||||
public String getFinish_time() {
|
||||
return finish_time;
|
||||
}
|
||||
|
||||
public void setFinish_time(String finish_time) {
|
||||
this.finish_time = finish_time;
|
||||
}
|
||||
|
||||
public SegmentDTO[] getSegments() {
|
||||
return segments;
|
||||
}
|
||||
|
||||
public void setSegments(SegmentDTO[] segments) {
|
||||
this.segments = segments;
|
||||
}
|
||||
|
||||
public int getAudio_duration() {
|
||||
return audio_duration;
|
||||
}
|
||||
|
||||
public void setAudio_duration(int audio_duration) {
|
||||
this.audio_duration = audio_duration;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Display{" +
|
||||
"status='" + status + '\'' +
|
||||
", create_time='" + create_time + '\'' +
|
||||
", start_time='" + start_time + '\'' +
|
||||
", finish_time='" + finish_time + '\'' +
|
||||
", segments=" + java.util.Arrays.toString(segments) +
|
||||
", audio_duration=" + audio_duration +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.volvo.ai.analytic.center.dto.corpus;
|
||||
|
||||
public class SegmentDTO {
|
||||
private int start_time;
|
||||
private int end_time;
|
||||
private SegmentsResultDTO result;
|
||||
|
||||
// Getters and Setters
|
||||
public int getStart_time() {
|
||||
return start_time;
|
||||
}
|
||||
|
||||
public void setStart_time(int start_time) {
|
||||
this.start_time = start_time;
|
||||
}
|
||||
|
||||
public int getEnd_time() {
|
||||
return end_time;
|
||||
}
|
||||
|
||||
public void setEnd_time(int end_time) {
|
||||
this.end_time = end_time;
|
||||
}
|
||||
|
||||
public SegmentsResultDTO getResult() {
|
||||
return result;
|
||||
}
|
||||
|
||||
public void setResult(SegmentsResultDTO result) {
|
||||
this.result = result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Segment{" +
|
||||
"start_time=" + start_time +
|
||||
", end_time=" + end_time +
|
||||
", result=" + result +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.volvo.ai.analytic.center.dto.corpus;
|
||||
|
||||
public class SegmentsResultDTO {
|
||||
private String text;
|
||||
private AnalysisInfoDTO analysis_info;
|
||||
|
||||
// Getters and Setters
|
||||
public String getText() {
|
||||
return text;
|
||||
}
|
||||
|
||||
public void setText(String text) {
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public AnalysisInfoDTO getAnalysis_info() {
|
||||
return analysis_info;
|
||||
}
|
||||
|
||||
public void setAnalysis_info(AnalysisInfoDTO analysis_info) {
|
||||
this.analysis_info = analysis_info;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "Result{" +
|
||||
"text='" + text + '\'' +
|
||||
", analysis_info=" + analysis_info +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,111 @@
|
||||
package com.volvo.ai.analytic.center.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.volvo.common.core.base.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @description 电话语料表-同步表
|
||||
* @author BEJSON
|
||||
* @date 2025-03-04
|
||||
*/
|
||||
@Data
|
||||
@TableName("tm_telephone_corpus")
|
||||
public class TmTelephoneCorpus extends BaseEntity {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
//@Entity.Column(id = true)
|
||||
/**
|
||||
* 主键id
|
||||
*/
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* appid
|
||||
*/
|
||||
@TableField("appid")
|
||||
private String appid;
|
||||
|
||||
/**
|
||||
* audioUrl
|
||||
*/
|
||||
@TableField("audio_url")
|
||||
private String audioUrl;
|
||||
|
||||
/**
|
||||
* audio_file_id
|
||||
*/
|
||||
@TableField("audio_file_id")
|
||||
private String audioFileId;
|
||||
|
||||
/**
|
||||
* source_id
|
||||
*/
|
||||
@TableField("source_id")
|
||||
private String sourceId;
|
||||
|
||||
/**
|
||||
* category_code
|
||||
*/
|
||||
@TableField("category_code")
|
||||
private String categoryCode;
|
||||
|
||||
/**
|
||||
* 通话时间
|
||||
*/
|
||||
@TableField("transcribe_time")
|
||||
private String transcribeTime;
|
||||
|
||||
/**
|
||||
* 标记左声道还是右声道【in,out,0,1】
|
||||
*/
|
||||
@TableField("call_direct")
|
||||
private String callDirect;
|
||||
|
||||
/**
|
||||
* 源音频文件是否转录成功
|
||||
*/
|
||||
@TableField("status")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 识别的文本显示,包括添加的标点和大小写
|
||||
*/
|
||||
@TableField("display")
|
||||
private String display;
|
||||
|
||||
/**
|
||||
* 外呼标志:0联通AI外呼,1阿里云AI外呼,2联通云呼
|
||||
*/
|
||||
@TableField("platform_type")
|
||||
private int platformType;
|
||||
|
||||
/**
|
||||
* obs地址
|
||||
*/
|
||||
@TableField("display_url")
|
||||
private String displayUrl;
|
||||
|
||||
/**
|
||||
* 删除标识(0-未删除,1-已删除)
|
||||
*/
|
||||
@TableField("is_deleted")
|
||||
private Integer isDeleted;
|
||||
|
||||
/**
|
||||
* 记录版本号,即乐观锁
|
||||
*/
|
||||
@TableField("version")
|
||||
private Integer version;
|
||||
|
||||
public TmTelephoneCorpus() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -4,10 +4,12 @@ import com.alibaba.fastjson.JSONObject;
|
||||
import org.springframework.cloud.openfeign.FeignClient;
|
||||
import org.springframework.http.MediaType;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Map;
|
||||
|
||||
@FeignClient(name = "difyClient", url = "${service.dify.url}")
|
||||
@FeignClient(name = "difyClient", url = "${dify.baseUrl}")
|
||||
public interface DiFyFeign {
|
||||
|
||||
@PostMapping(value = "v1/workflows/run"
|
||||
@@ -15,4 +17,8 @@ public interface DiFyFeign {
|
||||
, produces = MediaType.APPLICATION_JSON_VALUE)
|
||||
JSONObject runWorkflows(@RequestHeader(value = "Authorization") String authorization, @RequestBody Map<String, Object> map);
|
||||
|
||||
|
||||
|
||||
@PostMapping(value = "/v1/files/upload" , consumes = MediaType.MULTIPART_FORM_DATA_VALUE)
|
||||
JSONObject fileUpload(@RequestHeader(value = "Authorization") String authorization, @RequestPart("file") MultipartFile file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user