@meetkai/mka1 0.55.4 → 0.55.5
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/README.md +360 -360
- package/bin/mcp-server.js +1515 -1146
- package/bin/mcp-server.js.map +15 -9
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.d.ts +19 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.js +132 -0
- package/dist/commonjs/funcs/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.d.ts +19 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.js +133 -0
- package/dist/commonjs/funcs/llmModelsSetOrgTokenQuota.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/server.js +5 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts +14 -14
- package/dist/commonjs/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createchatcompletionstream.js +21 -25
- package/dist/commonjs/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/commonjs/models/operations/getorgtokenquota.d.ts +50 -0
- package/dist/commonjs/models/operations/getorgtokenquota.d.ts.map +1 -0
- package/dist/commonjs/models/operations/getorgtokenquota.js +106 -0
- package/dist/commonjs/models/operations/getorgtokenquota.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listbudgets.d.ts +10 -10
- package/dist/commonjs/models/operations/listbudgets.d.ts.map +1 -1
- package/dist/commonjs/models/operations/listbudgets.js +12 -12
- package/dist/commonjs/models/operations/listbudgets.js.map +1 -1
- package/dist/commonjs/models/operations/setorgtokenquota.d.ts +101 -0
- package/dist/commonjs/models/operations/setorgtokenquota.d.ts.map +1 -0
- package/dist/commonjs/models/operations/setorgtokenquota.js +180 -0
- package/dist/commonjs/models/operations/setorgtokenquota.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +2 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +2 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.d.ts +12 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.js +34 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.core.js.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.d.ts +28 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.js +60 -0
- package/dist/commonjs/react-query/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.d.ts +28 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.js +47 -0
- package/dist/commonjs/react-query/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/commonjs/sdk/models.d.ts +14 -0
- package/dist/commonjs/sdk/models.d.ts.map +1 -1
- package/dist/commonjs/sdk/models.js +20 -0
- package/dist/commonjs/sdk/models.js.map +1 -1
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.d.ts +19 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.js +96 -0
- package/dist/esm/funcs/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.d.ts +19 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.js +97 -0
- package/dist/esm/funcs/llmModelsSetOrgTokenQuota.js.map +1 -0
- 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.d.ts.map +1 -1
- package/dist/esm/mcp-server/server.js +5 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.js +28 -0
- package/dist/esm/mcp-server/tools/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.js +28 -0
- package/dist/esm/mcp-server/tools/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/esm/models/operations/createchatcompletionstream.d.ts +14 -14
- package/dist/esm/models/operations/createchatcompletionstream.d.ts.map +1 -1
- package/dist/esm/models/operations/createchatcompletionstream.js +16 -20
- package/dist/esm/models/operations/createchatcompletionstream.js.map +1 -1
- package/dist/esm/models/operations/getorgtokenquota.d.ts +50 -0
- package/dist/esm/models/operations/getorgtokenquota.d.ts.map +1 -0
- package/dist/esm/models/operations/getorgtokenquota.js +66 -0
- package/dist/esm/models/operations/getorgtokenquota.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listbudgets.d.ts +10 -10
- package/dist/esm/models/operations/listbudgets.d.ts.map +1 -1
- package/dist/esm/models/operations/listbudgets.js +11 -11
- package/dist/esm/models/operations/listbudgets.js.map +1 -1
- package/dist/esm/models/operations/setorgtokenquota.d.ts +101 -0
- package/dist/esm/models/operations/setorgtokenquota.d.ts.map +1 -0
- package/dist/esm/models/operations/setorgtokenquota.js +134 -0
- package/dist/esm/models/operations/setorgtokenquota.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +2 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +2 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.d.ts +12 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.js +29 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.core.js.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.d.ts +28 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.js +50 -0
- package/dist/esm/react-query/llmModelsGetOrgTokenQuota.js.map +1 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.d.ts +28 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.d.ts.map +1 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.js +42 -0
- package/dist/esm/react-query/llmModelsSetOrgTokenQuota.js.map +1 -0
- package/dist/esm/sdk/models.d.ts +14 -0
- package/dist/esm/sdk/models.d.ts.map +1 -1
- package/dist/esm/sdk/models.js +20 -0
- package/dist/esm/sdk/models.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/llmModelsGetOrgTokenQuota.ts +181 -0
- package/src/funcs/llmModelsSetOrgTokenQuota.ts +182 -0
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +5 -1
- package/src/mcp-server/tools/llmModelsGetOrgTokenQuota.ts +37 -0
- package/src/mcp-server/tools/llmModelsSetOrgTokenQuota.ts +37 -0
- package/src/models/operations/createchatcompletionstream.ts +72 -60
- package/src/models/operations/getorgtokenquota.ts +145 -0
- package/src/models/operations/index.ts +2 -0
- package/src/models/operations/listbudgets.ts +20 -20
- package/src/models/operations/setorgtokenquota.ts +287 -0
- package/src/react-query/index.ts +2 -0
- package/src/react-query/llmModelsGetOrgTokenQuota.core.ts +71 -0
- package/src/react-query/llmModelsGetOrgTokenQuota.ts +136 -0
- package/src/react-query/llmModelsSetOrgTokenQuota.ts +109 -0
- package/src/sdk/models.ts +36 -0
|
@@ -0,0 +1,287 @@
|
|
|
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
|
+
export type Two = {
|
|
13
|
+
enabled: false;
|
|
14
|
+
};
|
|
15
|
+
|
|
16
|
+
export const RequestBodyPeriod = {
|
|
17
|
+
Minute: "minute",
|
|
18
|
+
Day: "day",
|
|
19
|
+
Month: "month",
|
|
20
|
+
} as const;
|
|
21
|
+
export type RequestBodyPeriod = ClosedEnum<typeof RequestBodyPeriod>;
|
|
22
|
+
|
|
23
|
+
export type One = {
|
|
24
|
+
limit: number;
|
|
25
|
+
period: RequestBodyPeriod;
|
|
26
|
+
enabled: true;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
export type SetOrgTokenQuotaRequestBody = One | Two;
|
|
30
|
+
|
|
31
|
+
export type SetOrgTokenQuotaRequest = {
|
|
32
|
+
orgId: string;
|
|
33
|
+
requestBody: One | Two;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
export const SetOrgTokenQuotaPeriod = {
|
|
37
|
+
Minute: "minute",
|
|
38
|
+
Day: "day",
|
|
39
|
+
Month: "month",
|
|
40
|
+
} as const;
|
|
41
|
+
export type SetOrgTokenQuotaPeriod = ClosedEnum<typeof SetOrgTokenQuotaPeriod>;
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* OK
|
|
45
|
+
*/
|
|
46
|
+
export type SetOrgTokenQuotaResponseBody = {
|
|
47
|
+
orgId: string;
|
|
48
|
+
enabled: boolean;
|
|
49
|
+
limit: number | null;
|
|
50
|
+
period: SetOrgTokenQuotaPeriod | null;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/** @internal */
|
|
54
|
+
export const Two$inboundSchema: z.ZodType<Two, z.ZodTypeDef, unknown> = z
|
|
55
|
+
.object({
|
|
56
|
+
enabled: z.literal(false),
|
|
57
|
+
});
|
|
58
|
+
/** @internal */
|
|
59
|
+
export type Two$Outbound = {
|
|
60
|
+
enabled: false;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/** @internal */
|
|
64
|
+
export const Two$outboundSchema: z.ZodType<Two$Outbound, z.ZodTypeDef, Two> = z
|
|
65
|
+
.object({
|
|
66
|
+
enabled: z.literal(false),
|
|
67
|
+
});
|
|
68
|
+
|
|
69
|
+
export function twoToJSON(two: Two): string {
|
|
70
|
+
return JSON.stringify(Two$outboundSchema.parse(two));
|
|
71
|
+
}
|
|
72
|
+
export function twoFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<Two, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => Two$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'Two' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** @internal */
|
|
83
|
+
export const RequestBodyPeriod$inboundSchema: z.ZodNativeEnum<
|
|
84
|
+
typeof RequestBodyPeriod
|
|
85
|
+
> = z.nativeEnum(RequestBodyPeriod);
|
|
86
|
+
/** @internal */
|
|
87
|
+
export const RequestBodyPeriod$outboundSchema: z.ZodNativeEnum<
|
|
88
|
+
typeof RequestBodyPeriod
|
|
89
|
+
> = RequestBodyPeriod$inboundSchema;
|
|
90
|
+
|
|
91
|
+
/** @internal */
|
|
92
|
+
export const One$inboundSchema: z.ZodType<One, z.ZodTypeDef, unknown> = z
|
|
93
|
+
.object({
|
|
94
|
+
limit: z.number().int(),
|
|
95
|
+
period: RequestBodyPeriod$inboundSchema,
|
|
96
|
+
enabled: z.literal(true),
|
|
97
|
+
});
|
|
98
|
+
/** @internal */
|
|
99
|
+
export type One$Outbound = {
|
|
100
|
+
limit: number;
|
|
101
|
+
period: string;
|
|
102
|
+
enabled: true;
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/** @internal */
|
|
106
|
+
export const One$outboundSchema: z.ZodType<One$Outbound, z.ZodTypeDef, One> = z
|
|
107
|
+
.object({
|
|
108
|
+
limit: z.number().int(),
|
|
109
|
+
period: RequestBodyPeriod$outboundSchema,
|
|
110
|
+
enabled: z.literal(true),
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
export function oneToJSON(one: One): string {
|
|
114
|
+
return JSON.stringify(One$outboundSchema.parse(one));
|
|
115
|
+
}
|
|
116
|
+
export function oneFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<One, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => One$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'One' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
/** @internal */
|
|
127
|
+
export const SetOrgTokenQuotaRequestBody$inboundSchema: z.ZodType<
|
|
128
|
+
SetOrgTokenQuotaRequestBody,
|
|
129
|
+
z.ZodTypeDef,
|
|
130
|
+
unknown
|
|
131
|
+
> = z.union([z.lazy(() => One$inboundSchema), z.lazy(() => Two$inboundSchema)]);
|
|
132
|
+
/** @internal */
|
|
133
|
+
export type SetOrgTokenQuotaRequestBody$Outbound = One$Outbound | Two$Outbound;
|
|
134
|
+
|
|
135
|
+
/** @internal */
|
|
136
|
+
export const SetOrgTokenQuotaRequestBody$outboundSchema: z.ZodType<
|
|
137
|
+
SetOrgTokenQuotaRequestBody$Outbound,
|
|
138
|
+
z.ZodTypeDef,
|
|
139
|
+
SetOrgTokenQuotaRequestBody
|
|
140
|
+
> = z.union([
|
|
141
|
+
z.lazy(() => One$outboundSchema),
|
|
142
|
+
z.lazy(() => Two$outboundSchema),
|
|
143
|
+
]);
|
|
144
|
+
|
|
145
|
+
export function setOrgTokenQuotaRequestBodyToJSON(
|
|
146
|
+
setOrgTokenQuotaRequestBody: SetOrgTokenQuotaRequestBody,
|
|
147
|
+
): string {
|
|
148
|
+
return JSON.stringify(
|
|
149
|
+
SetOrgTokenQuotaRequestBody$outboundSchema.parse(
|
|
150
|
+
setOrgTokenQuotaRequestBody,
|
|
151
|
+
),
|
|
152
|
+
);
|
|
153
|
+
}
|
|
154
|
+
export function setOrgTokenQuotaRequestBodyFromJSON(
|
|
155
|
+
jsonString: string,
|
|
156
|
+
): SafeParseResult<SetOrgTokenQuotaRequestBody, SDKValidationError> {
|
|
157
|
+
return safeParse(
|
|
158
|
+
jsonString,
|
|
159
|
+
(x) => SetOrgTokenQuotaRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
160
|
+
`Failed to parse 'SetOrgTokenQuotaRequestBody' from JSON`,
|
|
161
|
+
);
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
/** @internal */
|
|
165
|
+
export const SetOrgTokenQuotaRequest$inboundSchema: z.ZodType<
|
|
166
|
+
SetOrgTokenQuotaRequest,
|
|
167
|
+
z.ZodTypeDef,
|
|
168
|
+
unknown
|
|
169
|
+
> = z.object({
|
|
170
|
+
org_id: z.string(),
|
|
171
|
+
RequestBody: z.union([
|
|
172
|
+
z.lazy(() => One$inboundSchema),
|
|
173
|
+
z.lazy(() => Two$inboundSchema),
|
|
174
|
+
]),
|
|
175
|
+
}).transform((v) => {
|
|
176
|
+
return remap$(v, {
|
|
177
|
+
"org_id": "orgId",
|
|
178
|
+
"RequestBody": "requestBody",
|
|
179
|
+
});
|
|
180
|
+
});
|
|
181
|
+
/** @internal */
|
|
182
|
+
export type SetOrgTokenQuotaRequest$Outbound = {
|
|
183
|
+
org_id: string;
|
|
184
|
+
RequestBody: One$Outbound | Two$Outbound;
|
|
185
|
+
};
|
|
186
|
+
|
|
187
|
+
/** @internal */
|
|
188
|
+
export const SetOrgTokenQuotaRequest$outboundSchema: z.ZodType<
|
|
189
|
+
SetOrgTokenQuotaRequest$Outbound,
|
|
190
|
+
z.ZodTypeDef,
|
|
191
|
+
SetOrgTokenQuotaRequest
|
|
192
|
+
> = z.object({
|
|
193
|
+
orgId: z.string(),
|
|
194
|
+
requestBody: z.union([
|
|
195
|
+
z.lazy(() => One$outboundSchema),
|
|
196
|
+
z.lazy(() => Two$outboundSchema),
|
|
197
|
+
]),
|
|
198
|
+
}).transform((v) => {
|
|
199
|
+
return remap$(v, {
|
|
200
|
+
orgId: "org_id",
|
|
201
|
+
requestBody: "RequestBody",
|
|
202
|
+
});
|
|
203
|
+
});
|
|
204
|
+
|
|
205
|
+
export function setOrgTokenQuotaRequestToJSON(
|
|
206
|
+
setOrgTokenQuotaRequest: SetOrgTokenQuotaRequest,
|
|
207
|
+
): string {
|
|
208
|
+
return JSON.stringify(
|
|
209
|
+
SetOrgTokenQuotaRequest$outboundSchema.parse(setOrgTokenQuotaRequest),
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
export function setOrgTokenQuotaRequestFromJSON(
|
|
213
|
+
jsonString: string,
|
|
214
|
+
): SafeParseResult<SetOrgTokenQuotaRequest, SDKValidationError> {
|
|
215
|
+
return safeParse(
|
|
216
|
+
jsonString,
|
|
217
|
+
(x) => SetOrgTokenQuotaRequest$inboundSchema.parse(JSON.parse(x)),
|
|
218
|
+
`Failed to parse 'SetOrgTokenQuotaRequest' from JSON`,
|
|
219
|
+
);
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
/** @internal */
|
|
223
|
+
export const SetOrgTokenQuotaPeriod$inboundSchema: z.ZodNativeEnum<
|
|
224
|
+
typeof SetOrgTokenQuotaPeriod
|
|
225
|
+
> = z.nativeEnum(SetOrgTokenQuotaPeriod);
|
|
226
|
+
/** @internal */
|
|
227
|
+
export const SetOrgTokenQuotaPeriod$outboundSchema: z.ZodNativeEnum<
|
|
228
|
+
typeof SetOrgTokenQuotaPeriod
|
|
229
|
+
> = SetOrgTokenQuotaPeriod$inboundSchema;
|
|
230
|
+
|
|
231
|
+
/** @internal */
|
|
232
|
+
export const SetOrgTokenQuotaResponseBody$inboundSchema: z.ZodType<
|
|
233
|
+
SetOrgTokenQuotaResponseBody,
|
|
234
|
+
z.ZodTypeDef,
|
|
235
|
+
unknown
|
|
236
|
+
> = z.object({
|
|
237
|
+
org_id: z.string(),
|
|
238
|
+
enabled: z.boolean(),
|
|
239
|
+
limit: z.nullable(z.number().int()),
|
|
240
|
+
period: z.nullable(SetOrgTokenQuotaPeriod$inboundSchema),
|
|
241
|
+
}).transform((v) => {
|
|
242
|
+
return remap$(v, {
|
|
243
|
+
"org_id": "orgId",
|
|
244
|
+
});
|
|
245
|
+
});
|
|
246
|
+
/** @internal */
|
|
247
|
+
export type SetOrgTokenQuotaResponseBody$Outbound = {
|
|
248
|
+
org_id: string;
|
|
249
|
+
enabled: boolean;
|
|
250
|
+
limit: number | null;
|
|
251
|
+
period: string | null;
|
|
252
|
+
};
|
|
253
|
+
|
|
254
|
+
/** @internal */
|
|
255
|
+
export const SetOrgTokenQuotaResponseBody$outboundSchema: z.ZodType<
|
|
256
|
+
SetOrgTokenQuotaResponseBody$Outbound,
|
|
257
|
+
z.ZodTypeDef,
|
|
258
|
+
SetOrgTokenQuotaResponseBody
|
|
259
|
+
> = z.object({
|
|
260
|
+
orgId: z.string(),
|
|
261
|
+
enabled: z.boolean(),
|
|
262
|
+
limit: z.nullable(z.number().int()),
|
|
263
|
+
period: z.nullable(SetOrgTokenQuotaPeriod$outboundSchema),
|
|
264
|
+
}).transform((v) => {
|
|
265
|
+
return remap$(v, {
|
|
266
|
+
orgId: "org_id",
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
|
|
270
|
+
export function setOrgTokenQuotaResponseBodyToJSON(
|
|
271
|
+
setOrgTokenQuotaResponseBody: SetOrgTokenQuotaResponseBody,
|
|
272
|
+
): string {
|
|
273
|
+
return JSON.stringify(
|
|
274
|
+
SetOrgTokenQuotaResponseBody$outboundSchema.parse(
|
|
275
|
+
setOrgTokenQuotaResponseBody,
|
|
276
|
+
),
|
|
277
|
+
);
|
|
278
|
+
}
|
|
279
|
+
export function setOrgTokenQuotaResponseBodyFromJSON(
|
|
280
|
+
jsonString: string,
|
|
281
|
+
): SafeParseResult<SetOrgTokenQuotaResponseBody, SDKValidationError> {
|
|
282
|
+
return safeParse(
|
|
283
|
+
jsonString,
|
|
284
|
+
(x) => SetOrgTokenQuotaResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
285
|
+
`Failed to parse 'SetOrgTokenQuotaResponseBody' from JSON`,
|
|
286
|
+
);
|
|
287
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -338,6 +338,7 @@ export * from "./llmModelsDeleteCatalogEntry.js";
|
|
|
338
338
|
export * from "./llmModelsDeleteOrgAutoModel.js";
|
|
339
339
|
export * from "./llmModelsGet.js";
|
|
340
340
|
export * from "./llmModelsGetClusterCurrency.js";
|
|
341
|
+
export * from "./llmModelsGetOrgTokenQuota.js";
|
|
341
342
|
export * from "./llmModelsGetQuota.js";
|
|
342
343
|
export * from "./llmModelsList.js";
|
|
343
344
|
export * from "./llmModelsListCatalog.js";
|
|
@@ -353,6 +354,7 @@ export * from "./llmModelsReplaceCatalogOrgAccess.js";
|
|
|
353
354
|
export * from "./llmModelsSetClusterCurrency.js";
|
|
354
355
|
export * from "./llmModelsSetClusterPrice.js";
|
|
355
356
|
export * from "./llmModelsSetOrgPrice.js";
|
|
357
|
+
export * from "./llmModelsSetOrgTokenQuota.js";
|
|
356
358
|
export * from "./llmModelsUpdateCatalogEntry.js";
|
|
357
359
|
export * from "./llmPromptsCreate.js";
|
|
358
360
|
export * from "./llmPromptsCreateVersion.js";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
QueryClient,
|
|
7
|
+
QueryFunctionContext,
|
|
8
|
+
QueryKey,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { llmModelsGetOrgTokenQuota } from "../funcs/llmModelsGetOrgTokenQuota.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as operations from "../models/operations/index.js";
|
|
15
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
16
|
+
export type LlmModelsGetOrgTokenQuotaQueryData =
|
|
17
|
+
operations.GetOrgTokenQuotaResponseBody;
|
|
18
|
+
|
|
19
|
+
export function prefetchLlmModelsGetOrgTokenQuota(
|
|
20
|
+
queryClient: QueryClient,
|
|
21
|
+
client$: SDKCore,
|
|
22
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
23
|
+
options?: RequestOptions,
|
|
24
|
+
): Promise<void> {
|
|
25
|
+
return queryClient.prefetchQuery({
|
|
26
|
+
...buildLlmModelsGetOrgTokenQuotaQuery(
|
|
27
|
+
client$,
|
|
28
|
+
request,
|
|
29
|
+
options,
|
|
30
|
+
),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export function buildLlmModelsGetOrgTokenQuotaQuery(
|
|
35
|
+
client$: SDKCore,
|
|
36
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): {
|
|
39
|
+
queryKey: QueryKey;
|
|
40
|
+
queryFn: (
|
|
41
|
+
context: QueryFunctionContext,
|
|
42
|
+
) => Promise<LlmModelsGetOrgTokenQuotaQueryData>;
|
|
43
|
+
} {
|
|
44
|
+
return {
|
|
45
|
+
queryKey: queryKeyLlmModelsGetOrgTokenQuota(request.orgId),
|
|
46
|
+
queryFn: async function llmModelsGetOrgTokenQuotaQueryFn(
|
|
47
|
+
ctx,
|
|
48
|
+
): Promise<LlmModelsGetOrgTokenQuotaQueryData> {
|
|
49
|
+
const sig = combineSignals(
|
|
50
|
+
ctx.signal,
|
|
51
|
+
options?.signal,
|
|
52
|
+
options?.fetchOptions?.signal,
|
|
53
|
+
);
|
|
54
|
+
const mergedOptions = {
|
|
55
|
+
...options?.fetchOptions,
|
|
56
|
+
...options,
|
|
57
|
+
signal: sig,
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
return unwrapAsync(llmModelsGetOrgTokenQuota(
|
|
61
|
+
client$,
|
|
62
|
+
request,
|
|
63
|
+
mergedOptions,
|
|
64
|
+
));
|
|
65
|
+
},
|
|
66
|
+
};
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function queryKeyLlmModelsGetOrgTokenQuota(orgId: string): QueryKey {
|
|
70
|
+
return ["@meetkai/mka1", "models", "getOrgTokenQuota", orgId];
|
|
71
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
InvalidateQueryFilters,
|
|
7
|
+
QueryClient,
|
|
8
|
+
useQuery,
|
|
9
|
+
UseQueryResult,
|
|
10
|
+
useSuspenseQuery,
|
|
11
|
+
UseSuspenseQueryResult,
|
|
12
|
+
} from "@tanstack/react-query";
|
|
13
|
+
import {
|
|
14
|
+
ConnectionError,
|
|
15
|
+
InvalidRequestError,
|
|
16
|
+
RequestAbortedError,
|
|
17
|
+
RequestTimeoutError,
|
|
18
|
+
UnexpectedClientError,
|
|
19
|
+
} from "../models/errors/httpclienterrors.js";
|
|
20
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
21
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
22
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
+
import * as operations from "../models/operations/index.js";
|
|
24
|
+
import { useSDKContext } from "./_context.js";
|
|
25
|
+
import {
|
|
26
|
+
QueryHookOptions,
|
|
27
|
+
SuspenseQueryHookOptions,
|
|
28
|
+
TupleToPrefixes,
|
|
29
|
+
} from "./_types.js";
|
|
30
|
+
import {
|
|
31
|
+
buildLlmModelsGetOrgTokenQuotaQuery,
|
|
32
|
+
LlmModelsGetOrgTokenQuotaQueryData,
|
|
33
|
+
prefetchLlmModelsGetOrgTokenQuota,
|
|
34
|
+
queryKeyLlmModelsGetOrgTokenQuota,
|
|
35
|
+
} from "./llmModelsGetOrgTokenQuota.core.js";
|
|
36
|
+
export {
|
|
37
|
+
buildLlmModelsGetOrgTokenQuotaQuery,
|
|
38
|
+
type LlmModelsGetOrgTokenQuotaQueryData,
|
|
39
|
+
prefetchLlmModelsGetOrgTokenQuota,
|
|
40
|
+
queryKeyLlmModelsGetOrgTokenQuota,
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
export type LlmModelsGetOrgTokenQuotaQueryError =
|
|
44
|
+
| SDKError
|
|
45
|
+
| ResponseValidationError
|
|
46
|
+
| ConnectionError
|
|
47
|
+
| RequestAbortedError
|
|
48
|
+
| RequestTimeoutError
|
|
49
|
+
| InvalidRequestError
|
|
50
|
+
| UnexpectedClientError
|
|
51
|
+
| SDKValidationError;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get an organization's token quota
|
|
55
|
+
*
|
|
56
|
+
* @remarks
|
|
57
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
58
|
+
*/
|
|
59
|
+
export function useLlmModelsGetOrgTokenQuota(
|
|
60
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
61
|
+
options?: QueryHookOptions<
|
|
62
|
+
LlmModelsGetOrgTokenQuotaQueryData,
|
|
63
|
+
LlmModelsGetOrgTokenQuotaQueryError
|
|
64
|
+
>,
|
|
65
|
+
): UseQueryResult<
|
|
66
|
+
LlmModelsGetOrgTokenQuotaQueryData,
|
|
67
|
+
LlmModelsGetOrgTokenQuotaQueryError
|
|
68
|
+
> {
|
|
69
|
+
const client = useSDKContext();
|
|
70
|
+
return useQuery({
|
|
71
|
+
...buildLlmModelsGetOrgTokenQuotaQuery(
|
|
72
|
+
client,
|
|
73
|
+
request,
|
|
74
|
+
options,
|
|
75
|
+
),
|
|
76
|
+
...options,
|
|
77
|
+
});
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* Get an organization's token quota
|
|
82
|
+
*
|
|
83
|
+
* @remarks
|
|
84
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
85
|
+
*/
|
|
86
|
+
export function useLlmModelsGetOrgTokenQuotaSuspense(
|
|
87
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
88
|
+
options?: SuspenseQueryHookOptions<
|
|
89
|
+
LlmModelsGetOrgTokenQuotaQueryData,
|
|
90
|
+
LlmModelsGetOrgTokenQuotaQueryError
|
|
91
|
+
>,
|
|
92
|
+
): UseSuspenseQueryResult<
|
|
93
|
+
LlmModelsGetOrgTokenQuotaQueryData,
|
|
94
|
+
LlmModelsGetOrgTokenQuotaQueryError
|
|
95
|
+
> {
|
|
96
|
+
const client = useSDKContext();
|
|
97
|
+
return useSuspenseQuery({
|
|
98
|
+
...buildLlmModelsGetOrgTokenQuotaQuery(
|
|
99
|
+
client,
|
|
100
|
+
request,
|
|
101
|
+
options,
|
|
102
|
+
),
|
|
103
|
+
...options,
|
|
104
|
+
});
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export function setLlmModelsGetOrgTokenQuotaData(
|
|
108
|
+
client: QueryClient,
|
|
109
|
+
queryKeyBase: [orgId: string],
|
|
110
|
+
data: LlmModelsGetOrgTokenQuotaQueryData,
|
|
111
|
+
): LlmModelsGetOrgTokenQuotaQueryData | undefined {
|
|
112
|
+
const key = queryKeyLlmModelsGetOrgTokenQuota(...queryKeyBase);
|
|
113
|
+
|
|
114
|
+
return client.setQueryData<LlmModelsGetOrgTokenQuotaQueryData>(key, data);
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export function invalidateLlmModelsGetOrgTokenQuota(
|
|
118
|
+
client: QueryClient,
|
|
119
|
+
queryKeyBase: TupleToPrefixes<[orgId: string]>,
|
|
120
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
121
|
+
): Promise<void> {
|
|
122
|
+
return client.invalidateQueries({
|
|
123
|
+
...filters,
|
|
124
|
+
queryKey: ["@meetkai/mka1", "models", "getOrgTokenQuota", ...queryKeyBase],
|
|
125
|
+
});
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
export function invalidateAllLlmModelsGetOrgTokenQuota(
|
|
129
|
+
client: QueryClient,
|
|
130
|
+
filters?: Omit<InvalidateQueryFilters, "queryKey" | "predicate" | "exact">,
|
|
131
|
+
): Promise<void> {
|
|
132
|
+
return client.invalidateQueries({
|
|
133
|
+
...filters,
|
|
134
|
+
queryKey: ["@meetkai/mka1", "models", "getOrgTokenQuota"],
|
|
135
|
+
});
|
|
136
|
+
}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
MutationKey,
|
|
7
|
+
useMutation,
|
|
8
|
+
UseMutationResult,
|
|
9
|
+
} from "@tanstack/react-query";
|
|
10
|
+
import { SDKCore } from "../core.js";
|
|
11
|
+
import { llmModelsSetOrgTokenQuota } from "../funcs/llmModelsSetOrgTokenQuota.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import {
|
|
15
|
+
ConnectionError,
|
|
16
|
+
InvalidRequestError,
|
|
17
|
+
RequestAbortedError,
|
|
18
|
+
RequestTimeoutError,
|
|
19
|
+
UnexpectedClientError,
|
|
20
|
+
} from "../models/errors/httpclienterrors.js";
|
|
21
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
23
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
24
|
+
import * as operations from "../models/operations/index.js";
|
|
25
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
26
|
+
import { useSDKContext } from "./_context.js";
|
|
27
|
+
import { MutationHookOptions } from "./_types.js";
|
|
28
|
+
|
|
29
|
+
export type LlmModelsSetOrgTokenQuotaMutationVariables = {
|
|
30
|
+
request: operations.SetOrgTokenQuotaRequest;
|
|
31
|
+
options?: RequestOptions;
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export type LlmModelsSetOrgTokenQuotaMutationData =
|
|
35
|
+
operations.SetOrgTokenQuotaResponseBody;
|
|
36
|
+
|
|
37
|
+
export type LlmModelsSetOrgTokenQuotaMutationError =
|
|
38
|
+
| SDKError
|
|
39
|
+
| ResponseValidationError
|
|
40
|
+
| ConnectionError
|
|
41
|
+
| RequestAbortedError
|
|
42
|
+
| RequestTimeoutError
|
|
43
|
+
| InvalidRequestError
|
|
44
|
+
| UnexpectedClientError
|
|
45
|
+
| SDKValidationError;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Set an organization's token quota
|
|
49
|
+
*
|
|
50
|
+
* @remarks
|
|
51
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
52
|
+
*/
|
|
53
|
+
export function useLlmModelsSetOrgTokenQuotaMutation(
|
|
54
|
+
options?: MutationHookOptions<
|
|
55
|
+
LlmModelsSetOrgTokenQuotaMutationData,
|
|
56
|
+
LlmModelsSetOrgTokenQuotaMutationError,
|
|
57
|
+
LlmModelsSetOrgTokenQuotaMutationVariables
|
|
58
|
+
>,
|
|
59
|
+
): UseMutationResult<
|
|
60
|
+
LlmModelsSetOrgTokenQuotaMutationData,
|
|
61
|
+
LlmModelsSetOrgTokenQuotaMutationError,
|
|
62
|
+
LlmModelsSetOrgTokenQuotaMutationVariables
|
|
63
|
+
> {
|
|
64
|
+
const client = useSDKContext();
|
|
65
|
+
return useMutation({
|
|
66
|
+
...buildLlmModelsSetOrgTokenQuotaMutation(client, options),
|
|
67
|
+
...options,
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
export function mutationKeyLlmModelsSetOrgTokenQuota(): MutationKey {
|
|
72
|
+
return ["@meetkai/mka1", "models", "setOrgTokenQuota"];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function buildLlmModelsSetOrgTokenQuotaMutation(
|
|
76
|
+
client$: SDKCore,
|
|
77
|
+
hookOptions?: RequestOptions,
|
|
78
|
+
): {
|
|
79
|
+
mutationKey: MutationKey;
|
|
80
|
+
mutationFn: (
|
|
81
|
+
variables: LlmModelsSetOrgTokenQuotaMutationVariables,
|
|
82
|
+
) => Promise<LlmModelsSetOrgTokenQuotaMutationData>;
|
|
83
|
+
} {
|
|
84
|
+
return {
|
|
85
|
+
mutationKey: mutationKeyLlmModelsSetOrgTokenQuota(),
|
|
86
|
+
mutationFn: function llmModelsSetOrgTokenQuotaMutationFn({
|
|
87
|
+
request,
|
|
88
|
+
options,
|
|
89
|
+
}): Promise<LlmModelsSetOrgTokenQuotaMutationData> {
|
|
90
|
+
const mergedOptions = {
|
|
91
|
+
...hookOptions,
|
|
92
|
+
...options,
|
|
93
|
+
fetchOptions: {
|
|
94
|
+
...hookOptions?.fetchOptions,
|
|
95
|
+
...options?.fetchOptions,
|
|
96
|
+
signal: combineSignals(
|
|
97
|
+
hookOptions?.fetchOptions?.signal,
|
|
98
|
+
options?.fetchOptions?.signal,
|
|
99
|
+
),
|
|
100
|
+
},
|
|
101
|
+
};
|
|
102
|
+
return unwrapAsync(llmModelsSetOrgTokenQuota(
|
|
103
|
+
client$,
|
|
104
|
+
request,
|
|
105
|
+
mergedOptions,
|
|
106
|
+
));
|
|
107
|
+
},
|
|
108
|
+
};
|
|
109
|
+
}
|
package/src/sdk/models.ts
CHANGED
|
@@ -13,6 +13,7 @@ import { llmModelsDeleteCatalogEntry } from "../funcs/llmModelsDeleteCatalogEntr
|
|
|
13
13
|
import { llmModelsDeleteOrgAutoModel } from "../funcs/llmModelsDeleteOrgAutoModel.js";
|
|
14
14
|
import { llmModelsGet } from "../funcs/llmModelsGet.js";
|
|
15
15
|
import { llmModelsGetClusterCurrency } from "../funcs/llmModelsGetClusterCurrency.js";
|
|
16
|
+
import { llmModelsGetOrgTokenQuota } from "../funcs/llmModelsGetOrgTokenQuota.js";
|
|
16
17
|
import { llmModelsGetQuota } from "../funcs/llmModelsGetQuota.js";
|
|
17
18
|
import { llmModelsList } from "../funcs/llmModelsList.js";
|
|
18
19
|
import { llmModelsListCatalog } from "../funcs/llmModelsListCatalog.js";
|
|
@@ -28,6 +29,7 @@ import { llmModelsReplaceCatalogOrgAccess } from "../funcs/llmModelsReplaceCatal
|
|
|
28
29
|
import { llmModelsSetClusterCurrency } from "../funcs/llmModelsSetClusterCurrency.js";
|
|
29
30
|
import { llmModelsSetClusterPrice } from "../funcs/llmModelsSetClusterPrice.js";
|
|
30
31
|
import { llmModelsSetOrgPrice } from "../funcs/llmModelsSetOrgPrice.js";
|
|
32
|
+
import { llmModelsSetOrgTokenQuota } from "../funcs/llmModelsSetOrgTokenQuota.js";
|
|
31
33
|
import { llmModelsUpdateCatalogEntry } from "../funcs/llmModelsUpdateCatalogEntry.js";
|
|
32
34
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
33
35
|
import * as components from "../models/components/index.js";
|
|
@@ -86,6 +88,40 @@ export class Models extends ClientSDK {
|
|
|
86
88
|
));
|
|
87
89
|
}
|
|
88
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Get an organization's token quota
|
|
93
|
+
*
|
|
94
|
+
* @remarks
|
|
95
|
+
* Cluster-admin read of the aggregate token policy across all models. An absent or disabled quota returns enabled: false with null limit and period. Does not require a model or change the active organization.
|
|
96
|
+
*/
|
|
97
|
+
async getOrgTokenQuota(
|
|
98
|
+
request: operations.GetOrgTokenQuotaRequest,
|
|
99
|
+
options?: RequestOptions,
|
|
100
|
+
): Promise<operations.GetOrgTokenQuotaResponseBody> {
|
|
101
|
+
return unwrapAsync(llmModelsGetOrgTokenQuota(
|
|
102
|
+
this,
|
|
103
|
+
request,
|
|
104
|
+
options,
|
|
105
|
+
));
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* Set an organization's token quota
|
|
110
|
+
*
|
|
111
|
+
* @remarks
|
|
112
|
+
* Cluster admins may create or replace the minute/day/month token allowance, or disable it with enabled: false. Changes apply to new admissions within 10 seconds; admitted requests finish. Limit changes preserve usage. Period changes use that period's calendar bucket; usage while disabled is not counted. The cluster organization cannot be capped.
|
|
113
|
+
*/
|
|
114
|
+
async setOrgTokenQuota(
|
|
115
|
+
request: operations.SetOrgTokenQuotaRequest,
|
|
116
|
+
options?: RequestOptions,
|
|
117
|
+
): Promise<operations.SetOrgTokenQuotaResponseBody> {
|
|
118
|
+
return unwrapAsync(llmModelsSetOrgTokenQuota(
|
|
119
|
+
this,
|
|
120
|
+
request,
|
|
121
|
+
options,
|
|
122
|
+
));
|
|
123
|
+
}
|
|
124
|
+
|
|
89
125
|
/**
|
|
90
126
|
* List the organization's model catalog
|
|
91
127
|
*
|