Skip to content
This repository was archived by the owner on Aug 14, 2025. It is now read-only.

Commit fc4fbf9

Browse files
feat(api): update via SDK Studio
1 parent fc527fa commit fc4fbf9

File tree

5 files changed

+68
-6
lines changed

5 files changed

+68
-6
lines changed

.stats.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 105
2-
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-6ec8c37c9c255d26f472a787524e8cd03724e0bb2443ecb796a03a3571a7136b.yml
3-
openapi_spec_hash: 41185cef263f9c3d1342262598014ae5
4-
config_hash: 4205e80455db5fa2a7b414372d28dac1
2+
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/llamastack%2Fllama-stack-client-ea01b3ebf9eea9d623d73a0dbf712698436d216fdcb09f3c6cb2aa7334615103.yml
3+
openapi_spec_hash: a4f54e9909e5f99acf14d9735974b834
4+
config_hash: ffbd7388f1c8a5151f2630ae154056ee

api.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,7 @@ Methods:
407407

408408
Types:
409409

410+
- <code><a href="./src/resources/safety.ts">OpenAPIModerationsResponse</a></code>
410411
- <code><a href="./src/resources/safety.ts">RunShieldResponse</a></code>
411412

412413
Methods:

src/index.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,12 @@ import {
7070
} from './resources/models';
7171
import { ListProvidersResponse, ProviderListResponse, Providers } from './resources/providers';
7272
import { ListRoutesResponse, RouteListResponse, Routes } from './resources/routes';
73-
import { RunShieldResponse, Safety, SafetyRunShieldParams } from './resources/safety';
73+
import {
74+
OpenAPIModerationsResponse,
75+
RunShieldResponse,
76+
Safety,
77+
SafetyRunShieldParams,
78+
} from './resources/safety';
7479
import {
7580
Scoring,
7681
ScoringScoreBatchParams,
@@ -599,6 +604,7 @@ export declare namespace LlamaStackClient {
599604

600605
export {
601606
Safety as Safety,
607+
type OpenAPIModerationsResponse as OpenAPIModerationsResponse,
602608
type RunShieldResponse as RunShieldResponse,
603609
type SafetyRunShieldParams as SafetyRunShieldParams,
604610
};

src/resources/index.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,12 @@ export {
106106
type ResponseListParams,
107107
} from './responses/responses';
108108
export { Routes, type ListRoutesResponse, type RouteListResponse } from './routes';
109-
export { Safety, type RunShieldResponse, type SafetyRunShieldParams } from './safety';
109+
export {
110+
Safety,
111+
type OpenAPIModerationsResponse,
112+
type RunShieldResponse,
113+
type SafetyRunShieldParams,
114+
} from './safety';
110115
export {
111116
Scoring,
112117
type ScoringScoreResponse,

src/resources/safety.ts

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,52 @@ export class Safety extends APIResource {
1313
}
1414
}
1515

16+
/**
17+
* A moderation object.
18+
*/
19+
export interface OpenAPIModerationsResponse {
20+
/**
21+
* The unique identifier for the moderation request.
22+
*/
23+
id: string;
24+
25+
/**
26+
* The model used to generate the moderation results.
27+
*/
28+
model: string;
29+
30+
/**
31+
* A list of moderation objects
32+
*/
33+
results: Array<OpenAPIModerationsResponse.Result>;
34+
}
35+
36+
export namespace OpenAPIModerationsResponse {
37+
/**
38+
* A moderation object.
39+
*/
40+
export interface Result {
41+
/**
42+
* A list of the categories, and whether they are flagged or not.
43+
*/
44+
categories: { [key: string]: boolean };
45+
46+
category_applied_input_types: { [key: string]: Array<string> };
47+
48+
category_messages: { [key: string]: string };
49+
50+
/**
51+
* A list of the categories along with their scores as predicted by model.
52+
*/
53+
category_scores: { [key: string]: number };
54+
55+
/**
56+
* Whether any of the below categories are flagged.
57+
*/
58+
flagged: boolean;
59+
}
60+
}
61+
1662
export interface RunShieldResponse {
1763
violation?: Shared.SafetyViolation;
1864
}
@@ -35,5 +81,9 @@ export interface SafetyRunShieldParams {
3581
}
3682

3783
export declare namespace Safety {
38-
export { type RunShieldResponse as RunShieldResponse, type SafetyRunShieldParams as SafetyRunShieldParams };
84+
export {
85+
type OpenAPIModerationsResponse as OpenAPIModerationsResponse,
86+
type RunShieldResponse as RunShieldResponse,
87+
type SafetyRunShieldParams as SafetyRunShieldParams,
88+
};
3989
}

0 commit comments

Comments
 (0)