去掉任务中相关模型和提示词绑定,新增资源图片bbox处理
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "BBOX坐标对象")
|
||||
public record BboxCoordinate(
|
||||
@Schema(description = "BBOX标识", example = "bbox_001") String id,
|
||||
@NotNull @Schema(description = "左上角X坐标", example = "100") Integer x,
|
||||
@NotNull @Schema(description = "左上角Y坐标", example = "50") Integer y,
|
||||
@NotNull @Schema(description = "宽度", example = "200") Integer width,
|
||||
@NotNull @Schema(description = "高度", example = "150") Integer height,
|
||||
@Schema(description = "标注标签", example = "车辆") String label
|
||||
//@Schema(description = "置信度", example = "0.95") Double confidence
|
||||
) {
|
||||
}
|
||||
@@ -1,24 +1,18 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.labelsys.backend.enums.IndustryType;
|
||||
import com.labelsys.backend.enums.TaskType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "创建标注任务请求")
|
||||
public record CreateAnnotationTaskRequest(
|
||||
@Schema(description = "任务名称", example = "运输文档问答抽取任务") @NotBlank(message = "任务名称不能为空") String taskName,
|
||||
@Schema(description = "行业类型", defaultValue = "TRANSPORT", example = "TRANSPORT") @NotNull(message = "行业类型不能为空") IndustryType industryType,
|
||||
@Schema(description = "任务类型", defaultValue = "EXTRACT_QA", example = "EXTRACT_QA") @NotNull(message = "任务类型不能为空") TaskType taskType,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"mode\":\"SELECT\",\"selectedConfigName\":\"qwen-plus-extract\"}") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"mode\":\"MANUAL\",\"manualConfig\":{\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo5678\"}}") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"selectedConfigName\":\"qa-extract-v1\"}") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") @Valid PromptConfigOptionRequest verifyPrompt) {
|
||||
}
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") @NotEmpty(message = "资源列表不能为空") List<Long> resourceIds) {
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.constraints.NotBlank;
|
||||
|
||||
@Schema(description = "手动模型配置请求")
|
||||
public record ManualModelConfigRequest(
|
||||
@Schema(description = "模型名称", example = "qwen-plus") @NotBlank(message = "模型名称不能为空") String modelName,
|
||||
@Schema(description = "模型地址", example = "https://dashscope.aliyuncs.com/compatible-mode/v1") @NotBlank(message = "模型地址不能为空") String modelUrl,
|
||||
@Schema(description = "模型密钥", example = "sk-demo1234") @NotBlank(message = "模型密钥不能为空") String apiKey
|
||||
) {
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务提示词配置请求")
|
||||
public record PromptConfigOptionRequest(
|
||||
@Schema(description = "已选择的提示词配置名称", example = "qa-extract-v1") String selectedConfigName,
|
||||
@Schema(description = "手动输入的提示词内容", example = "请抽取文档中的问答对,并按 JSON 数组输出。") String promptText
|
||||
) {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotEmpty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "保存图片BBOX请求")
|
||||
public record SaveImageBboxRequest(
|
||||
@NotEmpty @Schema(description = "BBOX坐标列表")
|
||||
@Valid List<BboxCoordinate> bboxes,
|
||||
@Schema(description = "备注") String remark
|
||||
) {
|
||||
}
|
||||
@@ -1,16 +0,0 @@
|
||||
package com.labelsys.backend.dto.request;
|
||||
|
||||
import com.labelsys.backend.enums.ConfigMode;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
@Schema(description = "任务模型配置请求")
|
||||
public record TaskModelConfigRequest(
|
||||
@Schema(description = "配置模式:SELECT 或 MANUAL", example = "SELECT") @NotNull(message = "配置模式不能为空") ConfigMode mode,
|
||||
|
||||
@Schema(description = "已选择的配置名称", example = "qwen-plus-extract") String selectedConfigName,
|
||||
|
||||
@Schema(description = "手动录入的模型配置", example = "{\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo1234\"}") @Valid ManualModelConfigRequest manualConfig) {
|
||||
}
|
||||
@@ -6,15 +6,10 @@ import com.labelsys.backend.enums.IndustryType;
|
||||
import com.labelsys.backend.enums.TaskType;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
@Schema(description = "更新标注任务请求")
|
||||
public record UpdateAnnotationTaskRequest(
|
||||
@Schema(description = "行业类型", example = "TRANSPORT") IndustryType industryType,
|
||||
@Schema(description = "任务类型", example = "EXTRACT_QA") TaskType taskType,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"mode\":\"SELECT\",\"selectedConfigName\":\"qwen-plus-extract\"}") @Valid TaskModelConfigRequest extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"mode\":\"MANUAL\",\"manualConfig\":{\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"apiKey\":\"sk-demo5678\"}}") @Valid TaskModelConfigRequest verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"selectedConfigName\":\"qa-extract-v1\"}") @Valid PromptConfigOptionRequest extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") @Valid PromptConfigOptionRequest verifyPrompt) {
|
||||
}
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") List<Long> resourceIds) {
|
||||
}
|
||||
@@ -1,25 +1,21 @@
|
||||
package com.labelsys.backend.dto.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import com.labelsys.backend.enums.IndustryType;
|
||||
import com.labelsys.backend.enums.TaskType;
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "标注任务响应")
|
||||
public record AnnotationTaskResponse(
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long id,
|
||||
@Schema(description = "任务名称", example = "运输文档问答抽取任务") String taskName,
|
||||
@Schema(description = "行业类型:默认值transport,暂不显示", example = "transport") IndustryType industryType,
|
||||
@Schema(description = "任务类型:暂不显示", example = "EXTRACT_QA") TaskType taskType,
|
||||
@Schema(description = "任务状态", example = "PENDING") String taskStatus,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") List<Long> resourceIds,
|
||||
@Schema(description = "抽取模型配置", example = "{\"configId\":191000000000000511,\"configName\":\"qwen-plus-extract\",\"modelName\":\"qwen-plus\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"maskedApiKey\":\"****1234\"}") TaskModelConfigResponse extractModel,
|
||||
@Schema(description = "校验模型配置", example = "{\"configId\":191000000000000512,\"configName\":\"qwen-max-verify\",\"modelName\":\"qwen-max\",\"modelUrl\":\"https://dashscope.aliyuncs.com/compatible-mode/v1\",\"maskedApiKey\":\"****5678\"}") TaskModelConfigResponse verifyModel,
|
||||
@Schema(description = "抽取提示词配置", example = "{\"configId\":191000000000000521,\"configName\":\"qa-extract-v1\",\"promptText\":\"请抽取文档中的问答对,并按 JSON 数组输出。\"}") TaskPromptConfigResponse extractPrompt,
|
||||
@Schema(description = "校验提示词配置", example = "{\"configId\":191000000000000522,\"configName\":\"qa-verify-v1\",\"promptText\":\"请对抽取结果进行逐项校验,并输出差异说明。\"}") TaskPromptConfigResponse verifyPrompt,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T10:20:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:30:00") LocalDateTime updatedAt
|
||||
@Schema(description = "任务ID", example = "191000000000000301") Long id,
|
||||
@Schema(description = "任务名称", example = "运输文档问答抽取任务") String taskName,
|
||||
@Schema(description = "行业类型", example = "transport") IndustryType industryType,
|
||||
@Schema(description = "任务类型", example = "EXTRACT_QA") TaskType taskType,
|
||||
@Schema(description = "任务状态", example = "PENDING") String taskStatus,
|
||||
@Schema(description = "资源ID列表", example = "[191000000000000101,191000000000000102]") List<Long> resourceIds,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T10:20:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:30:00") LocalDateTime updatedAt
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.labelsys.backend.dto.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
@Schema(description = "图片BBOX响应")
|
||||
public record ImageBboxResponse(
|
||||
@Schema(description = "bbox标识ID", example = "191000000000000101") Long id,
|
||||
@Schema(description = "资源ID", example = "191000000000000102") Long resourceId,
|
||||
@Schema(description = "BBOX坐标列表") List<BboxCoordinateResponse> bboxes,
|
||||
@Schema(description = "备注", example = "车辆检测标注") String remark,
|
||||
@Schema(description = "创建人名称", example = "张审核") String creatorName,
|
||||
@Schema(description = "创建时间", example = "2026-04-27T10:00:00") LocalDateTime createdAt,
|
||||
@Schema(description = "更新时间", example = "2026-04-27T10:05:00") LocalDateTime updatedAt
|
||||
) {
|
||||
|
||||
@Schema(description = "BBOX坐标响应对象")
|
||||
public record BboxCoordinateResponse(
|
||||
@Schema(description = "BBOX标识", example = "bbox_001") String id,
|
||||
@Schema(description = "左上角X坐标", example = "100") Integer x,
|
||||
@Schema(description = "左上角Y坐标", example = "50") Integer y,
|
||||
@Schema(description = "宽度", example = "200") Integer width,
|
||||
@Schema(description = "高度", example = "150") Integer height,
|
||||
@Schema(description = "标注标签", example = "车辆") String label
|
||||
// @Schema(description = "置信度", example = "0.95") Double confidence
|
||||
) {
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
package com.labelsys.backend.dto.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务模型配置响应")
|
||||
public record TaskModelConfigResponse(
|
||||
@Schema(description = "配置ID", example = "191000000000000511") Long configId,
|
||||
@Schema(description = "配置名称", example = "qwen-plus-extract") String configName,
|
||||
@Schema(description = "模型名称", example = "qwen-plus") String modelName,
|
||||
@Schema(description = "模型地址", example = "https://dashscope.aliyuncs.com/compatible-mode/v1") String modelUrl,
|
||||
@Schema(description = "脱敏后的模型密钥", example = "****1234") String maskedApiKey
|
||||
) {
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package com.labelsys.backend.dto.response;
|
||||
|
||||
import io.swagger.v3.oas.annotations.media.Schema;
|
||||
|
||||
@Schema(description = "任务提示词配置响应")
|
||||
public record TaskPromptConfigResponse(
|
||||
@Schema(description = "配置ID", example = "191000000000000521") Long configId,
|
||||
@Schema(description = "配置名称", example = "qa-extract-v1") String configName,
|
||||
@Schema(description = "提示词内容", example = "请抽取文档中的问答对,并按 JSON 数组输出。") String promptText
|
||||
) {
|
||||
}
|
||||
Reference in New Issue
Block a user