Skip to content

Commit

Permalink
pangea-node-sdk: let action be a string
Browse files Browse the repository at this point in the history
  • Loading branch information
kenany committed Feb 11, 2025
1 parent 85d292b commit 805948b
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions packages/pangea-node-sdk/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -294,23 +294,16 @@ export namespace Audit {
}

export namespace AIGuard {
type DetectorAction =
| "detected"
| "redacted"
| "defanged"
| "reported"
| "blocked";

export interface MaliciousEntity {
raw?: Record<string, unknown>;
action: DetectorAction;
action: string;
start_pos?: number;
type: string;
value: string;
}

export interface PIIEntity {
action: DetectorAction;
action: string;
start_pos?: number;
type: string;
value: string;
Expand Down Expand Up @@ -340,7 +333,7 @@ export namespace AIGuard {
/** Result of the recipe analyzing and input prompt. */
detectors: {
prompt_injection: Detector<{
action: DetectorAction;
action: string;
analyzer_responses: { analyzer: string; confidence: number }[];
}>;
pii_entity?: Detector<{ entities: PIIEntity[] }>;
Expand Down

0 comments on commit 805948b

Please sign in to comment.