@orq-ai/node 4.7.6 → 4.7.7
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/jsr.json +1 -1
- package/lib/config.d.ts +2 -2
- package/lib/config.js +2 -2
- package/models/components/reasoningpart.js +1 -1
- package/models/operations/createcontact.js +1 -1
- package/models/operations/createdataset.js +1 -1
- package/models/operations/createdatasetitem.js +4 -4
- package/models/operations/createdatasource.js +1 -1
- package/models/operations/createeval.js +16 -16
- package/models/operations/createidentity.js +1 -1
- package/models/operations/createtool.js +6 -6
- package/models/operations/getalltools.js +6 -6
- package/models/operations/getevals.js +16 -16
- package/models/operations/getv2humanevals.js +6 -6
- package/models/operations/getv2humanevalsets.js +2 -2
- package/models/operations/getv2humanevalsetsid.js +2 -2
- package/models/operations/getv2humanevalsid.js +6 -6
- package/models/operations/listdatasetdatapoints.js +4 -4
- package/models/operations/listdatasets.js +1 -1
- package/models/operations/listdatasources.js +1 -1
- package/models/operations/listidentities.js +1 -1
- package/models/operations/patchv2humanevalsetsid.js +2 -2
- package/models/operations/patchv2humanevalsid.js +12 -12
- package/models/operations/postv2feedbackevaluation.js +3 -3
- package/models/operations/postv2humanevals.js +12 -12
- package/models/operations/postv2humanevalsets.js +2 -2
- package/models/operations/retrievedatapoint.js +4 -4
- package/models/operations/retrievedataset.js +1 -1
- package/models/operations/retrievedatasource.js +1 -1
- package/models/operations/retrieveidentity.js +1 -1
- package/models/operations/retrievetool.js +6 -6
- package/models/operations/runagent.js +1 -1
- package/models/operations/streamrunagent.js +1 -1
- package/models/operations/updatedatapoint.js +4 -4
- package/models/operations/updatedataset.js +1 -1
- package/models/operations/updatedatasource.js +1 -1
- package/models/operations/updateeval.js +16 -16
- package/models/operations/updateidentity.js +1 -1
- package/models/operations/updatetool.js +7 -7
- package/package.json +1 -1
- package/packages/orq-rc/examples/{postV2Feedback.example.ts → postV2FeedbackEvaluationRemove.example.ts} +2 -4
- package/packages/orq-rc/src/funcs/{evaluatorsGetV2EvaluatorsIdVersions.ts → evalsGetV2EvaluatorsIdVersions.ts} +1 -1
- package/packages/orq-rc/src/funcs/{postV2Feedback.ts → feedbackPostV2Feedback.ts} +5 -5
- package/packages/orq-rc/src/funcs/{postV2FeedbackRemove.ts → feedbackPostV2FeedbackRemove.ts} +1 -1
- package/packages/orq-rc/src/funcs/{guardrailRulesGet.ts → guardrailRulesRetrieve.ts} +1 -1
- package/packages/orq-rc/src/funcs/knowledgeCreateChunks.ts +4 -4
- package/packages/orq-rc/src/funcs/{policiesGet.ts → policiesRetrieve.ts} +1 -1
- package/packages/orq-rc/src/funcs/{routingRulesGet.ts → routingRulesRetrieve.ts} +1 -1
- package/packages/orq-rc/src/lib/config.ts +2 -2
- package/packages/orq-rc/src/models/components/reasoningpart.ts +1 -1
- package/packages/orq-rc/src/models/errors/index.ts +0 -5
- package/packages/orq-rc/src/models/errors/postv2feedback.ts +8 -8
- package/packages/orq-rc/src/models/operations/createchunk.ts +7 -7
- package/packages/orq-rc/src/models/operations/createcontact.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +4 -4
- package/packages/orq-rc/src/models/operations/createdatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/createeval.ts +36 -42
- package/packages/orq-rc/src/models/operations/createidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/createknowledge.ts +17 -19
- package/packages/orq-rc/src/models/operations/createprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/createresponse.ts +11 -11
- package/packages/orq-rc/src/models/operations/createtool.ts +6 -6
- package/packages/orq-rc/src/models/operations/deploymentinvoke.ts +1 -0
- package/packages/orq-rc/src/models/operations/deployments.ts +1 -0
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +1 -0
- package/packages/orq-rc/src/models/operations/getallprompts.ts +1 -0
- package/packages/orq-rc/src/models/operations/getalltools.ts +6 -6
- package/packages/orq-rc/src/models/operations/getevals.ts +16 -16
- package/packages/orq-rc/src/models/operations/getoneprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/getpromptversion.ts +1 -0
- package/packages/orq-rc/src/models/operations/getv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/index.ts +0 -6
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/packages/orq-rc/src/models/operations/listdatasets.ts +1 -1
- package/packages/orq-rc/src/models/operations/listdatasources.ts +1 -1
- package/packages/orq-rc/src/models/operations/listidentities.ts +1 -1
- package/packages/orq-rc/src/models/operations/listpromptversions.ts +1 -0
- package/packages/orq-rc/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/packages/orq-rc/src/models/operations/postv2feedbackremove.ts +8 -8
- package/packages/orq-rc/src/models/operations/postv2humanevalsets.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrieveidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/retrievetool.ts +6 -6
- package/packages/orq-rc/src/models/operations/runagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/streamrunagent.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +4 -4
- package/packages/orq-rc/src/models/operations/updatedataset.ts +1 -1
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/updateidentity.ts +1 -1
- package/packages/orq-rc/src/models/operations/updateprompt.ts +1 -0
- package/packages/orq-rc/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/sdk/evals.ts +18 -0
- package/packages/orq-rc/src/sdk/feedback.ts +33 -0
- package/packages/orq-rc/src/sdk/guardrailrules.ts +3 -3
- package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
- package/packages/orq-rc/src/sdk/policies.ts +3 -3
- package/packages/orq-rc/src/sdk/routingrules.ts +3 -3
- package/packages/orq-rc/src/sdk/sdk.ts +6 -96
- package/src/lib/config.ts +2 -2
- package/src/models/components/reasoningpart.ts +1 -1
- package/src/models/operations/createcontact.ts +1 -1
- package/src/models/operations/createdataset.ts +1 -1
- package/src/models/operations/createdatasetitem.ts +4 -4
- package/src/models/operations/createdatasource.ts +1 -1
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/createidentity.ts +1 -1
- package/src/models/operations/createtool.ts +6 -6
- package/src/models/operations/getalltools.ts +6 -6
- package/src/models/operations/getevals.ts +16 -16
- package/src/models/operations/getv2humanevals.ts +6 -6
- package/src/models/operations/getv2humanevalsets.ts +2 -2
- package/src/models/operations/getv2humanevalsetsid.ts +2 -2
- package/src/models/operations/getv2humanevalsid.ts +6 -6
- package/src/models/operations/listdatasetdatapoints.ts +4 -4
- package/src/models/operations/listdatasets.ts +1 -1
- package/src/models/operations/listdatasources.ts +1 -1
- package/src/models/operations/listidentities.ts +1 -1
- package/src/models/operations/patchv2humanevalsetsid.ts +2 -2
- package/src/models/operations/patchv2humanevalsid.ts +12 -12
- package/src/models/operations/postv2feedbackevaluation.ts +3 -3
- package/src/models/operations/postv2humanevals.ts +12 -12
- package/src/models/operations/postv2humanevalsets.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +4 -4
- package/src/models/operations/retrievedataset.ts +1 -1
- package/src/models/operations/retrievedatasource.ts +1 -1
- package/src/models/operations/retrieveidentity.ts +1 -1
- package/src/models/operations/retrievetool.ts +6 -6
- package/src/models/operations/runagent.ts +1 -1
- package/src/models/operations/streamrunagent.ts +1 -1
- package/src/models/operations/updatedatapoint.ts +4 -4
- package/src/models/operations/updatedataset.ts +1 -1
- package/src/models/operations/updatedatasource.ts +1 -1
- package/src/models/operations/updateeval.ts +16 -16
- package/src/models/operations/updateidentity.ts +1 -1
- package/src/models/operations/updatetool.ts +7 -7
- package/packages/orq-rc/src/funcs/deleteV2HumanEvalsId.ts +0 -169
- package/packages/orq-rc/src/funcs/getV2HumanEvals.ts +0 -169
- package/packages/orq-rc/src/funcs/getV2HumanEvalsId.ts +0 -168
- package/packages/orq-rc/src/funcs/modelsList.ts +0 -165
- package/packages/orq-rc/src/funcs/patchV2HumanEvalsId.ts +0 -170
- package/packages/orq-rc/src/funcs/postV2HumanEvals.ts +0 -168
- package/packages/orq-rc/src/models/errors/deletev2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2humanevals.ts +0 -51
- package/packages/orq-rc/src/models/errors/getv2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/patchv2humanevalsid.ts +0 -51
- package/packages/orq-rc/src/models/errors/postv2humanevals.ts +0 -51
- package/packages/orq-rc/src/models/operations/deletev2humanevalsid.ts +0 -67
- package/packages/orq-rc/src/models/operations/getv2humanevals.ts +0 -696
- package/packages/orq-rc/src/models/operations/getv2humanevalsid.ts +0 -707
- package/packages/orq-rc/src/models/operations/listmodels.ts +0 -169
- package/packages/orq-rc/src/models/operations/patchv2humanevalsid.ts +0 -1362
- package/packages/orq-rc/src/models/operations/postv2humanevals.ts +0 -1193
- package/packages/orq-rc/src/sdk/evaluators.ts +0 -27
- package/packages/orq-rc/src/sdk/models.ts +0 -27
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.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
|
-
export function deleteV2HumanEvalsId(
|
|
29
|
-
client: OrqCore,
|
|
30
|
-
request: operations.DeleteV2HumanEvalsIdRequest,
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): APIPromise<
|
|
33
|
-
Result<
|
|
34
|
-
operations.DeleteV2HumanEvalsIdResponseBody,
|
|
35
|
-
| errors.DeleteV2HumanEvalsIdResponseBody
|
|
36
|
-
| OrqError
|
|
37
|
-
| ResponseValidationError
|
|
38
|
-
| ConnectionError
|
|
39
|
-
| RequestAbortedError
|
|
40
|
-
| RequestTimeoutError
|
|
41
|
-
| InvalidRequestError
|
|
42
|
-
| UnexpectedClientError
|
|
43
|
-
| SDKValidationError
|
|
44
|
-
>
|
|
45
|
-
> {
|
|
46
|
-
return new APIPromise($do(
|
|
47
|
-
client,
|
|
48
|
-
request,
|
|
49
|
-
options,
|
|
50
|
-
));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function $do(
|
|
54
|
-
client: OrqCore,
|
|
55
|
-
request: operations.DeleteV2HumanEvalsIdRequest,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<
|
|
58
|
-
[
|
|
59
|
-
Result<
|
|
60
|
-
operations.DeleteV2HumanEvalsIdResponseBody,
|
|
61
|
-
| errors.DeleteV2HumanEvalsIdResponseBody
|
|
62
|
-
| OrqError
|
|
63
|
-
| ResponseValidationError
|
|
64
|
-
| ConnectionError
|
|
65
|
-
| RequestAbortedError
|
|
66
|
-
| RequestTimeoutError
|
|
67
|
-
| InvalidRequestError
|
|
68
|
-
| UnexpectedClientError
|
|
69
|
-
| SDKValidationError
|
|
70
|
-
>,
|
|
71
|
-
APICall,
|
|
72
|
-
]
|
|
73
|
-
> {
|
|
74
|
-
const parsed = safeParse(
|
|
75
|
-
request,
|
|
76
|
-
(value) =>
|
|
77
|
-
operations.DeleteV2HumanEvalsIdRequest$outboundSchema.parse(value),
|
|
78
|
-
"Input validation failed",
|
|
79
|
-
);
|
|
80
|
-
if (!parsed.ok) {
|
|
81
|
-
return [parsed, { status: "invalid" }];
|
|
82
|
-
}
|
|
83
|
-
const payload = parsed.value;
|
|
84
|
-
const body = null;
|
|
85
|
-
|
|
86
|
-
const pathParams = {
|
|
87
|
-
id: encodeSimple("id", payload.id, {
|
|
88
|
-
explode: false,
|
|
89
|
-
charEncoding: "percent",
|
|
90
|
-
}),
|
|
91
|
-
};
|
|
92
|
-
const path = pathToFunc("/v2/human-evals/{id}")(pathParams);
|
|
93
|
-
|
|
94
|
-
const headers = new Headers(compactMap({
|
|
95
|
-
Accept: "application/json",
|
|
96
|
-
}));
|
|
97
|
-
|
|
98
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
99
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
100
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
101
|
-
|
|
102
|
-
const context = {
|
|
103
|
-
options: client._options,
|
|
104
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
105
|
-
operationID: "delete_/v2/human-evals/{id}",
|
|
106
|
-
oAuth2Scopes: null,
|
|
107
|
-
|
|
108
|
-
resolvedSecurity: requestSecurity,
|
|
109
|
-
|
|
110
|
-
securitySource: client._options.apiKey,
|
|
111
|
-
retryConfig: options?.retries
|
|
112
|
-
|| client._options.retryConfig
|
|
113
|
-
|| { strategy: "none" },
|
|
114
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
const requestRes = client._createRequest(context, {
|
|
118
|
-
security: requestSecurity,
|
|
119
|
-
method: "DELETE",
|
|
120
|
-
baseURL: options?.serverURL,
|
|
121
|
-
path: path,
|
|
122
|
-
headers: headers,
|
|
123
|
-
body: body,
|
|
124
|
-
userAgent: client._options.userAgent,
|
|
125
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
126
|
-
}, options);
|
|
127
|
-
if (!requestRes.ok) {
|
|
128
|
-
return [requestRes, { status: "invalid" }];
|
|
129
|
-
}
|
|
130
|
-
const req = requestRes.value;
|
|
131
|
-
|
|
132
|
-
const doResult = await client._do(req, {
|
|
133
|
-
context,
|
|
134
|
-
errorCodes: ["404", "4XX", "5XX"],
|
|
135
|
-
retryConfig: context.retryConfig,
|
|
136
|
-
retryCodes: context.retryCodes,
|
|
137
|
-
});
|
|
138
|
-
if (!doResult.ok) {
|
|
139
|
-
return [doResult, { status: "request-error", request: req }];
|
|
140
|
-
}
|
|
141
|
-
const response = doResult.value;
|
|
142
|
-
|
|
143
|
-
const responseFields = {
|
|
144
|
-
HttpMeta: { Response: response, Request: req },
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const [result] = await M.match<
|
|
148
|
-
operations.DeleteV2HumanEvalsIdResponseBody,
|
|
149
|
-
| errors.DeleteV2HumanEvalsIdResponseBody
|
|
150
|
-
| OrqError
|
|
151
|
-
| ResponseValidationError
|
|
152
|
-
| ConnectionError
|
|
153
|
-
| RequestAbortedError
|
|
154
|
-
| RequestTimeoutError
|
|
155
|
-
| InvalidRequestError
|
|
156
|
-
| UnexpectedClientError
|
|
157
|
-
| SDKValidationError
|
|
158
|
-
>(
|
|
159
|
-
M.json(200, operations.DeleteV2HumanEvalsIdResponseBody$inboundSchema),
|
|
160
|
-
M.jsonErr(404, errors.DeleteV2HumanEvalsIdResponseBody$inboundSchema),
|
|
161
|
-
M.fail("4XX"),
|
|
162
|
-
M.fail("5XX"),
|
|
163
|
-
)(response, req, { extraFields: responseFields });
|
|
164
|
-
if (!result.ok) {
|
|
165
|
-
return [result, { status: "complete", request: req, response }];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return [result, { status: "complete", request: req, response }];
|
|
169
|
-
}
|
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import * as z from "zod/v3";
|
|
6
|
-
import { OrqCore } from "../core.js";
|
|
7
|
-
import { encodeFormQuery } from "../lib/encodings.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 * as errors from "../models/errors/index.js";
|
|
22
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
23
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
24
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
25
|
-
import * as operations from "../models/operations/index.js";
|
|
26
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
27
|
-
import { Result } from "../types/fp.js";
|
|
28
|
-
|
|
29
|
-
export function getV2HumanEvals(
|
|
30
|
-
client: OrqCore,
|
|
31
|
-
request?: operations.GetV2HumanEvalsRequest | undefined,
|
|
32
|
-
options?: RequestOptions,
|
|
33
|
-
): APIPromise<
|
|
34
|
-
Result<
|
|
35
|
-
Array<operations.ResponseBody>,
|
|
36
|
-
| errors.GetV2HumanEvalsResponseBody
|
|
37
|
-
| OrqError
|
|
38
|
-
| ResponseValidationError
|
|
39
|
-
| ConnectionError
|
|
40
|
-
| RequestAbortedError
|
|
41
|
-
| RequestTimeoutError
|
|
42
|
-
| InvalidRequestError
|
|
43
|
-
| UnexpectedClientError
|
|
44
|
-
| SDKValidationError
|
|
45
|
-
>
|
|
46
|
-
> {
|
|
47
|
-
return new APIPromise($do(
|
|
48
|
-
client,
|
|
49
|
-
request,
|
|
50
|
-
options,
|
|
51
|
-
));
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
async function $do(
|
|
55
|
-
client: OrqCore,
|
|
56
|
-
request?: operations.GetV2HumanEvalsRequest | undefined,
|
|
57
|
-
options?: RequestOptions,
|
|
58
|
-
): Promise<
|
|
59
|
-
[
|
|
60
|
-
Result<
|
|
61
|
-
Array<operations.ResponseBody>,
|
|
62
|
-
| errors.GetV2HumanEvalsResponseBody
|
|
63
|
-
| OrqError
|
|
64
|
-
| ResponseValidationError
|
|
65
|
-
| ConnectionError
|
|
66
|
-
| RequestAbortedError
|
|
67
|
-
| RequestTimeoutError
|
|
68
|
-
| InvalidRequestError
|
|
69
|
-
| UnexpectedClientError
|
|
70
|
-
| SDKValidationError
|
|
71
|
-
>,
|
|
72
|
-
APICall,
|
|
73
|
-
]
|
|
74
|
-
> {
|
|
75
|
-
const parsed = safeParse(
|
|
76
|
-
request,
|
|
77
|
-
(value) =>
|
|
78
|
-
operations.GetV2HumanEvalsRequest$outboundSchema.optional().parse(value),
|
|
79
|
-
"Input validation failed",
|
|
80
|
-
);
|
|
81
|
-
if (!parsed.ok) {
|
|
82
|
-
return [parsed, { status: "invalid" }];
|
|
83
|
-
}
|
|
84
|
-
const payload = parsed.value;
|
|
85
|
-
const body = null;
|
|
86
|
-
|
|
87
|
-
const path = pathToFunc("/v2/human-evals")();
|
|
88
|
-
|
|
89
|
-
const query = encodeFormQuery({
|
|
90
|
-
"project_id": payload?.project_id,
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
const headers = new Headers(compactMap({
|
|
94
|
-
Accept: "application/json",
|
|
95
|
-
}));
|
|
96
|
-
|
|
97
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
98
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
99
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
|
-
|
|
101
|
-
const context = {
|
|
102
|
-
options: client._options,
|
|
103
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
-
operationID: "get_/v2/human-evals",
|
|
105
|
-
oAuth2Scopes: null,
|
|
106
|
-
|
|
107
|
-
resolvedSecurity: requestSecurity,
|
|
108
|
-
|
|
109
|
-
securitySource: client._options.apiKey,
|
|
110
|
-
retryConfig: options?.retries
|
|
111
|
-
|| client._options.retryConfig
|
|
112
|
-
|| { strategy: "none" },
|
|
113
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const requestRes = client._createRequest(context, {
|
|
117
|
-
security: requestSecurity,
|
|
118
|
-
method: "GET",
|
|
119
|
-
baseURL: options?.serverURL,
|
|
120
|
-
path: path,
|
|
121
|
-
headers: headers,
|
|
122
|
-
query: query,
|
|
123
|
-
body: body,
|
|
124
|
-
userAgent: client._options.userAgent,
|
|
125
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
126
|
-
}, options);
|
|
127
|
-
if (!requestRes.ok) {
|
|
128
|
-
return [requestRes, { status: "invalid" }];
|
|
129
|
-
}
|
|
130
|
-
const req = requestRes.value;
|
|
131
|
-
|
|
132
|
-
const doResult = await client._do(req, {
|
|
133
|
-
context,
|
|
134
|
-
errorCodes: ["404", "4XX", "5XX"],
|
|
135
|
-
retryConfig: context.retryConfig,
|
|
136
|
-
retryCodes: context.retryCodes,
|
|
137
|
-
});
|
|
138
|
-
if (!doResult.ok) {
|
|
139
|
-
return [doResult, { status: "request-error", request: req }];
|
|
140
|
-
}
|
|
141
|
-
const response = doResult.value;
|
|
142
|
-
|
|
143
|
-
const responseFields = {
|
|
144
|
-
HttpMeta: { Response: response, Request: req },
|
|
145
|
-
};
|
|
146
|
-
|
|
147
|
-
const [result] = await M.match<
|
|
148
|
-
Array<operations.ResponseBody>,
|
|
149
|
-
| errors.GetV2HumanEvalsResponseBody
|
|
150
|
-
| OrqError
|
|
151
|
-
| ResponseValidationError
|
|
152
|
-
| ConnectionError
|
|
153
|
-
| RequestAbortedError
|
|
154
|
-
| RequestTimeoutError
|
|
155
|
-
| InvalidRequestError
|
|
156
|
-
| UnexpectedClientError
|
|
157
|
-
| SDKValidationError
|
|
158
|
-
>(
|
|
159
|
-
M.json(200, z.array(operations.ResponseBody$inboundSchema)),
|
|
160
|
-
M.jsonErr(404, errors.GetV2HumanEvalsResponseBody$inboundSchema),
|
|
161
|
-
M.fail("4XX"),
|
|
162
|
-
M.fail("5XX"),
|
|
163
|
-
)(response, req, { extraFields: responseFields });
|
|
164
|
-
if (!result.ok) {
|
|
165
|
-
return [result, { status: "complete", request: req, response }];
|
|
166
|
-
}
|
|
167
|
-
|
|
168
|
-
return [result, { status: "complete", request: req, response }];
|
|
169
|
-
}
|
|
@@ -1,168 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeSimple } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import * as errors from "../models/errors/index.js";
|
|
21
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
22
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.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
|
-
export function getV2HumanEvalsId(
|
|
29
|
-
client: OrqCore,
|
|
30
|
-
request: operations.GetV2HumanEvalsIdRequest,
|
|
31
|
-
options?: RequestOptions,
|
|
32
|
-
): APIPromise<
|
|
33
|
-
Result<
|
|
34
|
-
operations.GetV2HumanEvalsIdResponseBody,
|
|
35
|
-
| errors.GetV2HumanEvalsIdResponseBody
|
|
36
|
-
| OrqError
|
|
37
|
-
| ResponseValidationError
|
|
38
|
-
| ConnectionError
|
|
39
|
-
| RequestAbortedError
|
|
40
|
-
| RequestTimeoutError
|
|
41
|
-
| InvalidRequestError
|
|
42
|
-
| UnexpectedClientError
|
|
43
|
-
| SDKValidationError
|
|
44
|
-
>
|
|
45
|
-
> {
|
|
46
|
-
return new APIPromise($do(
|
|
47
|
-
client,
|
|
48
|
-
request,
|
|
49
|
-
options,
|
|
50
|
-
));
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
async function $do(
|
|
54
|
-
client: OrqCore,
|
|
55
|
-
request: operations.GetV2HumanEvalsIdRequest,
|
|
56
|
-
options?: RequestOptions,
|
|
57
|
-
): Promise<
|
|
58
|
-
[
|
|
59
|
-
Result<
|
|
60
|
-
operations.GetV2HumanEvalsIdResponseBody,
|
|
61
|
-
| errors.GetV2HumanEvalsIdResponseBody
|
|
62
|
-
| OrqError
|
|
63
|
-
| ResponseValidationError
|
|
64
|
-
| ConnectionError
|
|
65
|
-
| RequestAbortedError
|
|
66
|
-
| RequestTimeoutError
|
|
67
|
-
| InvalidRequestError
|
|
68
|
-
| UnexpectedClientError
|
|
69
|
-
| SDKValidationError
|
|
70
|
-
>,
|
|
71
|
-
APICall,
|
|
72
|
-
]
|
|
73
|
-
> {
|
|
74
|
-
const parsed = safeParse(
|
|
75
|
-
request,
|
|
76
|
-
(value) => operations.GetV2HumanEvalsIdRequest$outboundSchema.parse(value),
|
|
77
|
-
"Input validation failed",
|
|
78
|
-
);
|
|
79
|
-
if (!parsed.ok) {
|
|
80
|
-
return [parsed, { status: "invalid" }];
|
|
81
|
-
}
|
|
82
|
-
const payload = parsed.value;
|
|
83
|
-
const body = null;
|
|
84
|
-
|
|
85
|
-
const pathParams = {
|
|
86
|
-
id: encodeSimple("id", payload.id, {
|
|
87
|
-
explode: false,
|
|
88
|
-
charEncoding: "percent",
|
|
89
|
-
}),
|
|
90
|
-
};
|
|
91
|
-
const path = pathToFunc("/v2/human-evals/{id}")(pathParams);
|
|
92
|
-
|
|
93
|
-
const headers = new Headers(compactMap({
|
|
94
|
-
Accept: "application/json",
|
|
95
|
-
}));
|
|
96
|
-
|
|
97
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
98
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
99
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
100
|
-
|
|
101
|
-
const context = {
|
|
102
|
-
options: client._options,
|
|
103
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
104
|
-
operationID: "get_/v2/human-evals/{id}",
|
|
105
|
-
oAuth2Scopes: null,
|
|
106
|
-
|
|
107
|
-
resolvedSecurity: requestSecurity,
|
|
108
|
-
|
|
109
|
-
securitySource: client._options.apiKey,
|
|
110
|
-
retryConfig: options?.retries
|
|
111
|
-
|| client._options.retryConfig
|
|
112
|
-
|| { strategy: "none" },
|
|
113
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
114
|
-
};
|
|
115
|
-
|
|
116
|
-
const requestRes = client._createRequest(context, {
|
|
117
|
-
security: requestSecurity,
|
|
118
|
-
method: "GET",
|
|
119
|
-
baseURL: options?.serverURL,
|
|
120
|
-
path: path,
|
|
121
|
-
headers: headers,
|
|
122
|
-
body: body,
|
|
123
|
-
userAgent: client._options.userAgent,
|
|
124
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
125
|
-
}, options);
|
|
126
|
-
if (!requestRes.ok) {
|
|
127
|
-
return [requestRes, { status: "invalid" }];
|
|
128
|
-
}
|
|
129
|
-
const req = requestRes.value;
|
|
130
|
-
|
|
131
|
-
const doResult = await client._do(req, {
|
|
132
|
-
context,
|
|
133
|
-
errorCodes: ["404", "4XX", "5XX"],
|
|
134
|
-
retryConfig: context.retryConfig,
|
|
135
|
-
retryCodes: context.retryCodes,
|
|
136
|
-
});
|
|
137
|
-
if (!doResult.ok) {
|
|
138
|
-
return [doResult, { status: "request-error", request: req }];
|
|
139
|
-
}
|
|
140
|
-
const response = doResult.value;
|
|
141
|
-
|
|
142
|
-
const responseFields = {
|
|
143
|
-
HttpMeta: { Response: response, Request: req },
|
|
144
|
-
};
|
|
145
|
-
|
|
146
|
-
const [result] = await M.match<
|
|
147
|
-
operations.GetV2HumanEvalsIdResponseBody,
|
|
148
|
-
| errors.GetV2HumanEvalsIdResponseBody
|
|
149
|
-
| OrqError
|
|
150
|
-
| ResponseValidationError
|
|
151
|
-
| ConnectionError
|
|
152
|
-
| RequestAbortedError
|
|
153
|
-
| RequestTimeoutError
|
|
154
|
-
| InvalidRequestError
|
|
155
|
-
| UnexpectedClientError
|
|
156
|
-
| SDKValidationError
|
|
157
|
-
>(
|
|
158
|
-
M.json(200, operations.GetV2HumanEvalsIdResponseBody$inboundSchema),
|
|
159
|
-
M.jsonErr(404, errors.GetV2HumanEvalsIdResponseBody$inboundSchema),
|
|
160
|
-
M.fail("4XX"),
|
|
161
|
-
M.fail("5XX"),
|
|
162
|
-
)(response, req, { extraFields: responseFields });
|
|
163
|
-
if (!result.ok) {
|
|
164
|
-
return [result, { status: "complete", request: req, response }];
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
return [result, { status: "complete", request: req, response }];
|
|
168
|
-
}
|
|
@@ -1,165 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { OrqCore } from "../core.js";
|
|
6
|
-
import { encodeFormQuery } from "../lib/encodings.js";
|
|
7
|
-
import * as M from "../lib/matchers.js";
|
|
8
|
-
import { compactMap } from "../lib/primitives.js";
|
|
9
|
-
import { safeParse } from "../lib/schemas.js";
|
|
10
|
-
import { RequestOptions } from "../lib/sdks.js";
|
|
11
|
-
import { extractSecurity, resolveGlobalSecurity } from "../lib/security.js";
|
|
12
|
-
import { pathToFunc } from "../lib/url.js";
|
|
13
|
-
import {
|
|
14
|
-
ConnectionError,
|
|
15
|
-
InvalidRequestError,
|
|
16
|
-
RequestAbortedError,
|
|
17
|
-
RequestTimeoutError,
|
|
18
|
-
UnexpectedClientError,
|
|
19
|
-
} from "../models/errors/httpclienterrors.js";
|
|
20
|
-
import { OrqError } from "../models/errors/orqerror.js";
|
|
21
|
-
import { ResponseValidationError } from "../models/errors/responsevalidationerror.js";
|
|
22
|
-
import { SDKValidationError } from "../models/errors/sdkvalidationerror.js";
|
|
23
|
-
import * as operations from "../models/operations/index.js";
|
|
24
|
-
import { APICall, APIPromise } from "../types/async.js";
|
|
25
|
-
import { Result } from "../types/fp.js";
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* List models
|
|
29
|
-
*
|
|
30
|
-
* @remarks
|
|
31
|
-
* Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
32
|
-
*/
|
|
33
|
-
export function modelsList(
|
|
34
|
-
client: OrqCore,
|
|
35
|
-
request?: operations.ListModelsRequest | undefined,
|
|
36
|
-
options?: RequestOptions,
|
|
37
|
-
): APIPromise<
|
|
38
|
-
Result<
|
|
39
|
-
operations.ListModelsResponseBody,
|
|
40
|
-
| OrqError
|
|
41
|
-
| ResponseValidationError
|
|
42
|
-
| ConnectionError
|
|
43
|
-
| RequestAbortedError
|
|
44
|
-
| RequestTimeoutError
|
|
45
|
-
| InvalidRequestError
|
|
46
|
-
| UnexpectedClientError
|
|
47
|
-
| SDKValidationError
|
|
48
|
-
>
|
|
49
|
-
> {
|
|
50
|
-
return new APIPromise($do(
|
|
51
|
-
client,
|
|
52
|
-
request,
|
|
53
|
-
options,
|
|
54
|
-
));
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
async function $do(
|
|
58
|
-
client: OrqCore,
|
|
59
|
-
request?: operations.ListModelsRequest | undefined,
|
|
60
|
-
options?: RequestOptions,
|
|
61
|
-
): Promise<
|
|
62
|
-
[
|
|
63
|
-
Result<
|
|
64
|
-
operations.ListModelsResponseBody,
|
|
65
|
-
| OrqError
|
|
66
|
-
| ResponseValidationError
|
|
67
|
-
| ConnectionError
|
|
68
|
-
| RequestAbortedError
|
|
69
|
-
| RequestTimeoutError
|
|
70
|
-
| InvalidRequestError
|
|
71
|
-
| UnexpectedClientError
|
|
72
|
-
| SDKValidationError
|
|
73
|
-
>,
|
|
74
|
-
APICall,
|
|
75
|
-
]
|
|
76
|
-
> {
|
|
77
|
-
const parsed = safeParse(
|
|
78
|
-
request,
|
|
79
|
-
(value) =>
|
|
80
|
-
operations.ListModelsRequest$outboundSchema.optional().parse(value),
|
|
81
|
-
"Input validation failed",
|
|
82
|
-
);
|
|
83
|
-
if (!parsed.ok) {
|
|
84
|
-
return [parsed, { status: "invalid" }];
|
|
85
|
-
}
|
|
86
|
-
const payload = parsed.value;
|
|
87
|
-
const body = null;
|
|
88
|
-
|
|
89
|
-
const path = pathToFunc("/v2/models")();
|
|
90
|
-
|
|
91
|
-
const query = encodeFormQuery({
|
|
92
|
-
"autorouter": payload?.autorouter,
|
|
93
|
-
});
|
|
94
|
-
|
|
95
|
-
const headers = new Headers(compactMap({
|
|
96
|
-
Accept: "application/json",
|
|
97
|
-
}));
|
|
98
|
-
|
|
99
|
-
const secConfig = await extractSecurity(client._options.apiKey);
|
|
100
|
-
const securityInput = secConfig == null ? {} : { apiKey: secConfig };
|
|
101
|
-
const requestSecurity = resolveGlobalSecurity(securityInput);
|
|
102
|
-
|
|
103
|
-
const context = {
|
|
104
|
-
options: client._options,
|
|
105
|
-
baseURL: options?.serverURL ?? client._baseURL ?? "",
|
|
106
|
-
operationID: "listModels",
|
|
107
|
-
oAuth2Scopes: null,
|
|
108
|
-
|
|
109
|
-
resolvedSecurity: requestSecurity,
|
|
110
|
-
|
|
111
|
-
securitySource: client._options.apiKey,
|
|
112
|
-
retryConfig: options?.retries
|
|
113
|
-
|| client._options.retryConfig
|
|
114
|
-
|| { strategy: "none" },
|
|
115
|
-
retryCodes: options?.retryCodes || ["429", "500", "502", "503", "504"],
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
const requestRes = client._createRequest(context, {
|
|
119
|
-
security: requestSecurity,
|
|
120
|
-
method: "GET",
|
|
121
|
-
baseURL: options?.serverURL,
|
|
122
|
-
path: path,
|
|
123
|
-
headers: headers,
|
|
124
|
-
query: query,
|
|
125
|
-
body: body,
|
|
126
|
-
userAgent: client._options.userAgent,
|
|
127
|
-
timeoutMs: options?.timeoutMs || client._options.timeoutMs || 600000,
|
|
128
|
-
}, options);
|
|
129
|
-
if (!requestRes.ok) {
|
|
130
|
-
return [requestRes, { status: "invalid" }];
|
|
131
|
-
}
|
|
132
|
-
const req = requestRes.value;
|
|
133
|
-
|
|
134
|
-
const doResult = await client._do(req, {
|
|
135
|
-
context,
|
|
136
|
-
errorCodes: ["4XX", "5XX"],
|
|
137
|
-
retryConfig: context.retryConfig,
|
|
138
|
-
retryCodes: context.retryCodes,
|
|
139
|
-
});
|
|
140
|
-
if (!doResult.ok) {
|
|
141
|
-
return [doResult, { status: "request-error", request: req }];
|
|
142
|
-
}
|
|
143
|
-
const response = doResult.value;
|
|
144
|
-
|
|
145
|
-
const [result] = await M.match<
|
|
146
|
-
operations.ListModelsResponseBody,
|
|
147
|
-
| OrqError
|
|
148
|
-
| ResponseValidationError
|
|
149
|
-
| ConnectionError
|
|
150
|
-
| RequestAbortedError
|
|
151
|
-
| RequestTimeoutError
|
|
152
|
-
| InvalidRequestError
|
|
153
|
-
| UnexpectedClientError
|
|
154
|
-
| SDKValidationError
|
|
155
|
-
>(
|
|
156
|
-
M.json(200, operations.ListModelsResponseBody$inboundSchema),
|
|
157
|
-
M.fail("4XX"),
|
|
158
|
-
M.fail("5XX"),
|
|
159
|
-
)(response, req);
|
|
160
|
-
if (!result.ok) {
|
|
161
|
-
return [result, { status: "complete", request: req, response }];
|
|
162
|
-
}
|
|
163
|
-
|
|
164
|
-
return [result, { status: "complete", request: req, response }];
|
|
165
|
-
}
|