添加apikey国密sm4加解密,agent configs配置功能
This commit is contained in:
@@ -266,7 +266,8 @@ public class AnnotationResultService {
|
||||
List<QaContent.QaRecord> updatedQaRecords = qaContent.records().stream()
|
||||
.map(record -> {
|
||||
String mergedAnswer = request.mergedAnswers().get(record.id());
|
||||
String reviewComment = request.reviewComments() != null ? request.reviewComments().get(record.id()) : null;
|
||||
String reviewComment =
|
||||
request.reviewComments() != null ? request.reviewComments().get(record.id()) : null;
|
||||
if (mergedAnswer != null || reviewComment != null) {
|
||||
return new QaContent.QaRecord(
|
||||
record.id(),
|
||||
@@ -364,7 +365,7 @@ public class AnnotationResultService {
|
||||
return objectMapper.readValue(jsonContent, new TypeReference<QaContent>() {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to load qa content, returning empty content. resultId={}, filePath={}, error={}",
|
||||
log.warn("Failed to load qa content, returning empty content. resultId={}, filePath={}, error={}",
|
||||
result.getId(), result.getQaContentFilePath(), e.getMessage());
|
||||
return new QaContent(null, null, List.of(), null);
|
||||
}
|
||||
@@ -384,7 +385,7 @@ public class AnnotationResultService {
|
||||
return objectMapper.readValue(jsonContent, new TypeReference<DiffContent>() {
|
||||
});
|
||||
} catch (Exception e) {
|
||||
log.warn("Failed to load diff summary, returning empty content. resultId={}, filePath={}, error={}",
|
||||
log.warn("Failed to load diff summary, returning empty content. resultId={}, filePath={}, error={}",
|
||||
result.getId(), result.getDiffSummaryFilePath(), e.getMessage());
|
||||
return new DiffContent(null, null, List.of(), null);
|
||||
}
|
||||
@@ -487,9 +488,9 @@ public class AnnotationResultService {
|
||||
List<QaRecord> records,
|
||||
Metadata metadata
|
||||
) {
|
||||
private record QaRecord(String id, Long batchId, String question, String answer,
|
||||
Boolean requiresReview, SourceSegments sourceSegments,
|
||||
String questionCategory, Scores scores, String reviewComment) {
|
||||
private record QaRecord(String id, Long batchId, String question, String answer,
|
||||
Boolean requiresReview, SourceSegments sourceSegments,
|
||||
String questionCategory, Scores scores, String reviewComment) {
|
||||
}
|
||||
|
||||
private record SourceSegments(String segment, Integer chunkIndex, String chunkTitle, String chunkContent) {
|
||||
|
||||
Reference in New Issue
Block a user