@meetkai/mka1 0.54.27 → 0.54.29
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/mcp-server.js +81 -10
- package/bin/mcp-server.js.map +17 -15
- package/dist/commonjs/funcs/guardrailsTestGuardrails.d.ts +1 -1
- package/dist/commonjs/funcs/guardrailsTestGuardrails.js +1 -1
- package/dist/commonjs/funcs/guardrailsUpdateGuardrails.d.ts +1 -1
- package/dist/commonjs/funcs/guardrailsUpdateGuardrails.js +1 -1
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/mcp-server/mcp-server.js +1 -1
- package/dist/commonjs/mcp-server/server.js +1 -1
- package/dist/commonjs/mcp-server/tools/guardrailsTestGuardrails.js +1 -1
- package/dist/commonjs/mcp-server/tools/guardrailsTestGuardrails.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/guardrailsUpdateGuardrails.js +1 -1
- package/dist/commonjs/mcp-server/tools/guardrailsUpdateGuardrails.js.map +1 -1
- package/dist/commonjs/models/components/classifierconfig.d.ts +51 -0
- package/dist/commonjs/models/components/classifierconfig.d.ts.map +1 -0
- package/dist/commonjs/models/components/classifierconfig.js +87 -0
- package/dist/commonjs/models/components/classifierconfig.js.map +1 -0
- package/dist/commonjs/models/components/classifierguardrail.d.ts +30 -0
- package/dist/commonjs/models/components/classifierguardrail.d.ts.map +1 -0
- package/dist/commonjs/models/components/classifierguardrail.js +74 -0
- package/dist/commonjs/models/components/classifierguardrail.js.map +1 -0
- package/dist/commonjs/models/components/getexportstatusresponse.d.ts +1 -0
- package/dist/commonjs/models/components/getexportstatusresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/getexportstatusresponse.js +1 -0
- package/dist/commonjs/models/components/getexportstatusresponse.js.map +1 -1
- package/dist/commonjs/models/components/guardrailconfig.d.ts +3 -2
- package/dist/commonjs/models/components/guardrailconfig.d.ts.map +1 -1
- package/dist/commonjs/models/components/guardrailconfig.js +3 -0
- package/dist/commonjs/models/components/guardrailconfig.js.map +1 -1
- package/dist/commonjs/models/components/guardrailmode.d.ts +1 -0
- package/dist/commonjs/models/components/guardrailmode.d.ts.map +1 -1
- package/dist/commonjs/models/components/guardrailmode.js +1 -0
- package/dist/commonjs/models/components/guardrailmode.js.map +1 -1
- package/dist/commonjs/models/components/index.d.ts +2 -0
- package/dist/commonjs/models/components/index.d.ts.map +1 -1
- package/dist/commonjs/models/components/index.js +2 -0
- package/dist/commonjs/models/components/index.js.map +1 -1
- package/dist/commonjs/models/components/startexportfeedbackresponse.d.ts +1 -0
- package/dist/commonjs/models/components/startexportfeedbackresponse.d.ts.map +1 -1
- package/dist/commonjs/models/components/startexportfeedbackresponse.js +1 -0
- package/dist/commonjs/models/components/startexportfeedbackresponse.js.map +1 -1
- package/dist/commonjs/react-query/guardrailsTestGuardrails.d.ts +1 -1
- package/dist/commonjs/react-query/guardrailsTestGuardrails.js +1 -1
- package/dist/commonjs/react-query/guardrailsUpdateGuardrails.d.ts +1 -1
- package/dist/commonjs/react-query/guardrailsUpdateGuardrails.js +1 -1
- package/dist/commonjs/sdk/guardrails.d.ts +2 -2
- package/dist/commonjs/sdk/guardrails.js +2 -2
- package/dist/esm/funcs/guardrailsTestGuardrails.d.ts +1 -1
- package/dist/esm/funcs/guardrailsTestGuardrails.js +1 -1
- package/dist/esm/funcs/guardrailsUpdateGuardrails.d.ts +1 -1
- package/dist/esm/funcs/guardrailsUpdateGuardrails.js +1 -1
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/mcp-server/mcp-server.js +1 -1
- package/dist/esm/mcp-server/server.js +1 -1
- package/dist/esm/mcp-server/tools/guardrailsTestGuardrails.js +1 -1
- package/dist/esm/mcp-server/tools/guardrailsTestGuardrails.js.map +1 -1
- package/dist/esm/mcp-server/tools/guardrailsUpdateGuardrails.js +1 -1
- package/dist/esm/mcp-server/tools/guardrailsUpdateGuardrails.js.map +1 -1
- package/dist/esm/models/components/classifierconfig.d.ts +51 -0
- package/dist/esm/models/components/classifierconfig.d.ts.map +1 -0
- package/dist/esm/models/components/classifierconfig.js +49 -0
- package/dist/esm/models/components/classifierconfig.js.map +1 -0
- package/dist/esm/models/components/classifierguardrail.d.ts +30 -0
- package/dist/esm/models/components/classifierguardrail.d.ts.map +1 -0
- package/dist/esm/models/components/classifierguardrail.js +36 -0
- package/dist/esm/models/components/classifierguardrail.js.map +1 -0
- package/dist/esm/models/components/getexportstatusresponse.d.ts +1 -0
- package/dist/esm/models/components/getexportstatusresponse.d.ts.map +1 -1
- package/dist/esm/models/components/getexportstatusresponse.js +1 -0
- package/dist/esm/models/components/getexportstatusresponse.js.map +1 -1
- package/dist/esm/models/components/guardrailconfig.d.ts +3 -2
- package/dist/esm/models/components/guardrailconfig.d.ts.map +1 -1
- package/dist/esm/models/components/guardrailconfig.js +3 -0
- package/dist/esm/models/components/guardrailconfig.js.map +1 -1
- package/dist/esm/models/components/guardrailmode.d.ts +1 -0
- package/dist/esm/models/components/guardrailmode.d.ts.map +1 -1
- package/dist/esm/models/components/guardrailmode.js +1 -0
- package/dist/esm/models/components/guardrailmode.js.map +1 -1
- package/dist/esm/models/components/index.d.ts +2 -0
- package/dist/esm/models/components/index.d.ts.map +1 -1
- package/dist/esm/models/components/index.js +2 -0
- package/dist/esm/models/components/index.js.map +1 -1
- package/dist/esm/models/components/startexportfeedbackresponse.d.ts +1 -0
- package/dist/esm/models/components/startexportfeedbackresponse.d.ts.map +1 -1
- package/dist/esm/models/components/startexportfeedbackresponse.js +1 -0
- package/dist/esm/models/components/startexportfeedbackresponse.js.map +1 -1
- package/dist/esm/react-query/guardrailsTestGuardrails.d.ts +1 -1
- package/dist/esm/react-query/guardrailsTestGuardrails.js +1 -1
- package/dist/esm/react-query/guardrailsUpdateGuardrails.d.ts +1 -1
- package/dist/esm/react-query/guardrailsUpdateGuardrails.js +1 -1
- package/dist/esm/sdk/guardrails.d.ts +2 -2
- package/dist/esm/sdk/guardrails.js +2 -2
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/guardrailsTestGuardrails.ts +1 -1
- package/src/funcs/guardrailsUpdateGuardrails.ts +1 -1
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/mcp-server/tools/guardrailsTestGuardrails.ts +1 -1
- package/src/mcp-server/tools/guardrailsUpdateGuardrails.ts +1 -1
- package/src/models/components/classifierconfig.ts +110 -0
- package/src/models/components/classifierguardrail.ts +84 -0
- package/src/models/components/getexportstatusresponse.ts +1 -0
- package/src/models/components/guardrailconfig.ts +11 -1
- package/src/models/components/guardrailmode.ts +1 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/startexportfeedbackresponse.ts +1 -0
- package/src/react-query/guardrailsTestGuardrails.ts +1 -1
- package/src/react-query/guardrailsUpdateGuardrails.ts +1 -1
- package/src/sdk/guardrails.ts +2 -2
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Stop the request or skip this classifier when evaluation fails
|
|
14
|
+
*/
|
|
15
|
+
export const OnError = {
|
|
16
|
+
FailClosed: "fail_closed",
|
|
17
|
+
FailOpen: "fail_open",
|
|
18
|
+
} as const;
|
|
19
|
+
/**
|
|
20
|
+
* Stop the request or skip this classifier when evaluation fails
|
|
21
|
+
*/
|
|
22
|
+
export type OnError = ClosedEnum<typeof OnError>;
|
|
23
|
+
|
|
24
|
+
export type ClassifierConfig = {
|
|
25
|
+
/**
|
|
26
|
+
* Exact model ID available in the caller's organization registry
|
|
27
|
+
*/
|
|
28
|
+
model: string;
|
|
29
|
+
/**
|
|
30
|
+
* Instructions defining when to block or allow content; content is supplied separately
|
|
31
|
+
*/
|
|
32
|
+
prompt: string;
|
|
33
|
+
/**
|
|
34
|
+
* Stop the request or skip this classifier when evaluation fails
|
|
35
|
+
*/
|
|
36
|
+
onError?: OnError | undefined;
|
|
37
|
+
/**
|
|
38
|
+
* Message returned when classification blocks content
|
|
39
|
+
*/
|
|
40
|
+
rejectionMessage?: string | undefined;
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/** @internal */
|
|
44
|
+
export const OnError$inboundSchema: z.ZodNativeEnum<typeof OnError> = z
|
|
45
|
+
.nativeEnum(OnError);
|
|
46
|
+
/** @internal */
|
|
47
|
+
export const OnError$outboundSchema: z.ZodNativeEnum<typeof OnError> =
|
|
48
|
+
OnError$inboundSchema;
|
|
49
|
+
|
|
50
|
+
/** @internal */
|
|
51
|
+
export const ClassifierConfig$inboundSchema: z.ZodType<
|
|
52
|
+
ClassifierConfig,
|
|
53
|
+
z.ZodTypeDef,
|
|
54
|
+
unknown
|
|
55
|
+
> = z.object({
|
|
56
|
+
model: z.string(),
|
|
57
|
+
prompt: z.string(),
|
|
58
|
+
on_error: OnError$inboundSchema.default("fail_closed"),
|
|
59
|
+
rejection_message: z.string().default(
|
|
60
|
+
"This request is not allowed by your organization's content policy.",
|
|
61
|
+
),
|
|
62
|
+
}).transform((v) => {
|
|
63
|
+
return remap$(v, {
|
|
64
|
+
"on_error": "onError",
|
|
65
|
+
"rejection_message": "rejectionMessage",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
/** @internal */
|
|
69
|
+
export type ClassifierConfig$Outbound = {
|
|
70
|
+
model: string;
|
|
71
|
+
prompt: string;
|
|
72
|
+
on_error: string;
|
|
73
|
+
rejection_message: string;
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/** @internal */
|
|
77
|
+
export const ClassifierConfig$outboundSchema: z.ZodType<
|
|
78
|
+
ClassifierConfig$Outbound,
|
|
79
|
+
z.ZodTypeDef,
|
|
80
|
+
ClassifierConfig
|
|
81
|
+
> = z.object({
|
|
82
|
+
model: z.string(),
|
|
83
|
+
prompt: z.string(),
|
|
84
|
+
onError: OnError$outboundSchema.default("fail_closed"),
|
|
85
|
+
rejectionMessage: z.string().default(
|
|
86
|
+
"This request is not allowed by your organization's content policy.",
|
|
87
|
+
),
|
|
88
|
+
}).transform((v) => {
|
|
89
|
+
return remap$(v, {
|
|
90
|
+
onError: "on_error",
|
|
91
|
+
rejectionMessage: "rejection_message",
|
|
92
|
+
});
|
|
93
|
+
});
|
|
94
|
+
|
|
95
|
+
export function classifierConfigToJSON(
|
|
96
|
+
classifierConfig: ClassifierConfig,
|
|
97
|
+
): string {
|
|
98
|
+
return JSON.stringify(
|
|
99
|
+
ClassifierConfig$outboundSchema.parse(classifierConfig),
|
|
100
|
+
);
|
|
101
|
+
}
|
|
102
|
+
export function classifierConfigFromJSON(
|
|
103
|
+
jsonString: string,
|
|
104
|
+
): SafeParseResult<ClassifierConfig, SDKValidationError> {
|
|
105
|
+
return safeParse(
|
|
106
|
+
jsonString,
|
|
107
|
+
(x) => ClassifierConfig$inboundSchema.parse(JSON.parse(x)),
|
|
108
|
+
`Failed to parse 'ClassifierConfig' from JSON`,
|
|
109
|
+
);
|
|
110
|
+
}
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
10
|
+
import {
|
|
11
|
+
ClassifierConfig,
|
|
12
|
+
ClassifierConfig$inboundSchema,
|
|
13
|
+
ClassifierConfig$Outbound,
|
|
14
|
+
ClassifierConfig$outboundSchema,
|
|
15
|
+
} from "./classifierconfig.js";
|
|
16
|
+
|
|
17
|
+
export type ClassifierGuardrail = {
|
|
18
|
+
mode: "classifier";
|
|
19
|
+
/**
|
|
20
|
+
* Whether this guardrail is enabled
|
|
21
|
+
*/
|
|
22
|
+
enabled?: boolean | undefined;
|
|
23
|
+
/**
|
|
24
|
+
* Also apply this guardrail to model output, not just the request
|
|
25
|
+
*/
|
|
26
|
+
checkOutput?: boolean | undefined;
|
|
27
|
+
config: ClassifierConfig;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const ClassifierGuardrail$inboundSchema: z.ZodType<
|
|
32
|
+
ClassifierGuardrail,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
unknown
|
|
35
|
+
> = z.object({
|
|
36
|
+
mode: z.literal("classifier"),
|
|
37
|
+
enabled: z.boolean().default(true),
|
|
38
|
+
check_output: z.boolean().optional(),
|
|
39
|
+
config: ClassifierConfig$inboundSchema,
|
|
40
|
+
}).transform((v) => {
|
|
41
|
+
return remap$(v, {
|
|
42
|
+
"check_output": "checkOutput",
|
|
43
|
+
});
|
|
44
|
+
});
|
|
45
|
+
/** @internal */
|
|
46
|
+
export type ClassifierGuardrail$Outbound = {
|
|
47
|
+
mode: "classifier";
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
check_output?: boolean | undefined;
|
|
50
|
+
config: ClassifierConfig$Outbound;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const ClassifierGuardrail$outboundSchema: z.ZodType<
|
|
55
|
+
ClassifierGuardrail$Outbound,
|
|
56
|
+
z.ZodTypeDef,
|
|
57
|
+
ClassifierGuardrail
|
|
58
|
+
> = z.object({
|
|
59
|
+
mode: z.literal("classifier"),
|
|
60
|
+
enabled: z.boolean().default(true),
|
|
61
|
+
checkOutput: z.boolean().optional(),
|
|
62
|
+
config: ClassifierConfig$outboundSchema,
|
|
63
|
+
}).transform((v) => {
|
|
64
|
+
return remap$(v, {
|
|
65
|
+
checkOutput: "check_output",
|
|
66
|
+
});
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function classifierGuardrailToJSON(
|
|
70
|
+
classifierGuardrail: ClassifierGuardrail,
|
|
71
|
+
): string {
|
|
72
|
+
return JSON.stringify(
|
|
73
|
+
ClassifierGuardrail$outboundSchema.parse(classifierGuardrail),
|
|
74
|
+
);
|
|
75
|
+
}
|
|
76
|
+
export function classifierGuardrailFromJSON(
|
|
77
|
+
jsonString: string,
|
|
78
|
+
): SafeParseResult<ClassifierGuardrail, SDKValidationError> {
|
|
79
|
+
return safeParse(
|
|
80
|
+
jsonString,
|
|
81
|
+
(x) => ClassifierGuardrail$inboundSchema.parse(JSON.parse(x)),
|
|
82
|
+
`Failed to parse 'ClassifierGuardrail' from JSON`,
|
|
83
|
+
);
|
|
84
|
+
}
|
|
@@ -13,6 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
* Current status of the export job
|
|
14
14
|
*/
|
|
15
15
|
export const GetExportStatusResponseStatus = {
|
|
16
|
+
Unknown: "UNKNOWN",
|
|
16
17
|
NotFound: "NOT_FOUND",
|
|
17
18
|
Running: "RUNNING",
|
|
18
19
|
Completed: "COMPLETED",
|
|
@@ -14,6 +14,12 @@ import {
|
|
|
14
14
|
BanWordsGuardrail$Outbound,
|
|
15
15
|
BanWordsGuardrail$outboundSchema,
|
|
16
16
|
} from "./banwordsguardrail.js";
|
|
17
|
+
import {
|
|
18
|
+
ClassifierGuardrail,
|
|
19
|
+
ClassifierGuardrail$inboundSchema,
|
|
20
|
+
ClassifierGuardrail$Outbound,
|
|
21
|
+
ClassifierGuardrail$outboundSchema,
|
|
22
|
+
} from "./classifierguardrail.js";
|
|
17
23
|
import {
|
|
18
24
|
LeakageGuardrail,
|
|
19
25
|
LeakageGuardrail$inboundSchema,
|
|
@@ -31,6 +37,7 @@ export type GuardrailConfig =
|
|
|
31
37
|
| BanWordsGuardrail
|
|
32
38
|
| PromptInjectionGuardrail
|
|
33
39
|
| LeakageGuardrail
|
|
40
|
+
| ClassifierGuardrail
|
|
34
41
|
| discriminatedUnionTypes.Unknown<"mode">;
|
|
35
42
|
|
|
36
43
|
/** @internal */
|
|
@@ -42,12 +49,14 @@ export const GuardrailConfig$inboundSchema: z.ZodType<
|
|
|
42
49
|
ban_words: BanWordsGuardrail$inboundSchema,
|
|
43
50
|
prompt_injection: PromptInjectionGuardrail$inboundSchema,
|
|
44
51
|
leakage: LeakageGuardrail$inboundSchema,
|
|
52
|
+
classifier: ClassifierGuardrail$inboundSchema,
|
|
45
53
|
});
|
|
46
54
|
/** @internal */
|
|
47
55
|
export type GuardrailConfig$Outbound =
|
|
48
56
|
| BanWordsGuardrail$Outbound
|
|
49
57
|
| PromptInjectionGuardrail$Outbound
|
|
50
|
-
| LeakageGuardrail$Outbound
|
|
58
|
+
| LeakageGuardrail$Outbound
|
|
59
|
+
| ClassifierGuardrail$Outbound;
|
|
51
60
|
|
|
52
61
|
/** @internal */
|
|
53
62
|
export const GuardrailConfig$outboundSchema: z.ZodType<
|
|
@@ -58,6 +67,7 @@ export const GuardrailConfig$outboundSchema: z.ZodType<
|
|
|
58
67
|
BanWordsGuardrail$outboundSchema,
|
|
59
68
|
PromptInjectionGuardrail$outboundSchema,
|
|
60
69
|
LeakageGuardrail$outboundSchema,
|
|
70
|
+
ClassifierGuardrail$outboundSchema,
|
|
61
71
|
]);
|
|
62
72
|
|
|
63
73
|
export function guardrailConfigToJSON(
|
|
@@ -53,6 +53,8 @@ export * from "./checkpointmetrics.js";
|
|
|
53
53
|
export * from "./chunkingstrategy.js";
|
|
54
54
|
export * from "./classificationrequest.js";
|
|
55
55
|
export * from "./classificationresponse.js";
|
|
56
|
+
export * from "./classifierconfig.js";
|
|
57
|
+
export * from "./classifierguardrail.js";
|
|
56
58
|
export * from "./classifygroupby.js";
|
|
57
59
|
export * from "./clickaction.js";
|
|
58
60
|
export * from "./clustercurrencyresponse.js";
|
|
@@ -13,6 +13,7 @@ import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
|
13
13
|
* Current status of the export job
|
|
14
14
|
*/
|
|
15
15
|
export const StartExportFeedbackResponseStatus = {
|
|
16
|
+
Unknown: "UNKNOWN",
|
|
16
17
|
NotFound: "NOT_FOUND",
|
|
17
18
|
Running: "RUNNING",
|
|
18
19
|
Completed: "COMPLETED",
|
|
@@ -49,7 +49,7 @@ export type GuardrailsTestGuardrailsMutationError =
|
|
|
49
49
|
* Test content against guardrails
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Test a piece of content against the caller's effective guardrails (org-wide policy plus team policy) without
|
|
52
|
+
* Test a piece of content against the caller's effective guardrails (org-wide policy plus team policy) without generating an answer. Classifier guardrails call their configured model and incur inference usage; API keys additionally require write:responses and must pass the spend budget gate. Useful for debugging and validating guardrail configurations. Returns a report indicating whether the content passed and which guardrail was triggered if any.
|
|
53
53
|
*/
|
|
54
54
|
export function useGuardrailsTestGuardrailsMutation(
|
|
55
55
|
options?: MutationHookOptions<
|
|
@@ -49,7 +49,7 @@ export type GuardrailsUpdateGuardrailsMutationError =
|
|
|
49
49
|
* Update guardrails policy
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Replace a guardrails policy. Omit team_id to set the org-wide policy (org admin only); provide team_id to set that team's additional policy (org admins may target any team in their org, other callers only their own team). The org-wide policy applies to every team; a team policy is enforced in addition to it — configuring a team policy never weakens the org-wide one.
|
|
52
|
+
* Replace a guardrails policy. Classifier models must be active and declare structured-output support; replace the example model ID with a suitable model from your organization. Omit team_id to set the org-wide policy (org admin only); provide team_id to set that team's additional policy (org admins may target any team in their org, other callers only their own team). The org-wide policy applies to every team; a team policy is enforced in addition to it — configuring a team policy never weakens the org-wide one.
|
|
53
53
|
*/
|
|
54
54
|
export function useGuardrailsUpdateGuardrailsMutation(
|
|
55
55
|
options?: MutationHookOptions<
|
package/src/sdk/guardrails.ts
CHANGED
|
@@ -34,7 +34,7 @@ export class Guardrails extends ClientSDK {
|
|
|
34
34
|
* Update guardrails policy
|
|
35
35
|
*
|
|
36
36
|
* @remarks
|
|
37
|
-
* Replace a guardrails policy. Omit team_id to set the org-wide policy (org admin only); provide team_id to set that team's additional policy (org admins may target any team in their org, other callers only their own team). The org-wide policy applies to every team; a team policy is enforced in addition to it — configuring a team policy never weakens the org-wide one.
|
|
37
|
+
* Replace a guardrails policy. Classifier models must be active and declare structured-output support; replace the example model ID with a suitable model from your organization. Omit team_id to set the org-wide policy (org admin only); provide team_id to set that team's additional policy (org admins may target any team in their org, other callers only their own team). The org-wide policy applies to every team; a team policy is enforced in addition to it — configuring a team policy never weakens the org-wide one.
|
|
38
38
|
*/
|
|
39
39
|
async updateGuardrails(
|
|
40
40
|
request: operations.UpdateGuardrailsRequest,
|
|
@@ -85,7 +85,7 @@ export class Guardrails extends ClientSDK {
|
|
|
85
85
|
* Test content against guardrails
|
|
86
86
|
*
|
|
87
87
|
* @remarks
|
|
88
|
-
* Test a piece of content against the caller's effective guardrails (org-wide policy plus team policy) without
|
|
88
|
+
* Test a piece of content against the caller's effective guardrails (org-wide policy plus team policy) without generating an answer. Classifier guardrails call their configured model and incur inference usage; API keys additionally require write:responses and must pass the spend budget gate. Useful for debugging and validating guardrail configurations. Returns a report indicating whether the content passed and which guardrail was triggered if any.
|
|
89
89
|
*/
|
|
90
90
|
async testGuardrails(
|
|
91
91
|
request: operations.TestGuardrailsRequest,
|