@orq-ai/node 4.8.0-rc.13 → 4.8.0-rc.15
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 +39 -44
- 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/index.d.ts +0 -1
- package/models/operations/index.d.ts.map +1 -1
- package/models/operations/index.js +0 -1
- package/models/operations/index.js.map +1 -1
- 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/sdk/sdk.d.ts +0 -3
- package/sdk/sdk.d.ts.map +1 -1
- package/sdk/sdk.js +0 -4
- package/sdk/sdk.js.map +1 -1
- 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/index.ts +0 -1
- 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/src/sdk/sdk.ts +0 -6
- package/funcs/modelsList.d.ts +0 -17
- package/funcs/modelsList.d.ts.map +0 -1
- package/funcs/modelsList.js +0 -117
- package/funcs/modelsList.js.map +0 -1
- package/models/operations/listmodels.d.ts +0 -90
- package/models/operations/listmodels.d.ts.map +0 -1
- package/models/operations/listmodels.js +0 -112
- package/models/operations/listmodels.js.map +0 -1
- package/sdk/models.d.ts +0 -12
- package/sdk/models.d.ts.map +0 -1
- package/sdk/models.js +0 -22
- package/sdk/models.js.map +0 -1
- package/src/funcs/modelsList.ts +0 -165
- package/src/models/operations/listmodels.ts +0 -169
- package/src/sdk/models.ts +0 -27
package/src/funcs/modelsList.ts
DELETED
|
@@ -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
|
-
}
|
|
@@ -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 { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
9
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
10
|
-
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
11
|
-
|
|
12
|
-
export type ListModelsRequest = {
|
|
13
|
-
autorouter?: boolean | null | undefined;
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export const ListModelsObject = {
|
|
17
|
-
List: "list",
|
|
18
|
-
} as const;
|
|
19
|
-
export type ListModelsObject = ClosedEnum<typeof ListModelsObject>;
|
|
20
|
-
|
|
21
|
-
/**
|
|
22
|
-
* The modality of the model
|
|
23
|
-
*/
|
|
24
|
-
export const ListModelsType = {
|
|
25
|
-
Chat: "chat",
|
|
26
|
-
Completion: "completion",
|
|
27
|
-
Embedding: "embedding",
|
|
28
|
-
Image: "image",
|
|
29
|
-
Tts: "tts",
|
|
30
|
-
Stt: "stt",
|
|
31
|
-
Rerank: "rerank",
|
|
32
|
-
Ocr: "ocr",
|
|
33
|
-
Moderation: "moderation",
|
|
34
|
-
Vision: "vision",
|
|
35
|
-
} as const;
|
|
36
|
-
/**
|
|
37
|
-
* The modality of the model
|
|
38
|
-
*/
|
|
39
|
-
export type ListModelsType = ClosedEnum<typeof ListModelsType>;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Describe the provider of the model. Every model with `vendor` is publicly available, while models with `workspace` are private.
|
|
43
|
-
*/
|
|
44
|
-
export const OwnedBy = {
|
|
45
|
-
Vendor: "vendor",
|
|
46
|
-
Workspace: "workspace",
|
|
47
|
-
} as const;
|
|
48
|
-
/**
|
|
49
|
-
* Describe the provider of the model. Every model with `vendor` is publicly available, while models with `workspace` are private.
|
|
50
|
-
*/
|
|
51
|
-
export type OwnedBy = ClosedEnum<typeof OwnedBy>;
|
|
52
|
-
|
|
53
|
-
/**
|
|
54
|
-
* Describes a model offering that can be used with the API
|
|
55
|
-
*/
|
|
56
|
-
export type ListModelsData = {
|
|
57
|
-
/**
|
|
58
|
-
* The model identifier, which can be referenced in the API endpoints.
|
|
59
|
-
*/
|
|
60
|
-
id: string;
|
|
61
|
-
/**
|
|
62
|
-
* The timestamp of the model creation
|
|
63
|
-
*/
|
|
64
|
-
created: number;
|
|
65
|
-
/**
|
|
66
|
-
* The modality of the model
|
|
67
|
-
*/
|
|
68
|
-
type: ListModelsType;
|
|
69
|
-
/**
|
|
70
|
-
* Describe the provider of the model. Every model with `vendor` is publicly available, while models with `workspace` are private.
|
|
71
|
-
*/
|
|
72
|
-
ownedBy: OwnedBy;
|
|
73
|
-
};
|
|
74
|
-
|
|
75
|
-
/**
|
|
76
|
-
* A list of model objects.
|
|
77
|
-
*/
|
|
78
|
-
export type ListModelsResponseBody = {
|
|
79
|
-
object: ListModelsObject;
|
|
80
|
-
data: Array<ListModelsData>;
|
|
81
|
-
hasMore: boolean;
|
|
82
|
-
};
|
|
83
|
-
|
|
84
|
-
/** @internal */
|
|
85
|
-
export type ListModelsRequest$Outbound = {
|
|
86
|
-
autorouter?: boolean | null | undefined;
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
/** @internal */
|
|
90
|
-
export const ListModelsRequest$outboundSchema: z.ZodType<
|
|
91
|
-
ListModelsRequest$Outbound,
|
|
92
|
-
z.ZodTypeDef,
|
|
93
|
-
ListModelsRequest
|
|
94
|
-
> = z.object({
|
|
95
|
-
autorouter: z.nullable(z.boolean()).optional(),
|
|
96
|
-
});
|
|
97
|
-
|
|
98
|
-
export function listModelsRequestToJSON(
|
|
99
|
-
listModelsRequest: ListModelsRequest,
|
|
100
|
-
): string {
|
|
101
|
-
return JSON.stringify(
|
|
102
|
-
ListModelsRequest$outboundSchema.parse(listModelsRequest),
|
|
103
|
-
);
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
/** @internal */
|
|
107
|
-
export const ListModelsObject$inboundSchema: z.ZodNativeEnum<
|
|
108
|
-
typeof ListModelsObject
|
|
109
|
-
> = z.nativeEnum(ListModelsObject);
|
|
110
|
-
|
|
111
|
-
/** @internal */
|
|
112
|
-
export const ListModelsType$inboundSchema: z.ZodNativeEnum<
|
|
113
|
-
typeof ListModelsType
|
|
114
|
-
> = z.nativeEnum(ListModelsType);
|
|
115
|
-
|
|
116
|
-
/** @internal */
|
|
117
|
-
export const OwnedBy$inboundSchema: z.ZodNativeEnum<typeof OwnedBy> = z
|
|
118
|
-
.nativeEnum(OwnedBy);
|
|
119
|
-
|
|
120
|
-
/** @internal */
|
|
121
|
-
export const ListModelsData$inboundSchema: z.ZodType<
|
|
122
|
-
ListModelsData,
|
|
123
|
-
z.ZodTypeDef,
|
|
124
|
-
unknown
|
|
125
|
-
> = z.object({
|
|
126
|
-
id: z.string(),
|
|
127
|
-
created: z.number(),
|
|
128
|
-
type: ListModelsType$inboundSchema,
|
|
129
|
-
owned_by: OwnedBy$inboundSchema,
|
|
130
|
-
}).transform((v) => {
|
|
131
|
-
return remap$(v, {
|
|
132
|
-
"owned_by": "ownedBy",
|
|
133
|
-
});
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
export function listModelsDataFromJSON(
|
|
137
|
-
jsonString: string,
|
|
138
|
-
): SafeParseResult<ListModelsData, SDKValidationError> {
|
|
139
|
-
return safeParse(
|
|
140
|
-
jsonString,
|
|
141
|
-
(x) => ListModelsData$inboundSchema.parse(JSON.parse(x)),
|
|
142
|
-
`Failed to parse 'ListModelsData' from JSON`,
|
|
143
|
-
);
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
/** @internal */
|
|
147
|
-
export const ListModelsResponseBody$inboundSchema: z.ZodType<
|
|
148
|
-
ListModelsResponseBody,
|
|
149
|
-
z.ZodTypeDef,
|
|
150
|
-
unknown
|
|
151
|
-
> = z.object({
|
|
152
|
-
object: ListModelsObject$inboundSchema,
|
|
153
|
-
data: z.array(z.lazy(() => ListModelsData$inboundSchema)),
|
|
154
|
-
has_more: z.boolean(),
|
|
155
|
-
}).transform((v) => {
|
|
156
|
-
return remap$(v, {
|
|
157
|
-
"has_more": "hasMore",
|
|
158
|
-
});
|
|
159
|
-
});
|
|
160
|
-
|
|
161
|
-
export function listModelsResponseBodyFromJSON(
|
|
162
|
-
jsonString: string,
|
|
163
|
-
): SafeParseResult<ListModelsResponseBody, SDKValidationError> {
|
|
164
|
-
return safeParse(
|
|
165
|
-
jsonString,
|
|
166
|
-
(x) => ListModelsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
167
|
-
`Failed to parse 'ListModelsResponseBody' from JSON`,
|
|
168
|
-
);
|
|
169
|
-
}
|
package/src/sdk/models.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
|
|
5
|
-
import { modelsList } from "../funcs/modelsList.js";
|
|
6
|
-
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
7
|
-
import * as operations from "../models/operations/index.js";
|
|
8
|
-
import { unwrapAsync } from "../types/fp.js";
|
|
9
|
-
|
|
10
|
-
export class Models extends ClientSDK {
|
|
11
|
-
/**
|
|
12
|
-
* List models
|
|
13
|
-
*
|
|
14
|
-
* @remarks
|
|
15
|
-
* Lists the currently available models, and provides basic information about each one such as the owner and availability.
|
|
16
|
-
*/
|
|
17
|
-
async list(
|
|
18
|
-
request?: operations.ListModelsRequest | undefined,
|
|
19
|
-
options?: RequestOptions,
|
|
20
|
-
): Promise<operations.ListModelsResponseBody> {
|
|
21
|
-
return unwrapAsync(modelsList(
|
|
22
|
-
this,
|
|
23
|
-
request,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
}
|