@meetkai/mka1 0.51.7 → 0.51.8
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 +233 -227
- package/bin/mcp-server.js +796 -514
- package/bin/mcp-server.js.map +17 -13
- package/dist/commonjs/funcs/llmFeedbackExportCompletionFeedback.d.ts +17 -0
- package/dist/commonjs/funcs/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmFeedbackExportCompletionFeedback.js +137 -0
- package/dist/commonjs/funcs/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/commonjs/funcs/llmFeedbackExportResponseFeedback.d.ts +17 -0
- package/dist/commonjs/funcs/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/commonjs/funcs/llmFeedbackExportResponseFeedback.js +137 -0
- package/dist/commonjs/funcs/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/commonjs/funcs/llmFeedbackGetExportStatus.d.ts +2 -3
- package/dist/commonjs/funcs/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/commonjs/funcs/llmFeedbackGetExportStatus.js +4 -15
- package/dist/commonjs/funcs/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/commonjs/funcs/llmFeedbackStartExport.d.ts +2 -3
- package/dist/commonjs/funcs/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/commonjs/funcs/llmFeedbackStartExport.js +4 -15
- package/dist/commonjs/funcs/llmFeedbackStartExport.js.map +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.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/llmFeedbackExportCompletionFeedback.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportCompletionFeedback.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportResponseFeedback.d.ts +8 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportResponseFeedback.js +64 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/commonjs/mcp-server/tools/llmFeedbackGetExportStatus.d.ts +1 -6
- package/dist/commonjs/mcp-server/tools/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmFeedbackGetExportStatus.js +3 -41
- package/dist/commonjs/mcp-server/tools/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmFeedbackStartExport.d.ts +1 -6
- package/dist/commonjs/mcp-server/tools/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/commonjs/mcp-server/tools/llmFeedbackStartExport.js +3 -41
- package/dist/commonjs/mcp-server/tools/llmFeedbackStartExport.js.map +1 -1
- package/dist/commonjs/models/operations/exportcompletionfeedback.d.ts +80 -0
- package/dist/commonjs/models/operations/exportcompletionfeedback.d.ts.map +1 -0
- package/dist/commonjs/models/operations/exportcompletionfeedback.js +123 -0
- package/dist/commonjs/models/operations/exportcompletionfeedback.js.map +1 -0
- package/dist/commonjs/models/operations/exportresponsefeedback.d.ts +80 -0
- package/dist/commonjs/models/operations/exportresponsefeedback.d.ts.map +1 -0
- package/dist/commonjs/models/operations/exportresponsefeedback.js +121 -0
- package/dist/commonjs/models/operations/exportresponsefeedback.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +2 -2
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +2 -2
- package/dist/commonjs/models/operations/index.js.map +1 -1
- 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/llmFeedbackExportCompletionFeedback.core.d.ts +16 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.core.js +38 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.core.js.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.d.ts +40 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.js +65 -0
- package/dist/commonjs/react-query/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.core.d.ts +16 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.core.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.core.js +38 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.core.js.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.d.ts +40 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.js +65 -0
- package/dist/commonjs/react-query/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.core.d.ts +3 -6
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.core.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.core.js +7 -9
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.core.js.map +1 -1
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.d.ts +6 -14
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.js +8 -15
- package/dist/commonjs/react-query/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/commonjs/react-query/llmFeedbackStartExport.d.ts +1 -3
- package/dist/commonjs/react-query/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/commonjs/react-query/llmFeedbackStartExport.js +3 -3
- package/dist/commonjs/react-query/llmFeedbackStartExport.js.map +1 -1
- package/dist/commonjs/sdk/feedback.d.ts +18 -4
- package/dist/commonjs/sdk/feedback.d.ts.map +1 -1
- package/dist/commonjs/sdk/feedback.js +26 -6
- package/dist/commonjs/sdk/feedback.js.map +1 -1
- package/dist/esm/funcs/llmFeedbackExportCompletionFeedback.d.ts +17 -0
- package/dist/esm/funcs/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/esm/funcs/llmFeedbackExportCompletionFeedback.js +101 -0
- package/dist/esm/funcs/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/esm/funcs/llmFeedbackExportResponseFeedback.d.ts +17 -0
- package/dist/esm/funcs/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/esm/funcs/llmFeedbackExportResponseFeedback.js +101 -0
- package/dist/esm/funcs/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/esm/funcs/llmFeedbackGetExportStatus.d.ts +2 -3
- package/dist/esm/funcs/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/esm/funcs/llmFeedbackGetExportStatus.js +4 -15
- package/dist/esm/funcs/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/esm/funcs/llmFeedbackStartExport.d.ts +2 -3
- package/dist/esm/funcs/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/esm/funcs/llmFeedbackStartExport.js +4 -15
- package/dist/esm/funcs/llmFeedbackStartExport.js.map +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.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/llmFeedbackExportCompletionFeedback.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportCompletionFeedback.js +28 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportResponseFeedback.d.ts +8 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportResponseFeedback.js +28 -0
- package/dist/esm/mcp-server/tools/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/esm/mcp-server/tools/llmFeedbackGetExportStatus.d.ts +1 -6
- package/dist/esm/mcp-server/tools/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/llmFeedbackGetExportStatus.js +3 -8
- package/dist/esm/mcp-server/tools/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/esm/mcp-server/tools/llmFeedbackStartExport.d.ts +1 -6
- package/dist/esm/mcp-server/tools/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/esm/mcp-server/tools/llmFeedbackStartExport.js +3 -8
- package/dist/esm/mcp-server/tools/llmFeedbackStartExport.js.map +1 -1
- package/dist/esm/models/operations/exportcompletionfeedback.d.ts +80 -0
- package/dist/esm/models/operations/exportcompletionfeedback.d.ts.map +1 -0
- package/dist/esm/models/operations/exportcompletionfeedback.js +83 -0
- package/dist/esm/models/operations/exportcompletionfeedback.js.map +1 -0
- package/dist/esm/models/operations/exportresponsefeedback.d.ts +80 -0
- package/dist/esm/models/operations/exportresponsefeedback.d.ts.map +1 -0
- package/dist/esm/models/operations/exportresponsefeedback.js +81 -0
- package/dist/esm/models/operations/exportresponsefeedback.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +2 -2
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +2 -2
- package/dist/esm/models/operations/index.js.map +1 -1
- 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/llmFeedbackExportCompletionFeedback.core.d.ts +16 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.core.d.ts.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.core.js +33 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.core.js.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.d.ts +40 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.d.ts.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.js +55 -0
- package/dist/esm/react-query/llmFeedbackExportCompletionFeedback.js.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.core.d.ts +16 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.core.d.ts.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.core.js +33 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.core.js.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.d.ts +40 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.d.ts.map +1 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.js +55 -0
- package/dist/esm/react-query/llmFeedbackExportResponseFeedback.js.map +1 -0
- package/dist/esm/react-query/llmFeedbackGetExportStatus.core.d.ts +3 -6
- package/dist/esm/react-query/llmFeedbackGetExportStatus.core.d.ts.map +1 -1
- package/dist/esm/react-query/llmFeedbackGetExportStatus.core.js +7 -9
- package/dist/esm/react-query/llmFeedbackGetExportStatus.core.js.map +1 -1
- package/dist/esm/react-query/llmFeedbackGetExportStatus.d.ts +6 -14
- package/dist/esm/react-query/llmFeedbackGetExportStatus.d.ts.map +1 -1
- package/dist/esm/react-query/llmFeedbackGetExportStatus.js +8 -14
- package/dist/esm/react-query/llmFeedbackGetExportStatus.js.map +1 -1
- package/dist/esm/react-query/llmFeedbackStartExport.d.ts +1 -3
- package/dist/esm/react-query/llmFeedbackStartExport.d.ts.map +1 -1
- package/dist/esm/react-query/llmFeedbackStartExport.js +3 -3
- package/dist/esm/react-query/llmFeedbackStartExport.js.map +1 -1
- package/dist/esm/sdk/feedback.d.ts +18 -4
- package/dist/esm/sdk/feedback.d.ts.map +1 -1
- package/dist/esm/sdk/feedback.js +26 -6
- package/dist/esm/sdk/feedback.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/llmFeedbackExportCompletionFeedback.ts +191 -0
- package/src/funcs/llmFeedbackExportResponseFeedback.ts +191 -0
- package/src/funcs/llmFeedbackGetExportStatus.ts +1 -24
- package/src/funcs/llmFeedbackStartExport.ts +1 -25
- 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/llmFeedbackExportCompletionFeedback.ts +39 -0
- package/src/mcp-server/tools/llmFeedbackExportResponseFeedback.ts +39 -0
- package/src/mcp-server/tools/llmFeedbackGetExportStatus.ts +3 -10
- package/src/mcp-server/tools/llmFeedbackStartExport.ts +3 -10
- package/src/models/operations/exportcompletionfeedback.ts +185 -0
- package/src/models/operations/exportresponsefeedback.ts +187 -0
- package/src/models/operations/index.ts +2 -2
- package/src/react-query/index.ts +2 -0
- package/src/react-query/llmFeedbackExportCompletionFeedback.core.ts +81 -0
- package/src/react-query/llmFeedbackExportCompletionFeedback.ts +156 -0
- package/src/react-query/llmFeedbackExportResponseFeedback.core.ts +81 -0
- package/src/react-query/llmFeedbackExportResponseFeedback.ts +156 -0
- package/src/react-query/llmFeedbackGetExportStatus.core.ts +3 -12
- package/src/react-query/llmFeedbackGetExportStatus.ts +4 -27
- package/src/react-query/llmFeedbackStartExport.ts +1 -5
- package/src/sdk/feedback.ts +38 -6
- package/dist/commonjs/models/operations/getexportstatus.d.ts +0 -20
- package/dist/commonjs/models/operations/getexportstatus.d.ts.map +0 -1
- package/dist/commonjs/models/operations/getexportstatus.js +0 -67
- package/dist/commonjs/models/operations/getexportstatus.js.map +0 -1
- package/dist/commonjs/models/operations/startexportfeedback.d.ts +0 -20
- package/dist/commonjs/models/operations/startexportfeedback.d.ts.map +0 -1
- package/dist/commonjs/models/operations/startexportfeedback.js +0 -67
- package/dist/commonjs/models/operations/startexportfeedback.js.map +0 -1
- package/dist/esm/models/operations/getexportstatus.d.ts +0 -20
- package/dist/esm/models/operations/getexportstatus.d.ts.map +0 -1
- package/dist/esm/models/operations/getexportstatus.js +0 -29
- package/dist/esm/models/operations/getexportstatus.js.map +0 -1
- package/dist/esm/models/operations/startexportfeedback.d.ts +0 -20
- package/dist/esm/models/operations/startexportfeedback.d.ts.map +0 -1
- package/dist/esm/models/operations/startexportfeedback.js +0 -29
- package/dist/esm/models/operations/startexportfeedback.js.map +0 -1
- package/src/models/operations/getexportstatus.ts +0 -63
- package/src/models/operations/startexportfeedback.ts +0 -63
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.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 { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Export completion feedback as CSV
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Synchronously exports the completion feedback entries visible to the caller as a CSV file, ordered by the creation date of the underlying request. Visibility matches the list endpoint: callers see their own feedback; org owners and admins see their whole team. Supports filtering by rating. The export is capped at 50,000 rows; when the cap is hit the response carries an X-Export-Truncated header and older rows (with the default descending order) are omitted.
|
|
33
|
+
*/
|
|
34
|
+
export function llmFeedbackExportCompletionFeedback(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.ExportCompletionFeedbackRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.ExportCompletionFeedbackResponse,
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: SDKCore,
|
|
60
|
+
request: operations.ExportCompletionFeedbackRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.ExportCompletionFeedbackResponse,
|
|
66
|
+
| SDKError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) =>
|
|
81
|
+
operations.ExportCompletionFeedbackRequest$outboundSchema.parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = null;
|
|
89
|
+
|
|
90
|
+
const path = pathToFunc("/api/v1/llm/feedback/export/completions")();
|
|
91
|
+
|
|
92
|
+
const query = encodeFormQuery({
|
|
93
|
+
"order": payload.order,
|
|
94
|
+
"rating": payload.rating,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const headers = new Headers(compactMap({
|
|
98
|
+
Accept: "text/csv",
|
|
99
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
100
|
+
"X-On-Behalf-Of",
|
|
101
|
+
payload["X-On-Behalf-Of"],
|
|
102
|
+
{ explode: false, charEncoding: "none" },
|
|
103
|
+
),
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "exportCompletionFeedback",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.bearerAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| {
|
|
122
|
+
strategy: "backoff",
|
|
123
|
+
backoff: {
|
|
124
|
+
initialInterval: 500,
|
|
125
|
+
maxInterval: 5000,
|
|
126
|
+
exponent: 1.5,
|
|
127
|
+
maxElapsedTime: 15000,
|
|
128
|
+
},
|
|
129
|
+
retryConnectionErrors: true,
|
|
130
|
+
}
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const responseFields = {
|
|
164
|
+
HttpMeta: { Response: response, Request: req },
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const [result] = await M.match<
|
|
168
|
+
operations.ExportCompletionFeedbackResponse,
|
|
169
|
+
| SDKError
|
|
170
|
+
| ResponseValidationError
|
|
171
|
+
| ConnectionError
|
|
172
|
+
| RequestAbortedError
|
|
173
|
+
| RequestTimeoutError
|
|
174
|
+
| InvalidRequestError
|
|
175
|
+
| UnexpectedClientError
|
|
176
|
+
| SDKValidationError
|
|
177
|
+
>(
|
|
178
|
+
M.stream(200, operations.ExportCompletionFeedbackResponse$inboundSchema, {
|
|
179
|
+
ctype: "text/csv",
|
|
180
|
+
hdrs: true,
|
|
181
|
+
key: "Result",
|
|
182
|
+
}),
|
|
183
|
+
M.fail("4XX"),
|
|
184
|
+
M.fail("5XX"),
|
|
185
|
+
)(response, req, { extraFields: responseFields });
|
|
186
|
+
if (!result.ok) {
|
|
187
|
+
return [result, { status: "complete", request: req, response }];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return [result, { status: "complete", request: req, response }];
|
|
191
|
+
}
|
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { SDKCore } from "../core.js";
|
|
6
|
+
import { encodeFormQuery, encodeSimple } from "../lib/encodings.js";
|
|
7
|
+
import { matchStatusCode } from "../lib/http.js";
|
|
8
|
+
import * as M from "../lib/matchers.js";
|
|
9
|
+
import { compactMap } from "../lib/primitives.js";
|
|
10
|
+
import { safeParse } from "../lib/schemas.js";
|
|
11
|
+
import { RequestOptions } from "../lib/sdks.js";
|
|
12
|
+
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
|
+
import { pathToFunc } from "../lib/url.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 { APICall, APIPromise } from "../types/async.js";
|
|
26
|
+
import { Result } from "../types/fp.js";
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Export response feedback as CSV
|
|
30
|
+
*
|
|
31
|
+
* @remarks
|
|
32
|
+
* Synchronously exports the response feedback entries visible to the caller as a CSV file, ordered by the creation date of the underlying request. Visibility matches the list endpoint: callers see their own feedback; org owners and admins see their whole team. Supports filtering by rating. The export is capped at 50,000 rows; when the cap is hit the response carries an X-Export-Truncated header and older rows (with the default descending order) are omitted.
|
|
33
|
+
*/
|
|
34
|
+
export function llmFeedbackExportResponseFeedback(
|
|
35
|
+
client: SDKCore,
|
|
36
|
+
request: operations.ExportResponseFeedbackRequest,
|
|
37
|
+
options?: RequestOptions,
|
|
38
|
+
): APIPromise<
|
|
39
|
+
Result<
|
|
40
|
+
operations.ExportResponseFeedbackResponse,
|
|
41
|
+
| SDKError
|
|
42
|
+
| ResponseValidationError
|
|
43
|
+
| ConnectionError
|
|
44
|
+
| RequestAbortedError
|
|
45
|
+
| RequestTimeoutError
|
|
46
|
+
| InvalidRequestError
|
|
47
|
+
| UnexpectedClientError
|
|
48
|
+
| SDKValidationError
|
|
49
|
+
>
|
|
50
|
+
> {
|
|
51
|
+
return new APIPromise($do(
|
|
52
|
+
client,
|
|
53
|
+
request,
|
|
54
|
+
options,
|
|
55
|
+
));
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
async function $do(
|
|
59
|
+
client: SDKCore,
|
|
60
|
+
request: operations.ExportResponseFeedbackRequest,
|
|
61
|
+
options?: RequestOptions,
|
|
62
|
+
): Promise<
|
|
63
|
+
[
|
|
64
|
+
Result<
|
|
65
|
+
operations.ExportResponseFeedbackResponse,
|
|
66
|
+
| SDKError
|
|
67
|
+
| ResponseValidationError
|
|
68
|
+
| ConnectionError
|
|
69
|
+
| RequestAbortedError
|
|
70
|
+
| RequestTimeoutError
|
|
71
|
+
| InvalidRequestError
|
|
72
|
+
| UnexpectedClientError
|
|
73
|
+
| SDKValidationError
|
|
74
|
+
>,
|
|
75
|
+
APICall,
|
|
76
|
+
]
|
|
77
|
+
> {
|
|
78
|
+
const parsed = safeParse(
|
|
79
|
+
request,
|
|
80
|
+
(value) =>
|
|
81
|
+
operations.ExportResponseFeedbackRequest$outboundSchema.parse(value),
|
|
82
|
+
"Input validation failed",
|
|
83
|
+
);
|
|
84
|
+
if (!parsed.ok) {
|
|
85
|
+
return [parsed, { status: "invalid" }];
|
|
86
|
+
}
|
|
87
|
+
const payload = parsed.value;
|
|
88
|
+
const body = null;
|
|
89
|
+
|
|
90
|
+
const path = pathToFunc("/api/v1/llm/feedback/export/responses")();
|
|
91
|
+
|
|
92
|
+
const query = encodeFormQuery({
|
|
93
|
+
"order": payload.order,
|
|
94
|
+
"rating": payload.rating,
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
const headers = new Headers(compactMap({
|
|
98
|
+
Accept: "text/csv",
|
|
99
|
+
"X-On-Behalf-Of": encodeSimple(
|
|
100
|
+
"X-On-Behalf-Of",
|
|
101
|
+
payload["X-On-Behalf-Of"],
|
|
102
|
+
{ explode: false, charEncoding: "none" },
|
|
103
|
+
),
|
|
104
|
+
}));
|
|
105
|
+
|
|
106
|
+
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
107
|
+
const securityInput = secConfig == null ? {} : { bearerAuth: secConfig };
|
|
108
|
+
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
109
|
+
|
|
110
|
+
const context = {
|
|
111
|
+
options: client._options,
|
|
112
|
+
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
113
|
+
operationID: "exportResponseFeedback",
|
|
114
|
+
oAuth2Scopes: null,
|
|
115
|
+
|
|
116
|
+
resolvedSecurity: requestSecurity,
|
|
117
|
+
|
|
118
|
+
securitySource: client._options.bearerAuth,
|
|
119
|
+
retryConfig: options?.retries
|
|
120
|
+
|| client._options.retryConfig
|
|
121
|
+
|| {
|
|
122
|
+
strategy: "backoff",
|
|
123
|
+
backoff: {
|
|
124
|
+
initialInterval: 500,
|
|
125
|
+
maxInterval: 5000,
|
|
126
|
+
exponent: 1.5,
|
|
127
|
+
maxElapsedTime: 15000,
|
|
128
|
+
},
|
|
129
|
+
retryConnectionErrors: true,
|
|
130
|
+
}
|
|
131
|
+
|| { strategy: "none" },
|
|
132
|
+
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
133
|
+
};
|
|
134
|
+
|
|
135
|
+
const requestRes = client._createRequest(context, {
|
|
136
|
+
security: requestSecurity,
|
|
137
|
+
method: "GET",
|
|
138
|
+
baseURL: options?.serverURL,
|
|
139
|
+
path: path,
|
|
140
|
+
headers: headers,
|
|
141
|
+
query: query,
|
|
142
|
+
body: body,
|
|
143
|
+
userAgent: client._options.userAgent,
|
|
144
|
+
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
145
|
+
}, options);
|
|
146
|
+
if (!requestRes.ok) {
|
|
147
|
+
return [requestRes, { status: "invalid" }];
|
|
148
|
+
}
|
|
149
|
+
const req = requestRes.value;
|
|
150
|
+
|
|
151
|
+
const doResult = await client._do(req, {
|
|
152
|
+
context,
|
|
153
|
+
isErrorStatusCode: (statusCode: number) =>
|
|
154
|
+
matchStatusCode({ status: statusCode } as Response, ["4XX", "5XX"]),
|
|
155
|
+
retryConfig: context.retryConfig,
|
|
156
|
+
retryCodes: context.retryCodes,
|
|
157
|
+
});
|
|
158
|
+
if (!doResult.ok) {
|
|
159
|
+
return [doResult, { status: "request-error", request: req }];
|
|
160
|
+
}
|
|
161
|
+
const response = doResult.value;
|
|
162
|
+
|
|
163
|
+
const responseFields = {
|
|
164
|
+
HttpMeta: { Response: response, Request: req },
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
const [result] = await M.match<
|
|
168
|
+
operations.ExportResponseFeedbackResponse,
|
|
169
|
+
| SDKError
|
|
170
|
+
| ResponseValidationError
|
|
171
|
+
| ConnectionError
|
|
172
|
+
| RequestAbortedError
|
|
173
|
+
| RequestTimeoutError
|
|
174
|
+
| InvalidRequestError
|
|
175
|
+
| UnexpectedClientError
|
|
176
|
+
| SDKValidationError
|
|
177
|
+
>(
|
|
178
|
+
M.stream(200, operations.ExportResponseFeedbackResponse$inboundSchema, {
|
|
179
|
+
ctype: "text/csv",
|
|
180
|
+
hdrs: true,
|
|
181
|
+
key: "Result",
|
|
182
|
+
}),
|
|
183
|
+
M.fail("4XX"),
|
|
184
|
+
M.fail("5XX"),
|
|
185
|
+
)(response, req, { extraFields: responseFields });
|
|
186
|
+
if (!result.ok) {
|
|
187
|
+
return [result, { status: "complete", request: req, response }];
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return [result, { status: "complete", request: req, response }];
|
|
191
|
+
}
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
6
|
import { matchStatusCode } from "../lib/http.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
9
8
|
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
11
|
import { pathToFunc } from "../lib/url.js";
|
|
@@ -22,7 +20,6 @@ import {
|
|
|
22
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
21
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
23
|
import { APICall, APIPromise } from "../types/async.js";
|
|
27
24
|
import { Result } from "../types/fp.js";
|
|
28
25
|
|
|
@@ -30,11 +27,10 @@ import { Result } from "../types/fp.js";
|
|
|
30
27
|
* Get feedback export status
|
|
31
28
|
*
|
|
32
29
|
* @remarks
|
|
33
|
-
* Checks the status and progress of the currently running or most recently completed feedback export job.
|
|
30
|
+
* Checks the status and progress of the currently running or most recently completed feedback export job. Restricted to cluster administrators.
|
|
34
31
|
*/
|
|
35
32
|
export function llmFeedbackGetExportStatus(
|
|
36
33
|
client: SDKCore,
|
|
37
|
-
request: operations.GetExportStatusRequest,
|
|
38
34
|
options?: RequestOptions,
|
|
39
35
|
): APIPromise<
|
|
40
36
|
Result<
|
|
@@ -51,14 +47,12 @@ export function llmFeedbackGetExportStatus(
|
|
|
51
47
|
> {
|
|
52
48
|
return new APIPromise($do(
|
|
53
49
|
client,
|
|
54
|
-
request,
|
|
55
50
|
options,
|
|
56
51
|
));
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
async function $do(
|
|
60
55
|
client: SDKCore,
|
|
61
|
-
request: operations.GetExportStatusRequest,
|
|
62
56
|
options?: RequestOptions,
|
|
63
57
|
): Promise<
|
|
64
58
|
[
|
|
@@ -76,26 +70,10 @@ async function $do(
|
|
|
76
70
|
APICall,
|
|
77
71
|
]
|
|
78
72
|
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) => operations.GetExportStatusRequest$outboundSchema.parse(value),
|
|
82
|
-
"Input validation failed",
|
|
83
|
-
);
|
|
84
|
-
if (!parsed.ok) {
|
|
85
|
-
return [parsed, { status: "invalid" }];
|
|
86
|
-
}
|
|
87
|
-
const payload = parsed.value;
|
|
88
|
-
const body = null;
|
|
89
|
-
|
|
90
73
|
const path = pathToFunc("/api/v1/llm/feedback/export/status")();
|
|
91
74
|
|
|
92
75
|
const headers = new Headers(compactMap({
|
|
93
76
|
Accept: "application/json",
|
|
94
|
-
"X-On-Behalf-Of": encodeSimple(
|
|
95
|
-
"X-On-Behalf-Of",
|
|
96
|
-
payload["X-On-Behalf-Of"],
|
|
97
|
-
{ explode: false, charEncoding: "none" },
|
|
98
|
-
),
|
|
99
77
|
}));
|
|
100
78
|
|
|
101
79
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
@@ -133,7 +111,6 @@ async function $do(
|
|
|
133
111
|
baseURL: options?.serverURL,
|
|
134
112
|
path: path,
|
|
135
113
|
headers: headers,
|
|
136
|
-
body: body,
|
|
137
114
|
userAgent: client._options.userAgent,
|
|
138
115
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
139
116
|
}, options);
|
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import { SDKCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
6
|
import { matchStatusCode } from "../lib/http.js";
|
|
8
7
|
import * as M from "../lib/matchers.js";
|
|
9
8
|
import { compactMap } from "../lib/primitives.js";
|
|
10
|
-
import { safeParse } from "../lib/schemas.js";
|
|
11
9
|
import { RequestOptions } from "../lib/sdks.js";
|
|
12
10
|
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
13
11
|
import { pathToFunc } from "../lib/url.js";
|
|
@@ -22,7 +20,6 @@ import {
|
|
|
22
20
|
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
23
21
|
import { SDKError } from "../models/errors/sdkerror.js";
|
|
24
22
|
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
23
|
import { APICall, APIPromise } from "../types/async.js";
|
|
27
24
|
import { Result } from "../types/fp.js";
|
|
28
25
|
|
|
@@ -30,11 +27,10 @@ import { Result } from "../types/fp.js";
|
|
|
30
27
|
* Start feedback export
|
|
31
28
|
*
|
|
32
29
|
* @remarks
|
|
33
|
-
* Starts a background job to export all feedback data to parquet files in S3/R2. Only one export can run simultaneously.
|
|
30
|
+
* Starts a background job to export all feedback data across every tenant to parquet files in S3/R2. Only one export can run simultaneously. Restricted to cluster administrators.
|
|
34
31
|
*/
|
|
35
32
|
export function llmFeedbackStartExport(
|
|
36
33
|
client: SDKCore,
|
|
37
|
-
request: operations.StartExportFeedbackRequest,
|
|
38
34
|
options?: RequestOptions,
|
|
39
35
|
): APIPromise<
|
|
40
36
|
Result<
|
|
@@ -51,14 +47,12 @@ export function llmFeedbackStartExport(
|
|
|
51
47
|
> {
|
|
52
48
|
return new APIPromise($do(
|
|
53
49
|
client,
|
|
54
|
-
request,
|
|
55
50
|
options,
|
|
56
51
|
));
|
|
57
52
|
}
|
|
58
53
|
|
|
59
54
|
async function $do(
|
|
60
55
|
client: SDKCore,
|
|
61
|
-
request: operations.StartExportFeedbackRequest,
|
|
62
56
|
options?: RequestOptions,
|
|
63
57
|
): Promise<
|
|
64
58
|
[
|
|
@@ -76,27 +70,10 @@ async function $do(
|
|
|
76
70
|
APICall,
|
|
77
71
|
]
|
|
78
72
|
> {
|
|
79
|
-
const parsed = safeParse(
|
|
80
|
-
request,
|
|
81
|
-
(value) =>
|
|
82
|
-
operations.StartExportFeedbackRequest$outboundSchema.parse(value),
|
|
83
|
-
"Input validation failed",
|
|
84
|
-
);
|
|
85
|
-
if (!parsed.ok) {
|
|
86
|
-
return [parsed, { status: "invalid" }];
|
|
87
|
-
}
|
|
88
|
-
const payload = parsed.value;
|
|
89
|
-
const body = null;
|
|
90
|
-
|
|
91
73
|
const path = pathToFunc("/api/v1/llm/feedback/export")();
|
|
92
74
|
|
|
93
75
|
const headers = new Headers(compactMap({
|
|
94
76
|
Accept: "application/json",
|
|
95
|
-
"X-On-Behalf-Of": encodeSimple(
|
|
96
|
-
"X-On-Behalf-Of",
|
|
97
|
-
payload["X-On-Behalf-Of"],
|
|
98
|
-
{ explode: false, charEncoding: "none" },
|
|
99
|
-
),
|
|
100
77
|
}));
|
|
101
78
|
|
|
102
79
|
const secConfig = await extractSecurity(client._options.bearerAuth);
|
|
@@ -134,7 +111,6 @@ async function $do(
|
|
|
134
111
|
baseURL: options?.serverURL,
|
|
135
112
|
path: path,
|
|
136
113
|
headers: headers,
|
|
137
|
-
body: body,
|
|
138
114
|
userAgent: client._options.userAgent,
|
|
139
115
|
timeoutMs: options?.timeoutMs || client._options.timeoutMs || -1,
|
|
140
116
|
}, options);
|
package/src/lib/config.ts
CHANGED
|
@@ -65,7 +65,7 @@ export function serverURLFromOptions(options: SDKOptions): URL | null {
|
|
|
65
65
|
export const SDK_METADATA = {
|
|
66
66
|
language: "typescript",
|
|
67
67
|
openapiDocVersion: "1.1.0",
|
|
68
|
-
sdkVersion: "0.51.
|
|
68
|
+
sdkVersion: "0.51.8",
|
|
69
69
|
genVersion: "2.918.4",
|
|
70
|
-
userAgent: "speakeasy-sdk/typescript 0.51.
|
|
70
|
+
userAgent: "speakeasy-sdk/typescript 0.51.8 2.918.4 1.1.0 @meetkai/mka1",
|
|
71
71
|
} as const;
|
package/src/mcp-server/server.ts
CHANGED
|
@@ -146,6 +146,8 @@ import { tool$llmFeedbackBatchGetCompletionFeedback } from "./tools/llmFeedbackB
|
|
|
146
146
|
import { tool$llmFeedbackBatchGetResponseFeedback } from "./tools/llmFeedbackBatchGetResponseFeedback.js";
|
|
147
147
|
import { tool$llmFeedbackCreateCompletionFeedback } from "./tools/llmFeedbackCreateCompletionFeedback.js";
|
|
148
148
|
import { tool$llmFeedbackCreateResponseFeedback } from "./tools/llmFeedbackCreateResponseFeedback.js";
|
|
149
|
+
import { tool$llmFeedbackExportCompletionFeedback } from "./tools/llmFeedbackExportCompletionFeedback.js";
|
|
150
|
+
import { tool$llmFeedbackExportResponseFeedback } from "./tools/llmFeedbackExportResponseFeedback.js";
|
|
149
151
|
import { tool$llmFeedbackGetCompletionFeedback } from "./tools/llmFeedbackGetCompletionFeedback.js";
|
|
150
152
|
import { tool$llmFeedbackGetExportStatus } from "./tools/llmFeedbackGetExportStatus.js";
|
|
151
153
|
import { tool$llmFeedbackGetResponseFeedback } from "./tools/llmFeedbackGetResponseFeedback.js";
|
|
@@ -352,7 +354,7 @@ export function createMCPServer(deps: {
|
|
|
352
354
|
}) {
|
|
353
355
|
const server = new McpServer({
|
|
354
356
|
name: "SDK",
|
|
355
|
-
version: "0.51.
|
|
357
|
+
version: "0.51.8",
|
|
356
358
|
});
|
|
357
359
|
|
|
358
360
|
const client = new SDKCore({
|
|
@@ -497,6 +499,8 @@ export function createMCPServer(deps: {
|
|
|
497
499
|
tool(tool$llmFeedbackGetResponseFeedback);
|
|
498
500
|
tool(tool$llmFeedbackUpdateResponseFeedback);
|
|
499
501
|
tool(tool$llmFeedbackBatchGetResponseFeedback);
|
|
502
|
+
tool(tool$llmFeedbackExportCompletionFeedback);
|
|
503
|
+
tool(tool$llmFeedbackExportResponseFeedback);
|
|
500
504
|
tool(tool$llmFeedbackStartExport);
|
|
501
505
|
tool(tool$llmFeedbackGetExportStatus);
|
|
502
506
|
tool(tool$llmFilesUpload);
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { llmFeedbackExportCompletionFeedback } from "../../funcs/llmFeedbackExportCompletionFeedback.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ExportCompletionFeedbackRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$llmFeedbackExportCompletionFeedback: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "llm-feedback-export-completion-feedback",
|
|
17
|
+
description: `Export completion feedback as CSV
|
|
18
|
+
|
|
19
|
+
Synchronously exports the completion feedback entries visible to the caller as a CSV file, ordered by the creation date of the underlying request. Visibility matches the list endpoint: callers see their own feedback; org owners and admins see their whole team. Supports filtering by rating. The export is capped at 50,000 rows; when the cap is hit the response carries an X-Export-Truncated header and older rows (with the default descending order) are omitted.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await llmFeedbackExportCompletionFeedback(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value.result;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { llmFeedbackExportResponseFeedback } from "../../funcs/llmFeedbackExportResponseFeedback.js";
|
|
6
|
+
import * as operations from "../../models/operations/index.js";
|
|
7
|
+
import { formatResult, ToolDefinition } from "../tools.js";
|
|
8
|
+
|
|
9
|
+
const args = {
|
|
10
|
+
request: operations.ExportResponseFeedbackRequest$inboundSchema,
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export const tool$llmFeedbackExportResponseFeedback: ToolDefinition<
|
|
14
|
+
typeof args
|
|
15
|
+
> = {
|
|
16
|
+
name: "llm-feedback-export-response-feedback",
|
|
17
|
+
description: `Export response feedback as CSV
|
|
18
|
+
|
|
19
|
+
Synchronously exports the response feedback entries visible to the caller as a CSV file, ordered by the creation date of the underlying request. Visibility matches the list endpoint: callers see their own feedback; org owners and admins see their whole team. Supports filtering by rating. The export is capped at 50,000 rows; when the cap is hit the response carries an X-Export-Truncated header and older rows (with the default descending order) are omitted.`,
|
|
20
|
+
args,
|
|
21
|
+
tool: async (client, args, ctx) => {
|
|
22
|
+
const [result, apiCall] = await llmFeedbackExportResponseFeedback(
|
|
23
|
+
client,
|
|
24
|
+
args.request,
|
|
25
|
+
{ fetchOptions: { signal: ctx.signal } },
|
|
26
|
+
).$inspect();
|
|
27
|
+
|
|
28
|
+
if (!result.ok) {
|
|
29
|
+
return {
|
|
30
|
+
content: [{ type: "text", text: result.error.message }],
|
|
31
|
+
isError: true,
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
const value = result.value.result;
|
|
36
|
+
|
|
37
|
+
return formatResult(value, apiCall);
|
|
38
|
+
},
|
|
39
|
+
};
|