@meetkai/mka1 0.54.71 → 0.54.73
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 +307 -304
- package/bin/mcp-server.js +1691 -1486
- package/bin/mcp-server.js.map +23 -18
- package/dist/commonjs/funcs/llmEvalsMeasureSuiteTokens.d.ts +20 -0
- package/dist/commonjs/funcs/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmEvalsMeasureSuiteTokens.js +137 -0
- package/dist/commonjs/funcs/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/commonjs/funcs/reposCreate.d.ts +5 -5
- package/dist/commonjs/funcs/reposCreate.js +5 -5
- package/dist/commonjs/funcs/reposDelete.d.ts +2 -2
- package/dist/commonjs/funcs/reposDelete.js +2 -2
- package/dist/commonjs/funcs/reposList.d.ts +1 -1
- package/dist/commonjs/funcs/reposList.js +1 -1
- package/dist/commonjs/funcs/reposUpdate.d.ts +3 -3
- package/dist/commonjs/funcs/reposUpdate.js +3 -3
- 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 +3 -1
- package/dist/commonjs/mcp-server/server.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmEvalsMeasureSuiteTokens.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmEvalsMeasureSuiteTokens.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/reposCreate.js +5 -5
- package/dist/commonjs/mcp-server/tools/reposDelete.js +2 -2
- package/dist/commonjs/mcp-server/tools/reposList.js +1 -1
- package/dist/commonjs/mcp-server/tools/reposUpdate.js +3 -3
- package/dist/commonjs/models/components/evalsampleobject.d.ts +5 -0
- package/dist/commonjs/models/components/evalsampleobject.d.ts.map +1 -1
- package/dist/commonjs/models/components/evalsampleobject.js +4 -0
- package/dist/commonjs/models/components/evalsampleobject.js.map +1 -1
- package/dist/commonjs/models/components/evalsuitetokenmeasurement.d.ts +34 -0
- package/dist/commonjs/models/components/evalsuitetokenmeasurement.d.ts.map +1 -0
- package/dist/commonjs/models/components/evalsuitetokenmeasurement.js +81 -0
- package/dist/commonjs/models/components/evalsuitetokenmeasurement.js.map +1 -0
- 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/measureevalsuitetokensbody.d.ts +20 -0
- package/dist/commonjs/models/components/measureevalsuitetokensbody.d.ts.map +1 -0
- package/dist/commonjs/models/components/measureevalsuitetokensbody.js +58 -0
- package/dist/commonjs/models/components/measureevalsuitetokensbody.js.map +1 -0
- package/dist/commonjs/models/components/repo.d.ts +1 -1
- package/dist/commonjs/models/operations/index.d.ts +1 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +1 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/measureevalsuitetokens.d.ts +25 -0
- package/dist/commonjs/models/operations/measureevalsuitetokens.d.ts.map +1 -0
- package/dist/commonjs/models/operations/measureevalsuitetokens.js +76 -0
- package/dist/commonjs/models/operations/measureevalsuitetokens.js.map +1 -0
- package/dist/commonjs/react-query/index.d.ts +1 -0
- package/dist/commonjs/react-query/index.d.ts.map +1 -1
- package/dist/commonjs/react-query/index.js +1 -0
- package/dist/commonjs/react-query/index.js.map +1 -1
- package/dist/commonjs/react-query/llmEvalsMeasureSuiteTokens.d.ts +29 -0
- package/dist/commonjs/react-query/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmEvalsMeasureSuiteTokens.js +47 -0
- package/dist/commonjs/react-query/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/commonjs/react-query/reposCreate.d.ts +5 -5
- package/dist/commonjs/react-query/reposCreate.js +5 -5
- package/dist/commonjs/react-query/reposDelete.d.ts +2 -2
- package/dist/commonjs/react-query/reposDelete.js +2 -2
- package/dist/commonjs/react-query/reposList.d.ts +2 -2
- package/dist/commonjs/react-query/reposList.js +2 -2
- package/dist/commonjs/react-query/reposUpdate.d.ts +3 -3
- package/dist/commonjs/react-query/reposUpdate.js +3 -3
- package/dist/commonjs/sdk/evals.d.ts +7 -0
- package/dist/commonjs/sdk/evals.d.ts.map +1 -1
- package/dist/commonjs/sdk/evals.js +10 -0
- package/dist/commonjs/sdk/evals.js.map +1 -1
- package/dist/commonjs/sdk/repos.d.ts +11 -11
- package/dist/commonjs/sdk/repos.js +11 -11
- package/dist/esm/funcs/llmEvalsMeasureSuiteTokens.d.ts +20 -0
- package/dist/esm/funcs/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/esm/funcs/llmEvalsMeasureSuiteTokens.js +101 -0
- package/dist/esm/funcs/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/esm/funcs/reposCreate.d.ts +5 -5
- package/dist/esm/funcs/reposCreate.js +5 -5
- package/dist/esm/funcs/reposDelete.d.ts +2 -2
- package/dist/esm/funcs/reposDelete.js +2 -2
- package/dist/esm/funcs/reposList.d.ts +1 -1
- package/dist/esm/funcs/reposList.js +1 -1
- package/dist/esm/funcs/reposUpdate.d.ts +3 -3
- package/dist/esm/funcs/reposUpdate.js +3 -3
- 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 +3 -1
- package/dist/esm/mcp-server/server.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmEvalsMeasureSuiteTokens.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmEvalsMeasureSuiteTokens.js +28 -0
- package/dist/esm/mcp-server/tools/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/esm/mcp-server/tools/reposCreate.js +5 -5
- package/dist/esm/mcp-server/tools/reposDelete.js +2 -2
- package/dist/esm/mcp-server/tools/reposList.js +1 -1
- package/dist/esm/mcp-server/tools/reposUpdate.js +3 -3
- package/dist/esm/models/components/evalsampleobject.d.ts +5 -0
- package/dist/esm/models/components/evalsampleobject.d.ts.map +1 -1
- package/dist/esm/models/components/evalsampleobject.js +4 -0
- package/dist/esm/models/components/evalsampleobject.js.map +1 -1
- package/dist/esm/models/components/evalsuitetokenmeasurement.d.ts +34 -0
- package/dist/esm/models/components/evalsuitetokenmeasurement.d.ts.map +1 -0
- package/dist/esm/models/components/evalsuitetokenmeasurement.js +43 -0
- package/dist/esm/models/components/evalsuitetokenmeasurement.js.map +1 -0
- 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/measureevalsuitetokensbody.d.ts +20 -0
- package/dist/esm/models/components/measureevalsuitetokensbody.d.ts.map +1 -0
- package/dist/esm/models/components/measureevalsuitetokensbody.js +20 -0
- package/dist/esm/models/components/measureevalsuitetokensbody.js.map +1 -0
- package/dist/esm/models/components/repo.d.ts +1 -1
- package/dist/esm/models/operations/index.d.ts +1 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +1 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/measureevalsuitetokens.d.ts +25 -0
- package/dist/esm/models/operations/measureevalsuitetokens.d.ts.map +1 -0
- package/dist/esm/models/operations/measureevalsuitetokens.js +38 -0
- package/dist/esm/models/operations/measureevalsuitetokens.js.map +1 -0
- package/dist/esm/react-query/index.d.ts +1 -0
- package/dist/esm/react-query/index.d.ts.map +1 -1
- package/dist/esm/react-query/index.js +1 -0
- package/dist/esm/react-query/index.js.map +1 -1
- package/dist/esm/react-query/llmEvalsMeasureSuiteTokens.d.ts +29 -0
- package/dist/esm/react-query/llmEvalsMeasureSuiteTokens.d.ts.map +1 -0
- package/dist/esm/react-query/llmEvalsMeasureSuiteTokens.js +42 -0
- package/dist/esm/react-query/llmEvalsMeasureSuiteTokens.js.map +1 -0
- package/dist/esm/react-query/reposCreate.d.ts +5 -5
- package/dist/esm/react-query/reposCreate.js +5 -5
- package/dist/esm/react-query/reposDelete.d.ts +2 -2
- package/dist/esm/react-query/reposDelete.js +2 -2
- package/dist/esm/react-query/reposList.d.ts +2 -2
- package/dist/esm/react-query/reposList.js +2 -2
- package/dist/esm/react-query/reposUpdate.d.ts +3 -3
- package/dist/esm/react-query/reposUpdate.js +3 -3
- package/dist/esm/sdk/evals.d.ts +7 -0
- package/dist/esm/sdk/evals.d.ts.map +1 -1
- package/dist/esm/sdk/evals.js +10 -0
- package/dist/esm/sdk/evals.js.map +1 -1
- package/dist/esm/sdk/repos.d.ts +11 -11
- package/dist/esm/sdk/repos.js +11 -11
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/llmEvalsMeasureSuiteTokens.ts +191 -0
- package/src/funcs/reposCreate.ts +5 -5
- package/src/funcs/reposDelete.ts +2 -2
- package/src/funcs/reposList.ts +1 -1
- package/src/funcs/reposUpdate.ts +3 -3
- package/src/lib/config.ts +2 -2
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +3 -1
- package/src/mcp-server/tools/llmEvalsMeasureSuiteTokens.ts +37 -0
- package/src/mcp-server/tools/reposCreate.ts +5 -5
- package/src/mcp-server/tools/reposDelete.ts +2 -2
- package/src/mcp-server/tools/reposList.ts +1 -1
- package/src/mcp-server/tools/reposUpdate.ts +3 -3
- package/src/models/components/evalsampleobject.ts +9 -0
- package/src/models/components/evalsuitetokenmeasurement.ts +91 -0
- package/src/models/components/index.ts +2 -0
- package/src/models/components/measureevalsuitetokensbody.ts +54 -0
- package/src/models/components/repo.ts +1 -1
- package/src/models/operations/index.ts +1 -0
- package/src/models/operations/measureevalsuitetokens.ts +80 -0
- package/src/react-query/index.ts +1 -0
- package/src/react-query/llmEvalsMeasureSuiteTokens.ts +110 -0
- package/src/react-query/reposCreate.ts +5 -5
- package/src/react-query/reposDelete.ts +2 -2
- package/src/react-query/reposList.ts +2 -2
- package/src/react-query/reposUpdate.ts +3 -3
- package/src/sdk/evals.ts +18 -0
- package/src/sdk/repos.ts +11 -11
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
|
|
11
|
+
export type EvalSuiteTokenMeasurement = {
|
|
12
|
+
object: "eval.suite.token_measurement";
|
|
13
|
+
suiteId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Runs whose samples were counted in this call.
|
|
16
|
+
*/
|
|
17
|
+
measuredRuns: number;
|
|
18
|
+
/**
|
|
19
|
+
* Samples that gained token figures in this call.
|
|
20
|
+
*/
|
|
21
|
+
measuredSamples: number;
|
|
22
|
+
/**
|
|
23
|
+
* Runs of the suite that still have samples with text but no token figure, after this call.
|
|
24
|
+
*/
|
|
25
|
+
remainingRuns: number;
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
/** @internal */
|
|
29
|
+
export const EvalSuiteTokenMeasurement$inboundSchema: z.ZodType<
|
|
30
|
+
EvalSuiteTokenMeasurement,
|
|
31
|
+
z.ZodTypeDef,
|
|
32
|
+
unknown
|
|
33
|
+
> = z.object({
|
|
34
|
+
object: z.literal("eval.suite.token_measurement"),
|
|
35
|
+
suite_id: z.string(),
|
|
36
|
+
measured_runs: z.number().int(),
|
|
37
|
+
measured_samples: z.number().int(),
|
|
38
|
+
remaining_runs: z.number().int(),
|
|
39
|
+
}).transform((v) => {
|
|
40
|
+
return remap$(v, {
|
|
41
|
+
"suite_id": "suiteId",
|
|
42
|
+
"measured_runs": "measuredRuns",
|
|
43
|
+
"measured_samples": "measuredSamples",
|
|
44
|
+
"remaining_runs": "remainingRuns",
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
/** @internal */
|
|
48
|
+
export type EvalSuiteTokenMeasurement$Outbound = {
|
|
49
|
+
object: "eval.suite.token_measurement";
|
|
50
|
+
suite_id: string;
|
|
51
|
+
measured_runs: number;
|
|
52
|
+
measured_samples: number;
|
|
53
|
+
remaining_runs: number;
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
/** @internal */
|
|
57
|
+
export const EvalSuiteTokenMeasurement$outboundSchema: z.ZodType<
|
|
58
|
+
EvalSuiteTokenMeasurement$Outbound,
|
|
59
|
+
z.ZodTypeDef,
|
|
60
|
+
EvalSuiteTokenMeasurement
|
|
61
|
+
> = z.object({
|
|
62
|
+
object: z.literal("eval.suite.token_measurement"),
|
|
63
|
+
suiteId: z.string(),
|
|
64
|
+
measuredRuns: z.number().int(),
|
|
65
|
+
measuredSamples: z.number().int(),
|
|
66
|
+
remainingRuns: z.number().int(),
|
|
67
|
+
}).transform((v) => {
|
|
68
|
+
return remap$(v, {
|
|
69
|
+
suiteId: "suite_id",
|
|
70
|
+
measuredRuns: "measured_runs",
|
|
71
|
+
measuredSamples: "measured_samples",
|
|
72
|
+
remainingRuns: "remaining_runs",
|
|
73
|
+
});
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
export function evalSuiteTokenMeasurementToJSON(
|
|
77
|
+
evalSuiteTokenMeasurement: EvalSuiteTokenMeasurement,
|
|
78
|
+
): string {
|
|
79
|
+
return JSON.stringify(
|
|
80
|
+
EvalSuiteTokenMeasurement$outboundSchema.parse(evalSuiteTokenMeasurement),
|
|
81
|
+
);
|
|
82
|
+
}
|
|
83
|
+
export function evalSuiteTokenMeasurementFromJSON(
|
|
84
|
+
jsonString: string,
|
|
85
|
+
): SafeParseResult<EvalSuiteTokenMeasurement, SDKValidationError> {
|
|
86
|
+
return safeParse(
|
|
87
|
+
jsonString,
|
|
88
|
+
(x) => EvalSuiteTokenMeasurement$inboundSchema.parse(JSON.parse(x)),
|
|
89
|
+
`Failed to parse 'EvalSuiteTokenMeasurement' from JSON`,
|
|
90
|
+
);
|
|
91
|
+
}
|
|
@@ -291,6 +291,7 @@ export * from "./evalsuiteleaderboard.js";
|
|
|
291
291
|
export * from "./evalsuitelist.js";
|
|
292
292
|
export * from "./evalsuitemanifest.js";
|
|
293
293
|
export * from "./evalsuiteobject.js";
|
|
294
|
+
export * from "./evalsuitetokenmeasurement.js";
|
|
294
295
|
export * from "./evaltask.js";
|
|
295
296
|
export * from "./evaltasktype.js";
|
|
296
297
|
export * from "./event.js";
|
|
@@ -455,6 +456,7 @@ export * from "./mcptoolcallwithid.js";
|
|
|
455
456
|
export * from "./mcptoolchoice.js";
|
|
456
457
|
export * from "./mcptooldefinition.js";
|
|
457
458
|
export * from "./mcptoolfilter.js";
|
|
459
|
+
export * from "./measureevalsuitetokensbody.js";
|
|
458
460
|
export * from "./memoryentry.js";
|
|
459
461
|
export * from "./memoryentrydeleted.js";
|
|
460
462
|
export * from "./memoryentrylist.js";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type MeasureEvalSuiteTokensBody = {
|
|
11
|
+
/**
|
|
12
|
+
* How many runs to measure in this call. Call again until `remaining_runs` is 0.
|
|
13
|
+
*/
|
|
14
|
+
limit?: number | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const MeasureEvalSuiteTokensBody$inboundSchema: z.ZodType<
|
|
19
|
+
MeasureEvalSuiteTokensBody,
|
|
20
|
+
z.ZodTypeDef,
|
|
21
|
+
unknown
|
|
22
|
+
> = z.object({
|
|
23
|
+
limit: z.number().int().default(5),
|
|
24
|
+
});
|
|
25
|
+
/** @internal */
|
|
26
|
+
export type MeasureEvalSuiteTokensBody$Outbound = {
|
|
27
|
+
limit: number;
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/** @internal */
|
|
31
|
+
export const MeasureEvalSuiteTokensBody$outboundSchema: z.ZodType<
|
|
32
|
+
MeasureEvalSuiteTokensBody$Outbound,
|
|
33
|
+
z.ZodTypeDef,
|
|
34
|
+
MeasureEvalSuiteTokensBody
|
|
35
|
+
> = z.object({
|
|
36
|
+
limit: z.number().int().default(5),
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
export function measureEvalSuiteTokensBodyToJSON(
|
|
40
|
+
measureEvalSuiteTokensBody: MeasureEvalSuiteTokensBody,
|
|
41
|
+
): string {
|
|
42
|
+
return JSON.stringify(
|
|
43
|
+
MeasureEvalSuiteTokensBody$outboundSchema.parse(measureEvalSuiteTokensBody),
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
export function measureEvalSuiteTokensBodyFromJSON(
|
|
47
|
+
jsonString: string,
|
|
48
|
+
): SafeParseResult<MeasureEvalSuiteTokensBody, SDKValidationError> {
|
|
49
|
+
return safeParse(
|
|
50
|
+
jsonString,
|
|
51
|
+
(x) => MeasureEvalSuiteTokensBody$inboundSchema.parse(JSON.parse(x)),
|
|
52
|
+
`Failed to parse 'MeasureEvalSuiteTokensBody' from JSON`,
|
|
53
|
+
);
|
|
54
|
+
}
|
|
@@ -22,7 +22,7 @@ export type Repo = {
|
|
|
22
22
|
* (the API, `git push`, the HF client, the OCI registry). It is the
|
|
23
23
|
* same id the platform session and mk-authentication's members
|
|
24
24
|
* directory use, so a name is one directory lookup away. `null`
|
|
25
|
-
* for a
|
|
25
|
+
* for a repository that records no user id; never an empty string.
|
|
26
26
|
*/
|
|
27
27
|
creator: string | null;
|
|
28
28
|
description: string;
|
|
@@ -338,6 +338,7 @@ export * from "./livekittoken.js";
|
|
|
338
338
|
export * from "./llmcheck.js";
|
|
339
339
|
export * from "./llmgrant.js";
|
|
340
340
|
export * from "./llmrevoke.js";
|
|
341
|
+
export * from "./measureevalsuitetokens.js";
|
|
341
342
|
export * from "./modifyvectorstore.js";
|
|
342
343
|
export * from "./patchrepo.js";
|
|
343
344
|
export * from "./pauseagentschedule.js";
|
|
@@ -0,0 +1,80 @@
|
|
|
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 * as components from "../components/index.js";
|
|
10
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
+
|
|
12
|
+
export type MeasureEvalSuiteTokensRequest = {
|
|
13
|
+
suiteId: string;
|
|
14
|
+
/**
|
|
15
|
+
* Optional external end-user identifier forwarded by the API gateway.
|
|
16
|
+
*/
|
|
17
|
+
xOnBehalfOf?: string | undefined;
|
|
18
|
+
measureEvalSuiteTokensBody: components.MeasureEvalSuiteTokensBody;
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const MeasureEvalSuiteTokensRequest$inboundSchema: z.ZodType<
|
|
23
|
+
MeasureEvalSuiteTokensRequest,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
suite_id: z.string(),
|
|
28
|
+
"X-On-Behalf-Of": z.string().optional(),
|
|
29
|
+
MeasureEvalSuiteTokensBody:
|
|
30
|
+
components.MeasureEvalSuiteTokensBody$inboundSchema,
|
|
31
|
+
}).transform((v) => {
|
|
32
|
+
return remap$(v, {
|
|
33
|
+
"suite_id": "suiteId",
|
|
34
|
+
"X-On-Behalf-Of": "xOnBehalfOf",
|
|
35
|
+
"MeasureEvalSuiteTokensBody": "measureEvalSuiteTokensBody",
|
|
36
|
+
});
|
|
37
|
+
});
|
|
38
|
+
/** @internal */
|
|
39
|
+
export type MeasureEvalSuiteTokensRequest$Outbound = {
|
|
40
|
+
suite_id: string;
|
|
41
|
+
"X-On-Behalf-Of"?: string | undefined;
|
|
42
|
+
MeasureEvalSuiteTokensBody: components.MeasureEvalSuiteTokensBody$Outbound;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/** @internal */
|
|
46
|
+
export const MeasureEvalSuiteTokensRequest$outboundSchema: z.ZodType<
|
|
47
|
+
MeasureEvalSuiteTokensRequest$Outbound,
|
|
48
|
+
z.ZodTypeDef,
|
|
49
|
+
MeasureEvalSuiteTokensRequest
|
|
50
|
+
> = z.object({
|
|
51
|
+
suiteId: z.string(),
|
|
52
|
+
xOnBehalfOf: z.string().optional(),
|
|
53
|
+
measureEvalSuiteTokensBody:
|
|
54
|
+
components.MeasureEvalSuiteTokensBody$outboundSchema,
|
|
55
|
+
}).transform((v) => {
|
|
56
|
+
return remap$(v, {
|
|
57
|
+
suiteId: "suite_id",
|
|
58
|
+
xOnBehalfOf: "X-On-Behalf-Of",
|
|
59
|
+
measureEvalSuiteTokensBody: "MeasureEvalSuiteTokensBody",
|
|
60
|
+
});
|
|
61
|
+
});
|
|
62
|
+
|
|
63
|
+
export function measureEvalSuiteTokensRequestToJSON(
|
|
64
|
+
measureEvalSuiteTokensRequest: MeasureEvalSuiteTokensRequest,
|
|
65
|
+
): string {
|
|
66
|
+
return JSON.stringify(
|
|
67
|
+
MeasureEvalSuiteTokensRequest$outboundSchema.parse(
|
|
68
|
+
measureEvalSuiteTokensRequest,
|
|
69
|
+
),
|
|
70
|
+
);
|
|
71
|
+
}
|
|
72
|
+
export function measureEvalSuiteTokensRequestFromJSON(
|
|
73
|
+
jsonString: string,
|
|
74
|
+
): SafeParseResult<MeasureEvalSuiteTokensRequest, SDKValidationError> {
|
|
75
|
+
return safeParse(
|
|
76
|
+
jsonString,
|
|
77
|
+
(x) => MeasureEvalSuiteTokensRequest$inboundSchema.parse(JSON.parse(x)),
|
|
78
|
+
`Failed to parse 'MeasureEvalSuiteTokensRequest' from JSON`,
|
|
79
|
+
);
|
|
80
|
+
}
|
package/src/react-query/index.ts
CHANGED
|
@@ -245,6 +245,7 @@ export * from "./llmEvalsListSchedules.js";
|
|
|
245
245
|
export * from "./llmEvalsListSuiteLeaderboardRuns.js";
|
|
246
246
|
export * from "./llmEvalsListSuites.js";
|
|
247
247
|
export * from "./llmEvalsListSuiteVersions.js";
|
|
248
|
+
export * from "./llmEvalsMeasureSuiteTokens.js";
|
|
248
249
|
export * from "./llmEvalsRerunFailedSamples.js";
|
|
249
250
|
export * from "./llmEvalsRetryFailedRun.js";
|
|
250
251
|
export * from "./llmEvalsTriggerSchedule.js";
|
|
@@ -0,0 +1,110 @@
|
|
|
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 { llmEvalsMeasureSuiteTokens } from "../funcs/llmEvalsMeasureSuiteTokens.js";
|
|
12
|
+
import { combineSignals } from "../lib/primitives.js";
|
|
13
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
14
|
+
import * as components from "../models/components/index.js";
|
|
15
|
+
import {
|
|
16
|
+
ConnectionError,
|
|
17
|
+
InvalidRequestError,
|
|
18
|
+
RequestAbortedError,
|
|
19
|
+
RequestTimeoutError,
|
|
20
|
+
UnexpectedClientError,
|
|
21
|
+
} from "../models/errors/httpclienterrors.js";
|
|
22
|
+
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
|
+
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
|
+
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
+
import * as operations from "../models/operations/index.js";
|
|
26
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
27
|
+
import { useSDKContext } from "./_context.js";
|
|
28
|
+
import { MutationHookOptions } from "./_types.js";
|
|
29
|
+
|
|
30
|
+
export type LlmEvalsMeasureSuiteTokensMutationVariables = {
|
|
31
|
+
request: operations.MeasureEvalSuiteTokensRequest;
|
|
32
|
+
options?: RequestOptions;
|
|
33
|
+
};
|
|
34
|
+
|
|
35
|
+
export type LlmEvalsMeasureSuiteTokensMutationData =
|
|
36
|
+
components.EvalSuiteTokenMeasurement;
|
|
37
|
+
|
|
38
|
+
export type LlmEvalsMeasureSuiteTokensMutationError =
|
|
39
|
+
| SDKError
|
|
40
|
+
| ResponseValidationError
|
|
41
|
+
| ConnectionError
|
|
42
|
+
| RequestAbortedError
|
|
43
|
+
| RequestTimeoutError
|
|
44
|
+
| InvalidRequestError
|
|
45
|
+
| UnexpectedClientError
|
|
46
|
+
| SDKValidationError;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Count tokens from stored text for a suite's unmeasured samples
|
|
50
|
+
*
|
|
51
|
+
* @remarks
|
|
52
|
+
* Backfill for rows written before the gateway recorded usage. For samples of the suite's completed runs that have answer or reasoning text but no token figure, counts prompt, reasoning and answer tokens from the stored text (tiktoken o200k_base, one ruler for every model), marks them `tokens_estimated`, and refreshes each run's per-task `tokens` and run totals so the leaderboard's efficiency figures appear. Processes `limit` runs per call, oldest run id first; call again until `remaining_runs` is 0. Samples the provider or the import already measured are left alone, and a sample with no text stays unmeasured. New rows get the same figures at generation or import time, so this is a no-op on a suite with nothing to measure.
|
|
53
|
+
*/
|
|
54
|
+
export function useLlmEvalsMeasureSuiteTokensMutation(
|
|
55
|
+
options?: MutationHookOptions<
|
|
56
|
+
LlmEvalsMeasureSuiteTokensMutationData,
|
|
57
|
+
LlmEvalsMeasureSuiteTokensMutationError,
|
|
58
|
+
LlmEvalsMeasureSuiteTokensMutationVariables
|
|
59
|
+
>,
|
|
60
|
+
): UseMutationResult<
|
|
61
|
+
LlmEvalsMeasureSuiteTokensMutationData,
|
|
62
|
+
LlmEvalsMeasureSuiteTokensMutationError,
|
|
63
|
+
LlmEvalsMeasureSuiteTokensMutationVariables
|
|
64
|
+
> {
|
|
65
|
+
const client = useSDKContext();
|
|
66
|
+
return useMutation({
|
|
67
|
+
...buildLlmEvalsMeasureSuiteTokensMutation(client, options),
|
|
68
|
+
...options,
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function mutationKeyLlmEvalsMeasureSuiteTokens(): MutationKey {
|
|
73
|
+
return ["@meetkai/mka1", "evals", "measureSuiteTokens"];
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function buildLlmEvalsMeasureSuiteTokensMutation(
|
|
77
|
+
client$: SDKCore,
|
|
78
|
+
hookOptions?: RequestOptions,
|
|
79
|
+
): {
|
|
80
|
+
mutationKey: MutationKey;
|
|
81
|
+
mutationFn: (
|
|
82
|
+
variables: LlmEvalsMeasureSuiteTokensMutationVariables,
|
|
83
|
+
) => Promise<LlmEvalsMeasureSuiteTokensMutationData>;
|
|
84
|
+
} {
|
|
85
|
+
return {
|
|
86
|
+
mutationKey: mutationKeyLlmEvalsMeasureSuiteTokens(),
|
|
87
|
+
mutationFn: function llmEvalsMeasureSuiteTokensMutationFn({
|
|
88
|
+
request,
|
|
89
|
+
options,
|
|
90
|
+
}): Promise<LlmEvalsMeasureSuiteTokensMutationData> {
|
|
91
|
+
const mergedOptions = {
|
|
92
|
+
...hookOptions,
|
|
93
|
+
...options,
|
|
94
|
+
fetchOptions: {
|
|
95
|
+
...hookOptions?.fetchOptions,
|
|
96
|
+
...options?.fetchOptions,
|
|
97
|
+
signal: combineSignals(
|
|
98
|
+
hookOptions?.fetchOptions?.signal,
|
|
99
|
+
options?.fetchOptions?.signal,
|
|
100
|
+
),
|
|
101
|
+
},
|
|
102
|
+
};
|
|
103
|
+
return unwrapAsync(llmEvalsMeasureSuiteTokens(
|
|
104
|
+
client$,
|
|
105
|
+
request,
|
|
106
|
+
mergedOptions,
|
|
107
|
+
));
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
@@ -50,11 +50,11 @@ export type ReposCreateMutationError =
|
|
|
50
50
|
* Create a repository
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
|
-
* Provisions a repository (org owner/admin only)
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
53
|
+
* Provisions a repository (org owner/admin only); a failed provision is
|
|
54
|
+
* rolled back best-effort (see the `502`). The repository belongs to the
|
|
55
|
+
* caller's org. `kind` says what it will hold and defaults to `repo` (a
|
|
56
|
+
* plain git repository); it decides which protocol planes answer for the
|
|
57
|
+
* name (see the `Repo` schema).
|
|
58
58
|
*/
|
|
59
59
|
export function useReposCreateMutation(
|
|
60
60
|
options?: MutationHookOptions<
|
|
@@ -49,8 +49,8 @@ export type ReposDeleteMutationError =
|
|
|
49
49
|
* Delete a repository
|
|
50
50
|
*
|
|
51
51
|
* @remarks
|
|
52
|
-
* Removes a repository; org owner/admin only. The
|
|
53
|
-
* authoritative; the
|
|
52
|
+
* Removes a repository; org owner/admin only. The deletion is
|
|
53
|
+
* authoritative; the contents are cleaned up best-effort.
|
|
54
54
|
*/
|
|
55
55
|
export function useReposDeleteMutation(
|
|
56
56
|
options?: MutationHookOptions<
|
|
@@ -58,7 +58,7 @@ export type ReposListQueryError =
|
|
|
58
58
|
*
|
|
59
59
|
* @remarks
|
|
60
60
|
* Returns every repository in the caller's org (org owner/admin only).
|
|
61
|
-
*
|
|
61
|
+
* Read-only. With `kind`, only repositories of that kind; an untyped
|
|
62
62
|
* (legacy, `kind: null`) repository appears in the unfiltered listing
|
|
63
63
|
* only.
|
|
64
64
|
*/
|
|
@@ -82,7 +82,7 @@ export function useReposList(
|
|
|
82
82
|
*
|
|
83
83
|
* @remarks
|
|
84
84
|
* Returns every repository in the caller's org (org owner/admin only).
|
|
85
|
-
*
|
|
85
|
+
* Read-only. With `kind`, only repositories of that kind; an untyped
|
|
86
86
|
* (legacy, `kind: null`) repository appears in the unfiltered listing
|
|
87
87
|
* only.
|
|
88
88
|
*/
|
|
@@ -51,15 +51,15 @@ export type ReposUpdateMutationError =
|
|
|
51
51
|
*
|
|
52
52
|
* @remarks
|
|
53
53
|
* Applies a label-only update (name/description/kind); org owner/admin
|
|
54
|
-
* only. The repository id is stable, so a rename
|
|
55
|
-
*
|
|
54
|
+
* only. The repository id is stable, so a rename touches no contents.
|
|
55
|
+
* Omitted fields are left unchanged.
|
|
56
56
|
*
|
|
57
57
|
* `kind` is the ONE way a repository's kind changes after creation (the
|
|
58
58
|
* protocol planes never change it): it types a legacy `kind: null`
|
|
59
59
|
* repository and corrects a wrong kind. `repo`, `model` and `dataset`
|
|
60
60
|
* convert freely and any repository may become `image`; a repository
|
|
61
61
|
* whose container images are still named by a tag can be given no
|
|
62
|
-
* other kind — leaving `image`, or typing a legacy `null`
|
|
62
|
+
* other kind — leaving `image`, or typing a legacy `null` repository as
|
|
63
63
|
* anything else, is refused with `409 kind_has_content` (list and
|
|
64
64
|
* delete the tags through this API first). A switch away from `image`
|
|
65
65
|
* collects every image no tag reaches before it is judged, so an image
|
package/src/sdk/evals.ts
CHANGED
|
@@ -29,6 +29,7 @@ import { llmEvalsListSchedules } from "../funcs/llmEvalsListSchedules.js";
|
|
|
29
29
|
import { llmEvalsListSuiteLeaderboardRuns } from "../funcs/llmEvalsListSuiteLeaderboardRuns.js";
|
|
30
30
|
import { llmEvalsListSuites } from "../funcs/llmEvalsListSuites.js";
|
|
31
31
|
import { llmEvalsListSuiteVersions } from "../funcs/llmEvalsListSuiteVersions.js";
|
|
32
|
+
import { llmEvalsMeasureSuiteTokens } from "../funcs/llmEvalsMeasureSuiteTokens.js";
|
|
32
33
|
import { llmEvalsRerunFailedSamples } from "../funcs/llmEvalsRerunFailedSamples.js";
|
|
33
34
|
import { llmEvalsRetryFailedRun } from "../funcs/llmEvalsRetryFailedRun.js";
|
|
34
35
|
import { llmEvalsTriggerSchedule } from "../funcs/llmEvalsTriggerSchedule.js";
|
|
@@ -193,6 +194,23 @@ export class Evals extends ClientSDK {
|
|
|
193
194
|
));
|
|
194
195
|
}
|
|
195
196
|
|
|
197
|
+
/**
|
|
198
|
+
* Count tokens from stored text for a suite's unmeasured samples
|
|
199
|
+
*
|
|
200
|
+
* @remarks
|
|
201
|
+
* Backfill for rows written before the gateway recorded usage. For samples of the suite's completed runs that have answer or reasoning text but no token figure, counts prompt, reasoning and answer tokens from the stored text (tiktoken o200k_base, one ruler for every model), marks them `tokens_estimated`, and refreshes each run's per-task `tokens` and run totals so the leaderboard's efficiency figures appear. Processes `limit` runs per call, oldest run id first; call again until `remaining_runs` is 0. Samples the provider or the import already measured are left alone, and a sample with no text stays unmeasured. New rows get the same figures at generation or import time, so this is a no-op on a suite with nothing to measure.
|
|
202
|
+
*/
|
|
203
|
+
async measureSuiteTokens(
|
|
204
|
+
request: operations.MeasureEvalSuiteTokensRequest,
|
|
205
|
+
options?: RequestOptions,
|
|
206
|
+
): Promise<components.EvalSuiteTokenMeasurement> {
|
|
207
|
+
return unwrapAsync(llmEvalsMeasureSuiteTokens(
|
|
208
|
+
this,
|
|
209
|
+
request,
|
|
210
|
+
options,
|
|
211
|
+
));
|
|
212
|
+
}
|
|
213
|
+
|
|
196
214
|
/**
|
|
197
215
|
* Create an eval run
|
|
198
216
|
*
|
package/src/sdk/repos.ts
CHANGED
|
@@ -24,7 +24,7 @@ export class Repos extends ClientSDK {
|
|
|
24
24
|
*
|
|
25
25
|
* @remarks
|
|
26
26
|
* Returns every repository in the caller's org (org owner/admin only).
|
|
27
|
-
*
|
|
27
|
+
* Read-only. With `kind`, only repositories of that kind; an untyped
|
|
28
28
|
* (legacy, `kind: null`) repository appears in the unfiltered listing
|
|
29
29
|
* only.
|
|
30
30
|
*/
|
|
@@ -43,11 +43,11 @@ export class Repos extends ClientSDK {
|
|
|
43
43
|
* Create a repository
|
|
44
44
|
*
|
|
45
45
|
* @remarks
|
|
46
|
-
* Provisions a repository (org owner/admin only)
|
|
47
|
-
*
|
|
48
|
-
*
|
|
49
|
-
*
|
|
50
|
-
*
|
|
46
|
+
* Provisions a repository (org owner/admin only); a failed provision is
|
|
47
|
+
* rolled back best-effort (see the `502`). The repository belongs to the
|
|
48
|
+
* caller's org. `kind` says what it will hold and defaults to `repo` (a
|
|
49
|
+
* plain git repository); it decides which protocol planes answer for the
|
|
50
|
+
* name (see the `Repo` schema).
|
|
51
51
|
*/
|
|
52
52
|
async create(
|
|
53
53
|
request: operations.CreateRepoRequest,
|
|
@@ -64,8 +64,8 @@ export class Repos extends ClientSDK {
|
|
|
64
64
|
* Delete a repository
|
|
65
65
|
*
|
|
66
66
|
* @remarks
|
|
67
|
-
* Removes a repository; org owner/admin only. The
|
|
68
|
-
* authoritative; the
|
|
67
|
+
* Removes a repository; org owner/admin only. The deletion is
|
|
68
|
+
* authoritative; the contents are cleaned up best-effort.
|
|
69
69
|
*/
|
|
70
70
|
async delete(
|
|
71
71
|
request: operations.DeleteRepoRequest,
|
|
@@ -101,15 +101,15 @@ export class Repos extends ClientSDK {
|
|
|
101
101
|
*
|
|
102
102
|
* @remarks
|
|
103
103
|
* Applies a label-only update (name/description/kind); org owner/admin
|
|
104
|
-
* only. The repository id is stable, so a rename
|
|
105
|
-
*
|
|
104
|
+
* only. The repository id is stable, so a rename touches no contents.
|
|
105
|
+
* Omitted fields are left unchanged.
|
|
106
106
|
*
|
|
107
107
|
* `kind` is the ONE way a repository's kind changes after creation (the
|
|
108
108
|
* protocol planes never change it): it types a legacy `kind: null`
|
|
109
109
|
* repository and corrects a wrong kind. `repo`, `model` and `dataset`
|
|
110
110
|
* convert freely and any repository may become `image`; a repository
|
|
111
111
|
* whose container images are still named by a tag can be given no
|
|
112
|
-
* other kind — leaving `image`, or typing a legacy `null`
|
|
112
|
+
* other kind — leaving `image`, or typing a legacy `null` repository as
|
|
113
113
|
* anything else, is refused with `409 kind_has_content` (list and
|
|
114
114
|
* delete the tags through this API first). A switch away from `image`
|
|
115
115
|
* collects every image no tag reaches before it is judged, so an image
|