Skip to content

Commit 77f99f4

Browse files
feat: add enrichment result in case review DTO (#1100)
* feat(cases): enhance case review schema with KYC analysis and pivot enrichments - Added `pivot_enrichments` property to `CaseReviewContentDto` to include KYC analysis results. - Introduced `KycAnalysisDto` and `GroundingCitationDto` types to support the new data structure. - Updated OpenAPI specification to reflect these changes. * refacto(ai_agent): Send null if no pivot enrichments * Update packages/marble-api/openapis/marblecore-api/cases.yml Co-authored-by: Copilot <[email protected]> --------- Co-authored-by: Copilot <[email protected]>
1 parent cf24b98 commit 77f99f4

File tree

2 files changed

+31
-18
lines changed

2 files changed

+31
-18
lines changed

packages/marble-api/openapis/marblecore-api/cases.yml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1532,6 +1532,15 @@ components:
15321532
$ref: '#/components/schemas/CaseReviewProofDto'
15331533
thought:
15341534
type: string
1535+
pivot_enrichments:
1536+
type: object
1537+
description: The enrichments of the pivot objects (null if the feature is disabled)
1538+
nullable: true
1539+
properties:
1540+
results:
1541+
type: array
1542+
items:
1543+
$ref: '#/components/schemas/KYCAnalysisDto'
15351544
- anyOf:
15361545
- $ref: '#/components/schemas/CaseReviewOkDto'
15371546
- $ref: '#/components/schemas/CaseReviewNotOkDto'

packages/marble-api/src/generated/marblecore-api.ts

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -392,6 +392,24 @@ export type CaseReviewProofDto = {
392392
/** The reason why the object was used to justify the review */
393393
reason: string;
394394
};
395+
export type GroundingCitationDto = {
396+
/** Title of the source */
397+
title: string;
398+
/** Domain of the source (not used for now) */
399+
domain: string;
400+
/** URL of the source */
401+
url: string;
402+
/** Date of the source */
403+
date: string;
404+
};
405+
export type KycAnalysisDto = {
406+
/** Output of LLM analysis on a pivot object */
407+
analysis: string;
408+
/** Name of the entity on which the pivot value is found. */
409+
entity_name: string;
410+
/** List of source used in the analysis. The analysis uses anchors ([1][2]), these anchors are used to justify the analysis and the index follow the list order */
411+
citations: GroundingCitationDto[];
412+
};
395413
export type CaseReviewOkDto = {
396414
ok: true;
397415
};
@@ -404,31 +422,17 @@ export type CaseReviewContentDto = {
404422
output: string;
405423
proofs: CaseReviewProofDto[];
406424
thought?: string;
425+
/** The enrichments of the pivot objects (null if the feature is disabled) */
426+
pivot_enrichments?: {
427+
results?: KycAnalysisDto[];
428+
} | null;
407429
} & (CaseReviewOkDto | CaseReviewNotOkDto);
408430
export type CaseReviewDto = {
409431
id: string;
410432
reaction: CaseReviewFeedbackDto;
411433
version: string;
412434
review: CaseReviewContentDto;
413435
};
414-
export type GroundingCitationDto = {
415-
/** Title of the source */
416-
title: string;
417-
/** Domain of the source (not used for now) */
418-
domain: string;
419-
/** URL of the source */
420-
url: string;
421-
/** Date of the source */
422-
date: string;
423-
};
424-
export type KycAnalysisDto = {
425-
/** Output of LLM analysis on a pivot object */
426-
analysis: string;
427-
/** Name of the entity on which the pivot value is found. */
428-
entity_name: string;
429-
/** List of source used in the analysis. The analysis uses anchors ([1][2]), these anchors are used to justify the analysis and the index follow the list order */
430-
citations: GroundingCitationDto[];
431-
};
432436
export type SuspiciousActivityReportDto = {
433437
id: string;
434438
status: "pending" | "completed";

0 commit comments

Comments
 (0)