@orq-ai/node 3.11.7 → 3.11.9
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/bin/mcp-server.js +104 -104
- package/bin/mcp-server.js.map +26 -26
- package/examples/package-lock.json +1 -1
- package/jsr.json +1 -1
- package/lib/config.d.ts +3 -3
- package/lib/config.js +3 -3
- package/lib/config.js.map +1 -1
- package/mcp-server/mcp-server.js +1 -1
- package/mcp-server/server.js +1 -1
- package/models/operations/createcontact.js +2 -2
- package/models/operations/createdataset.js +2 -2
- package/models/operations/createdatasetitem.js +2 -2
- package/models/operations/createdatasource.js +2 -2
- package/models/operations/createeval.js +16 -16
- package/models/operations/fileget.js +2 -2
- package/models/operations/filelist.js +2 -2
- package/models/operations/fileupload.js +2 -2
- package/models/operations/getevals.js +28 -28
- package/models/operations/listcontacts.js +2 -2
- package/models/operations/listdatasetdatapoints.js +2 -2
- package/models/operations/listdatasets.js +2 -2
- package/models/operations/listdatasources.js +2 -2
- package/models/operations/retrievecontact.js +2 -2
- package/models/operations/retrievedatapoint.js +2 -2
- package/models/operations/retrievedataset.js +2 -2
- package/models/operations/retrievedatasource.js +2 -2
- package/models/operations/updatecontact.js +2 -2
- package/models/operations/updatedatapoint.js +2 -2
- package/models/operations/updatedataset.js +2 -2
- package/models/operations/updatedatasource.js +2 -2
- package/models/operations/updateeval.js +16 -16
- package/package.json +1 -1
- package/packages/orq-rc/README.md +128 -87
- package/packages/orq-rc/docs/sdks/batches/README.md +307 -0
- package/packages/orq-rc/docs/sdks/knowledge/README.md +1 -1
- package/packages/orq-rc/docs/sdks/proxy/README.md +1284 -0
- package/packages/orq-rc/examples/package-lock.json +1 -1
- package/packages/orq-rc/jsr.json +1 -1
- package/packages/orq-rc/package-lock.json +2 -2
- package/packages/orq-rc/package.json +1 -1
- package/packages/orq-rc/src/funcs/batchesCancel.ts +166 -0
- package/packages/orq-rc/src/funcs/batchesCreate.ts +160 -0
- package/packages/orq-rc/src/funcs/batchesList.ts +165 -0
- package/packages/orq-rc/src/funcs/batchesRetrieve.ts +166 -0
- package/packages/orq-rc/src/funcs/knowledgeSearch.ts +1 -1
- package/packages/orq-rc/src/funcs/proxyAudioSpeech.ts +159 -0
- package/packages/orq-rc/src/funcs/proxyAudioTranscriptions.ts +233 -0
- package/packages/orq-rc/src/funcs/proxyAudioTranslations.ts +223 -0
- package/packages/orq-rc/src/funcs/proxyChatCompletions.ts +172 -0
- package/packages/orq-rc/src/funcs/proxyCompletions.ts +168 -0
- package/packages/orq-rc/src/funcs/proxyEmbeddings.ts +161 -0
- package/packages/orq-rc/src/funcs/proxyImagesEdit.ts +173 -0
- package/packages/orq-rc/src/funcs/proxyImagesGenerate.ts +163 -0
- package/packages/orq-rc/src/funcs/proxyImagesVariation.ts +179 -0
- package/packages/orq-rc/src/funcs/proxyModerations.ts +164 -0
- package/packages/orq-rc/src/funcs/proxyRerank.ts +158 -0
- package/packages/orq-rc/src/funcs/proxyResponsesCreate.ts +171 -0
- package/packages/orq-rc/src/lib/config.ts +3 -3
- package/packages/orq-rc/src/mcp-server/mcp-server.ts +1 -1
- package/packages/orq-rc/src/mcp-server/server.ts +33 -1
- package/packages/orq-rc/src/mcp-server/tools/batchesCancel.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesCreate.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesList.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/batchesRetrieve.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/knowledgeSearch.ts +1 -1
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioSpeech.ts +33 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranscriptions.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyAudioTranslations.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyChatCompletions.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyCompletions.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyEmbeddings.ts +37 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesEdit.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesGenerate.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyImagesVariation.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyModerations.ts +35 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyRerank.ts +36 -0
- package/packages/orq-rc/src/mcp-server/tools/proxyResponsesCreate.ts +37 -0
- package/packages/orq-rc/src/models/components/deployments.ts +861 -0
- package/packages/orq-rc/src/models/components/index.ts +1 -0
- package/packages/orq-rc/src/models/components/publiccontact.ts +114 -0
- package/packages/orq-rc/src/models/errors/index.ts +3 -0
- package/packages/orq-rc/src/models/errors/postv2proxyaudiotranscriptions.ts +163 -0
- package/packages/orq-rc/src/models/errors/postv2proxyaudiotranslations.ts +162 -0
- package/packages/orq-rc/src/models/errors/postv2proxymoderations.ts +151 -0
- package/packages/orq-rc/src/models/operations/cancelbatch.ts +474 -0
- package/packages/orq-rc/src/models/operations/createbatch.ts +531 -0
- package/packages/orq-rc/src/models/operations/createbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/createchatcompletion.ts +11697 -0
- package/packages/orq-rc/src/models/operations/createcontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/createdatasetitem.ts +2205 -1224
- package/packages/orq-rc/src/models/operations/createdatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/createeval.ts +16 -16
- package/packages/orq-rc/src/models/operations/createresponse.ts +6908 -0
- package/packages/orq-rc/src/models/operations/deploymentcreatemetric.ts +2282 -1214
- package/packages/orq-rc/src/models/operations/deploymentgetconfig.ts +938 -51
- package/packages/orq-rc/src/models/operations/deploymentstream.ts +1471 -305
- package/packages/orq-rc/src/models/operations/fileget.ts +2 -2
- package/packages/orq-rc/src/models/operations/filelist.ts +2 -2
- package/packages/orq-rc/src/models/operations/fileupload.ts +2 -2
- package/packages/orq-rc/src/models/operations/getbudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/getevals.ts +107 -92
- package/packages/orq-rc/src/models/operations/index.ts +16 -0
- package/packages/orq-rc/src/models/operations/listbatches.ts +570 -0
- package/packages/orq-rc/src/models/operations/listbudgets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listcontacts.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasetdatapoints.ts +498 -2
- package/packages/orq-rc/src/models/operations/listdatasets.ts +2 -2
- package/packages/orq-rc/src/models/operations/listdatasources.ts +2 -2
- package/packages/orq-rc/src/models/operations/postv2proxyaudiospeech.ts +393 -0
- package/packages/orq-rc/src/models/operations/postv2proxyaudiotranscriptions.ts +731 -0
- package/packages/orq-rc/src/models/operations/postv2proxyaudiotranslations.ts +741 -0
- package/packages/orq-rc/src/models/operations/postv2proxycompletions.ts +5831 -0
- package/packages/orq-rc/src/models/operations/postv2proxyembeddings.ts +878 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesedits.ts +596 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesgenerations.ts +1107 -0
- package/packages/orq-rc/src/models/operations/postv2proxyimagesvariations.ts +592 -0
- package/packages/orq-rc/src/models/operations/postv2proxymoderations.ts +802 -0
- package/packages/orq-rc/src/models/operations/postv2proxyrerank.ts +526 -0
- package/packages/orq-rc/src/models/operations/retrievebatch.ts +474 -0
- package/packages/orq-rc/src/models/operations/retrievecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatapoint.ts +478 -2
- package/packages/orq-rc/src/models/operations/retrievedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/retrievedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatebudget.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatecontact.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatapoint.ts +974 -2
- package/packages/orq-rc/src/models/operations/updatedataset.ts +2 -2
- package/packages/orq-rc/src/models/operations/updatedatasource.ts +2 -2
- package/packages/orq-rc/src/models/operations/updateeval.ts +16 -16
- package/packages/orq-rc/src/sdk/batches.ts +81 -0
- package/packages/orq-rc/src/sdk/knowledge.ts +1 -1
- package/packages/orq-rc/src/sdk/proxy.ts +211 -0
- package/packages/orq-rc/src/sdk/sdk.ts +12 -0
- package/packages/orq-rc/temp/example.ts +5 -0
- package/src/lib/config.ts +3 -3
- package/src/mcp-server/mcp-server.ts +1 -1
- package/src/mcp-server/server.ts +1 -1
- package/src/models/operations/createcontact.ts +2 -2
- package/src/models/operations/createdataset.ts +2 -2
- package/src/models/operations/createdatasetitem.ts +2 -2
- package/src/models/operations/createdatasource.ts +2 -2
- package/src/models/operations/createeval.ts +16 -16
- package/src/models/operations/fileget.ts +2 -2
- package/src/models/operations/filelist.ts +2 -2
- package/src/models/operations/fileupload.ts +2 -2
- package/src/models/operations/getevals.ts +28 -28
- package/src/models/operations/listcontacts.ts +2 -2
- package/src/models/operations/listdatasetdatapoints.ts +2 -2
- package/src/models/operations/listdatasets.ts +2 -2
- package/src/models/operations/listdatasources.ts +2 -2
- package/src/models/operations/retrievecontact.ts +2 -2
- package/src/models/operations/retrievedatapoint.ts +2 -2
- package/src/models/operations/retrievedataset.ts +2 -2
- package/src/models/operations/retrievedatasource.ts +2 -2
- package/src/models/operations/updatecontact.ts +2 -2
- package/src/models/operations/updatedatapoint.ts +2 -2
- package/src/models/operations/updatedataset.ts +2 -2
- package/src/models/operations/updatedatasource.ts +2 -2
- package/src/models/operations/updateeval.ts +16 -16
|
@@ -0,0 +1,878 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod";
|
|
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 * as components from "../components/index.js";
|
|
11
|
+
import { SDKValidationError } from "../errors/sdkvalidationerror.js";
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Input text to embed, encoded as a string or array of tokens.
|
|
15
|
+
*/
|
|
16
|
+
export type PostV2ProxyEmbeddingsInput = string | Array<string>;
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Type of the document element
|
|
20
|
+
*/
|
|
21
|
+
export const PostV2ProxyEmbeddingsEncodingFormat = {
|
|
22
|
+
Base64: "base64",
|
|
23
|
+
Float: "float",
|
|
24
|
+
} as const;
|
|
25
|
+
/**
|
|
26
|
+
* Type of the document element
|
|
27
|
+
*/
|
|
28
|
+
export type PostV2ProxyEmbeddingsEncodingFormat = ClosedEnum<
|
|
29
|
+
typeof PostV2ProxyEmbeddingsEncodingFormat
|
|
30
|
+
>;
|
|
31
|
+
|
|
32
|
+
export type PostV2ProxyEmbeddingsFallbacks = {
|
|
33
|
+
/**
|
|
34
|
+
* Fallback model identifier
|
|
35
|
+
*/
|
|
36
|
+
model: string;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export const PostV2ProxyEmbeddingsType = {
|
|
40
|
+
ExactMatch: "exact_match",
|
|
41
|
+
} as const;
|
|
42
|
+
export type PostV2ProxyEmbeddingsType = ClosedEnum<
|
|
43
|
+
typeof PostV2ProxyEmbeddingsType
|
|
44
|
+
>;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Cache configuration for the request.
|
|
48
|
+
*/
|
|
49
|
+
export type PostV2ProxyEmbeddingsCache = {
|
|
50
|
+
/**
|
|
51
|
+
* Time to live for cached responses in seconds. Maximum 259200 seconds (3 days).
|
|
52
|
+
*/
|
|
53
|
+
ttl?: number | undefined;
|
|
54
|
+
type: PostV2ProxyEmbeddingsType;
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
/**
|
|
58
|
+
* Retry configuration for the request
|
|
59
|
+
*/
|
|
60
|
+
export type PostV2ProxyEmbeddingsRetry = {
|
|
61
|
+
/**
|
|
62
|
+
* Number of retry attempts (1-5)
|
|
63
|
+
*/
|
|
64
|
+
count?: number | undefined;
|
|
65
|
+
/**
|
|
66
|
+
* HTTP status codes that trigger retry logic
|
|
67
|
+
*/
|
|
68
|
+
onCodes?: Array<number> | undefined;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
export type PostV2ProxyEmbeddingsOrq = {
|
|
72
|
+
/**
|
|
73
|
+
* The name to display on the trace. If not specified, the default system name will be used.
|
|
74
|
+
*/
|
|
75
|
+
name?: string | undefined;
|
|
76
|
+
/**
|
|
77
|
+
* Array of fallback models to use if primary model fails
|
|
78
|
+
*/
|
|
79
|
+
fallbacks?: Array<PostV2ProxyEmbeddingsFallbacks> | undefined;
|
|
80
|
+
/**
|
|
81
|
+
* Cache configuration for the request.
|
|
82
|
+
*/
|
|
83
|
+
cache?: PostV2ProxyEmbeddingsCache | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* Retry configuration for the request
|
|
86
|
+
*/
|
|
87
|
+
retry?: PostV2ProxyEmbeddingsRetry | undefined;
|
|
88
|
+
/**
|
|
89
|
+
* Information about the contact making the request. If the contact does not exist, it will be created automatically.
|
|
90
|
+
*/
|
|
91
|
+
contact?: components.PublicContact | undefined;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* input
|
|
96
|
+
*/
|
|
97
|
+
export type PostV2ProxyEmbeddingsRequestBody = {
|
|
98
|
+
/**
|
|
99
|
+
* Input text to embed, encoded as a string or array of tokens.
|
|
100
|
+
*/
|
|
101
|
+
input: string | Array<string>;
|
|
102
|
+
/**
|
|
103
|
+
* ID of the model to use
|
|
104
|
+
*/
|
|
105
|
+
model: string;
|
|
106
|
+
/**
|
|
107
|
+
* Type of the document element
|
|
108
|
+
*/
|
|
109
|
+
encodingFormat?: PostV2ProxyEmbeddingsEncodingFormat | undefined;
|
|
110
|
+
/**
|
|
111
|
+
* The number of dimensions the resulting output embeddings should have.
|
|
112
|
+
*/
|
|
113
|
+
dimensions?: number | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* A unique identifier representing your end-user
|
|
116
|
+
*/
|
|
117
|
+
user?: string | undefined;
|
|
118
|
+
orq?: PostV2ProxyEmbeddingsOrq | undefined;
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
export const PostV2ProxyEmbeddingsObject = {
|
|
122
|
+
List: "list",
|
|
123
|
+
} as const;
|
|
124
|
+
export type PostV2ProxyEmbeddingsObject = ClosedEnum<
|
|
125
|
+
typeof PostV2ProxyEmbeddingsObject
|
|
126
|
+
>;
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
* The object type, which is always `embedding`.
|
|
130
|
+
*/
|
|
131
|
+
export const PostV2ProxyEmbeddingsProxyObject = {
|
|
132
|
+
Embedding: "embedding",
|
|
133
|
+
} as const;
|
|
134
|
+
/**
|
|
135
|
+
* The object type, which is always `embedding`.
|
|
136
|
+
*/
|
|
137
|
+
export type PostV2ProxyEmbeddingsProxyObject = ClosedEnum<
|
|
138
|
+
typeof PostV2ProxyEmbeddingsProxyObject
|
|
139
|
+
>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* The embedding vector, which is a list of floats. The length of vector depends on the model.
|
|
143
|
+
*/
|
|
144
|
+
export type Embedding = Array<number> | string;
|
|
145
|
+
|
|
146
|
+
export type PostV2ProxyEmbeddingsData = {
|
|
147
|
+
/**
|
|
148
|
+
* The object type, which is always `embedding`.
|
|
149
|
+
*/
|
|
150
|
+
object: PostV2ProxyEmbeddingsProxyObject;
|
|
151
|
+
/**
|
|
152
|
+
* The embedding vector, which is a list of floats. The length of vector depends on the model.
|
|
153
|
+
*/
|
|
154
|
+
embedding: Array<number> | string;
|
|
155
|
+
/**
|
|
156
|
+
* The index of the embedding in the list of embeddings.
|
|
157
|
+
*/
|
|
158
|
+
index: number;
|
|
159
|
+
};
|
|
160
|
+
|
|
161
|
+
export type PostV2ProxyEmbeddingsUsage = {
|
|
162
|
+
promptTokens: number;
|
|
163
|
+
totalTokens: number;
|
|
164
|
+
};
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Returns the embedding vector.
|
|
168
|
+
*/
|
|
169
|
+
export type PostV2ProxyEmbeddingsResponseBody = {
|
|
170
|
+
object: PostV2ProxyEmbeddingsObject;
|
|
171
|
+
data: Array<PostV2ProxyEmbeddingsData>;
|
|
172
|
+
/**
|
|
173
|
+
* ID of the model to used.
|
|
174
|
+
*/
|
|
175
|
+
model: string;
|
|
176
|
+
usage?: PostV2ProxyEmbeddingsUsage | undefined;
|
|
177
|
+
};
|
|
178
|
+
|
|
179
|
+
/** @internal */
|
|
180
|
+
export const PostV2ProxyEmbeddingsInput$inboundSchema: z.ZodType<
|
|
181
|
+
PostV2ProxyEmbeddingsInput,
|
|
182
|
+
z.ZodTypeDef,
|
|
183
|
+
unknown
|
|
184
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
185
|
+
|
|
186
|
+
/** @internal */
|
|
187
|
+
export type PostV2ProxyEmbeddingsInput$Outbound = string | Array<string>;
|
|
188
|
+
|
|
189
|
+
/** @internal */
|
|
190
|
+
export const PostV2ProxyEmbeddingsInput$outboundSchema: z.ZodType<
|
|
191
|
+
PostV2ProxyEmbeddingsInput$Outbound,
|
|
192
|
+
z.ZodTypeDef,
|
|
193
|
+
PostV2ProxyEmbeddingsInput
|
|
194
|
+
> = z.union([z.string(), z.array(z.string())]);
|
|
195
|
+
|
|
196
|
+
/**
|
|
197
|
+
* @internal
|
|
198
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
199
|
+
*/
|
|
200
|
+
export namespace PostV2ProxyEmbeddingsInput$ {
|
|
201
|
+
/** @deprecated use `PostV2ProxyEmbeddingsInput$inboundSchema` instead. */
|
|
202
|
+
export const inboundSchema = PostV2ProxyEmbeddingsInput$inboundSchema;
|
|
203
|
+
/** @deprecated use `PostV2ProxyEmbeddingsInput$outboundSchema` instead. */
|
|
204
|
+
export const outboundSchema = PostV2ProxyEmbeddingsInput$outboundSchema;
|
|
205
|
+
/** @deprecated use `PostV2ProxyEmbeddingsInput$Outbound` instead. */
|
|
206
|
+
export type Outbound = PostV2ProxyEmbeddingsInput$Outbound;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
export function postV2ProxyEmbeddingsInputToJSON(
|
|
210
|
+
postV2ProxyEmbeddingsInput: PostV2ProxyEmbeddingsInput,
|
|
211
|
+
): string {
|
|
212
|
+
return JSON.stringify(
|
|
213
|
+
PostV2ProxyEmbeddingsInput$outboundSchema.parse(postV2ProxyEmbeddingsInput),
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
export function postV2ProxyEmbeddingsInputFromJSON(
|
|
218
|
+
jsonString: string,
|
|
219
|
+
): SafeParseResult<PostV2ProxyEmbeddingsInput, SDKValidationError> {
|
|
220
|
+
return safeParse(
|
|
221
|
+
jsonString,
|
|
222
|
+
(x) => PostV2ProxyEmbeddingsInput$inboundSchema.parse(JSON.parse(x)),
|
|
223
|
+
`Failed to parse 'PostV2ProxyEmbeddingsInput' from JSON`,
|
|
224
|
+
);
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
/** @internal */
|
|
228
|
+
export const PostV2ProxyEmbeddingsEncodingFormat$inboundSchema: z.ZodNativeEnum<
|
|
229
|
+
typeof PostV2ProxyEmbeddingsEncodingFormat
|
|
230
|
+
> = z.nativeEnum(PostV2ProxyEmbeddingsEncodingFormat);
|
|
231
|
+
|
|
232
|
+
/** @internal */
|
|
233
|
+
export const PostV2ProxyEmbeddingsEncodingFormat$outboundSchema:
|
|
234
|
+
z.ZodNativeEnum<typeof PostV2ProxyEmbeddingsEncodingFormat> =
|
|
235
|
+
PostV2ProxyEmbeddingsEncodingFormat$inboundSchema;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* @internal
|
|
239
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
240
|
+
*/
|
|
241
|
+
export namespace PostV2ProxyEmbeddingsEncodingFormat$ {
|
|
242
|
+
/** @deprecated use `PostV2ProxyEmbeddingsEncodingFormat$inboundSchema` instead. */
|
|
243
|
+
export const inboundSchema =
|
|
244
|
+
PostV2ProxyEmbeddingsEncodingFormat$inboundSchema;
|
|
245
|
+
/** @deprecated use `PostV2ProxyEmbeddingsEncodingFormat$outboundSchema` instead. */
|
|
246
|
+
export const outboundSchema =
|
|
247
|
+
PostV2ProxyEmbeddingsEncodingFormat$outboundSchema;
|
|
248
|
+
}
|
|
249
|
+
|
|
250
|
+
/** @internal */
|
|
251
|
+
export const PostV2ProxyEmbeddingsFallbacks$inboundSchema: z.ZodType<
|
|
252
|
+
PostV2ProxyEmbeddingsFallbacks,
|
|
253
|
+
z.ZodTypeDef,
|
|
254
|
+
unknown
|
|
255
|
+
> = z.object({
|
|
256
|
+
model: z.string(),
|
|
257
|
+
});
|
|
258
|
+
|
|
259
|
+
/** @internal */
|
|
260
|
+
export type PostV2ProxyEmbeddingsFallbacks$Outbound = {
|
|
261
|
+
model: string;
|
|
262
|
+
};
|
|
263
|
+
|
|
264
|
+
/** @internal */
|
|
265
|
+
export const PostV2ProxyEmbeddingsFallbacks$outboundSchema: z.ZodType<
|
|
266
|
+
PostV2ProxyEmbeddingsFallbacks$Outbound,
|
|
267
|
+
z.ZodTypeDef,
|
|
268
|
+
PostV2ProxyEmbeddingsFallbacks
|
|
269
|
+
> = z.object({
|
|
270
|
+
model: z.string(),
|
|
271
|
+
});
|
|
272
|
+
|
|
273
|
+
/**
|
|
274
|
+
* @internal
|
|
275
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
276
|
+
*/
|
|
277
|
+
export namespace PostV2ProxyEmbeddingsFallbacks$ {
|
|
278
|
+
/** @deprecated use `PostV2ProxyEmbeddingsFallbacks$inboundSchema` instead. */
|
|
279
|
+
export const inboundSchema = PostV2ProxyEmbeddingsFallbacks$inboundSchema;
|
|
280
|
+
/** @deprecated use `PostV2ProxyEmbeddingsFallbacks$outboundSchema` instead. */
|
|
281
|
+
export const outboundSchema = PostV2ProxyEmbeddingsFallbacks$outboundSchema;
|
|
282
|
+
/** @deprecated use `PostV2ProxyEmbeddingsFallbacks$Outbound` instead. */
|
|
283
|
+
export type Outbound = PostV2ProxyEmbeddingsFallbacks$Outbound;
|
|
284
|
+
}
|
|
285
|
+
|
|
286
|
+
export function postV2ProxyEmbeddingsFallbacksToJSON(
|
|
287
|
+
postV2ProxyEmbeddingsFallbacks: PostV2ProxyEmbeddingsFallbacks,
|
|
288
|
+
): string {
|
|
289
|
+
return JSON.stringify(
|
|
290
|
+
PostV2ProxyEmbeddingsFallbacks$outboundSchema.parse(
|
|
291
|
+
postV2ProxyEmbeddingsFallbacks,
|
|
292
|
+
),
|
|
293
|
+
);
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export function postV2ProxyEmbeddingsFallbacksFromJSON(
|
|
297
|
+
jsonString: string,
|
|
298
|
+
): SafeParseResult<PostV2ProxyEmbeddingsFallbacks, SDKValidationError> {
|
|
299
|
+
return safeParse(
|
|
300
|
+
jsonString,
|
|
301
|
+
(x) => PostV2ProxyEmbeddingsFallbacks$inboundSchema.parse(JSON.parse(x)),
|
|
302
|
+
`Failed to parse 'PostV2ProxyEmbeddingsFallbacks' from JSON`,
|
|
303
|
+
);
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
/** @internal */
|
|
307
|
+
export const PostV2ProxyEmbeddingsType$inboundSchema: z.ZodNativeEnum<
|
|
308
|
+
typeof PostV2ProxyEmbeddingsType
|
|
309
|
+
> = z.nativeEnum(PostV2ProxyEmbeddingsType);
|
|
310
|
+
|
|
311
|
+
/** @internal */
|
|
312
|
+
export const PostV2ProxyEmbeddingsType$outboundSchema: z.ZodNativeEnum<
|
|
313
|
+
typeof PostV2ProxyEmbeddingsType
|
|
314
|
+
> = PostV2ProxyEmbeddingsType$inboundSchema;
|
|
315
|
+
|
|
316
|
+
/**
|
|
317
|
+
* @internal
|
|
318
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
319
|
+
*/
|
|
320
|
+
export namespace PostV2ProxyEmbeddingsType$ {
|
|
321
|
+
/** @deprecated use `PostV2ProxyEmbeddingsType$inboundSchema` instead. */
|
|
322
|
+
export const inboundSchema = PostV2ProxyEmbeddingsType$inboundSchema;
|
|
323
|
+
/** @deprecated use `PostV2ProxyEmbeddingsType$outboundSchema` instead. */
|
|
324
|
+
export const outboundSchema = PostV2ProxyEmbeddingsType$outboundSchema;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
/** @internal */
|
|
328
|
+
export const PostV2ProxyEmbeddingsCache$inboundSchema: z.ZodType<
|
|
329
|
+
PostV2ProxyEmbeddingsCache,
|
|
330
|
+
z.ZodTypeDef,
|
|
331
|
+
unknown
|
|
332
|
+
> = z.object({
|
|
333
|
+
ttl: z.number().default(1800),
|
|
334
|
+
type: PostV2ProxyEmbeddingsType$inboundSchema,
|
|
335
|
+
});
|
|
336
|
+
|
|
337
|
+
/** @internal */
|
|
338
|
+
export type PostV2ProxyEmbeddingsCache$Outbound = {
|
|
339
|
+
ttl: number;
|
|
340
|
+
type: string;
|
|
341
|
+
};
|
|
342
|
+
|
|
343
|
+
/** @internal */
|
|
344
|
+
export const PostV2ProxyEmbeddingsCache$outboundSchema: z.ZodType<
|
|
345
|
+
PostV2ProxyEmbeddingsCache$Outbound,
|
|
346
|
+
z.ZodTypeDef,
|
|
347
|
+
PostV2ProxyEmbeddingsCache
|
|
348
|
+
> = z.object({
|
|
349
|
+
ttl: z.number().default(1800),
|
|
350
|
+
type: PostV2ProxyEmbeddingsType$outboundSchema,
|
|
351
|
+
});
|
|
352
|
+
|
|
353
|
+
/**
|
|
354
|
+
* @internal
|
|
355
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
356
|
+
*/
|
|
357
|
+
export namespace PostV2ProxyEmbeddingsCache$ {
|
|
358
|
+
/** @deprecated use `PostV2ProxyEmbeddingsCache$inboundSchema` instead. */
|
|
359
|
+
export const inboundSchema = PostV2ProxyEmbeddingsCache$inboundSchema;
|
|
360
|
+
/** @deprecated use `PostV2ProxyEmbeddingsCache$outboundSchema` instead. */
|
|
361
|
+
export const outboundSchema = PostV2ProxyEmbeddingsCache$outboundSchema;
|
|
362
|
+
/** @deprecated use `PostV2ProxyEmbeddingsCache$Outbound` instead. */
|
|
363
|
+
export type Outbound = PostV2ProxyEmbeddingsCache$Outbound;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
export function postV2ProxyEmbeddingsCacheToJSON(
|
|
367
|
+
postV2ProxyEmbeddingsCache: PostV2ProxyEmbeddingsCache,
|
|
368
|
+
): string {
|
|
369
|
+
return JSON.stringify(
|
|
370
|
+
PostV2ProxyEmbeddingsCache$outboundSchema.parse(postV2ProxyEmbeddingsCache),
|
|
371
|
+
);
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
export function postV2ProxyEmbeddingsCacheFromJSON(
|
|
375
|
+
jsonString: string,
|
|
376
|
+
): SafeParseResult<PostV2ProxyEmbeddingsCache, SDKValidationError> {
|
|
377
|
+
return safeParse(
|
|
378
|
+
jsonString,
|
|
379
|
+
(x) => PostV2ProxyEmbeddingsCache$inboundSchema.parse(JSON.parse(x)),
|
|
380
|
+
`Failed to parse 'PostV2ProxyEmbeddingsCache' from JSON`,
|
|
381
|
+
);
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
/** @internal */
|
|
385
|
+
export const PostV2ProxyEmbeddingsRetry$inboundSchema: z.ZodType<
|
|
386
|
+
PostV2ProxyEmbeddingsRetry,
|
|
387
|
+
z.ZodTypeDef,
|
|
388
|
+
unknown
|
|
389
|
+
> = z.object({
|
|
390
|
+
count: z.number().default(3),
|
|
391
|
+
on_codes: z.array(z.number()).optional(),
|
|
392
|
+
}).transform((v) => {
|
|
393
|
+
return remap$(v, {
|
|
394
|
+
"on_codes": "onCodes",
|
|
395
|
+
});
|
|
396
|
+
});
|
|
397
|
+
|
|
398
|
+
/** @internal */
|
|
399
|
+
export type PostV2ProxyEmbeddingsRetry$Outbound = {
|
|
400
|
+
count: number;
|
|
401
|
+
on_codes?: Array<number> | undefined;
|
|
402
|
+
};
|
|
403
|
+
|
|
404
|
+
/** @internal */
|
|
405
|
+
export const PostV2ProxyEmbeddingsRetry$outboundSchema: z.ZodType<
|
|
406
|
+
PostV2ProxyEmbeddingsRetry$Outbound,
|
|
407
|
+
z.ZodTypeDef,
|
|
408
|
+
PostV2ProxyEmbeddingsRetry
|
|
409
|
+
> = z.object({
|
|
410
|
+
count: z.number().default(3),
|
|
411
|
+
onCodes: z.array(z.number()).optional(),
|
|
412
|
+
}).transform((v) => {
|
|
413
|
+
return remap$(v, {
|
|
414
|
+
onCodes: "on_codes",
|
|
415
|
+
});
|
|
416
|
+
});
|
|
417
|
+
|
|
418
|
+
/**
|
|
419
|
+
* @internal
|
|
420
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
421
|
+
*/
|
|
422
|
+
export namespace PostV2ProxyEmbeddingsRetry$ {
|
|
423
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRetry$inboundSchema` instead. */
|
|
424
|
+
export const inboundSchema = PostV2ProxyEmbeddingsRetry$inboundSchema;
|
|
425
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRetry$outboundSchema` instead. */
|
|
426
|
+
export const outboundSchema = PostV2ProxyEmbeddingsRetry$outboundSchema;
|
|
427
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRetry$Outbound` instead. */
|
|
428
|
+
export type Outbound = PostV2ProxyEmbeddingsRetry$Outbound;
|
|
429
|
+
}
|
|
430
|
+
|
|
431
|
+
export function postV2ProxyEmbeddingsRetryToJSON(
|
|
432
|
+
postV2ProxyEmbeddingsRetry: PostV2ProxyEmbeddingsRetry,
|
|
433
|
+
): string {
|
|
434
|
+
return JSON.stringify(
|
|
435
|
+
PostV2ProxyEmbeddingsRetry$outboundSchema.parse(postV2ProxyEmbeddingsRetry),
|
|
436
|
+
);
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
export function postV2ProxyEmbeddingsRetryFromJSON(
|
|
440
|
+
jsonString: string,
|
|
441
|
+
): SafeParseResult<PostV2ProxyEmbeddingsRetry, SDKValidationError> {
|
|
442
|
+
return safeParse(
|
|
443
|
+
jsonString,
|
|
444
|
+
(x) => PostV2ProxyEmbeddingsRetry$inboundSchema.parse(JSON.parse(x)),
|
|
445
|
+
`Failed to parse 'PostV2ProxyEmbeddingsRetry' from JSON`,
|
|
446
|
+
);
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
/** @internal */
|
|
450
|
+
export const PostV2ProxyEmbeddingsOrq$inboundSchema: z.ZodType<
|
|
451
|
+
PostV2ProxyEmbeddingsOrq,
|
|
452
|
+
z.ZodTypeDef,
|
|
453
|
+
unknown
|
|
454
|
+
> = z.object({
|
|
455
|
+
name: z.string().optional(),
|
|
456
|
+
fallbacks: z.array(z.lazy(() => PostV2ProxyEmbeddingsFallbacks$inboundSchema))
|
|
457
|
+
.optional(),
|
|
458
|
+
cache: z.lazy(() => PostV2ProxyEmbeddingsCache$inboundSchema).optional(),
|
|
459
|
+
retry: z.lazy(() => PostV2ProxyEmbeddingsRetry$inboundSchema).optional(),
|
|
460
|
+
contact: components.PublicContact$inboundSchema.optional(),
|
|
461
|
+
});
|
|
462
|
+
|
|
463
|
+
/** @internal */
|
|
464
|
+
export type PostV2ProxyEmbeddingsOrq$Outbound = {
|
|
465
|
+
name?: string | undefined;
|
|
466
|
+
fallbacks?: Array<PostV2ProxyEmbeddingsFallbacks$Outbound> | undefined;
|
|
467
|
+
cache?: PostV2ProxyEmbeddingsCache$Outbound | undefined;
|
|
468
|
+
retry?: PostV2ProxyEmbeddingsRetry$Outbound | undefined;
|
|
469
|
+
contact?: components.PublicContact$Outbound | undefined;
|
|
470
|
+
};
|
|
471
|
+
|
|
472
|
+
/** @internal */
|
|
473
|
+
export const PostV2ProxyEmbeddingsOrq$outboundSchema: z.ZodType<
|
|
474
|
+
PostV2ProxyEmbeddingsOrq$Outbound,
|
|
475
|
+
z.ZodTypeDef,
|
|
476
|
+
PostV2ProxyEmbeddingsOrq
|
|
477
|
+
> = z.object({
|
|
478
|
+
name: z.string().optional(),
|
|
479
|
+
fallbacks: z.array(
|
|
480
|
+
z.lazy(() => PostV2ProxyEmbeddingsFallbacks$outboundSchema),
|
|
481
|
+
).optional(),
|
|
482
|
+
cache: z.lazy(() => PostV2ProxyEmbeddingsCache$outboundSchema).optional(),
|
|
483
|
+
retry: z.lazy(() => PostV2ProxyEmbeddingsRetry$outboundSchema).optional(),
|
|
484
|
+
contact: components.PublicContact$outboundSchema.optional(),
|
|
485
|
+
});
|
|
486
|
+
|
|
487
|
+
/**
|
|
488
|
+
* @internal
|
|
489
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
490
|
+
*/
|
|
491
|
+
export namespace PostV2ProxyEmbeddingsOrq$ {
|
|
492
|
+
/** @deprecated use `PostV2ProxyEmbeddingsOrq$inboundSchema` instead. */
|
|
493
|
+
export const inboundSchema = PostV2ProxyEmbeddingsOrq$inboundSchema;
|
|
494
|
+
/** @deprecated use `PostV2ProxyEmbeddingsOrq$outboundSchema` instead. */
|
|
495
|
+
export const outboundSchema = PostV2ProxyEmbeddingsOrq$outboundSchema;
|
|
496
|
+
/** @deprecated use `PostV2ProxyEmbeddingsOrq$Outbound` instead. */
|
|
497
|
+
export type Outbound = PostV2ProxyEmbeddingsOrq$Outbound;
|
|
498
|
+
}
|
|
499
|
+
|
|
500
|
+
export function postV2ProxyEmbeddingsOrqToJSON(
|
|
501
|
+
postV2ProxyEmbeddingsOrq: PostV2ProxyEmbeddingsOrq,
|
|
502
|
+
): string {
|
|
503
|
+
return JSON.stringify(
|
|
504
|
+
PostV2ProxyEmbeddingsOrq$outboundSchema.parse(postV2ProxyEmbeddingsOrq),
|
|
505
|
+
);
|
|
506
|
+
}
|
|
507
|
+
|
|
508
|
+
export function postV2ProxyEmbeddingsOrqFromJSON(
|
|
509
|
+
jsonString: string,
|
|
510
|
+
): SafeParseResult<PostV2ProxyEmbeddingsOrq, SDKValidationError> {
|
|
511
|
+
return safeParse(
|
|
512
|
+
jsonString,
|
|
513
|
+
(x) => PostV2ProxyEmbeddingsOrq$inboundSchema.parse(JSON.parse(x)),
|
|
514
|
+
`Failed to parse 'PostV2ProxyEmbeddingsOrq' from JSON`,
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
/** @internal */
|
|
519
|
+
export const PostV2ProxyEmbeddingsRequestBody$inboundSchema: z.ZodType<
|
|
520
|
+
PostV2ProxyEmbeddingsRequestBody,
|
|
521
|
+
z.ZodTypeDef,
|
|
522
|
+
unknown
|
|
523
|
+
> = z.object({
|
|
524
|
+
input: z.union([z.string(), z.array(z.string())]),
|
|
525
|
+
model: z.string(),
|
|
526
|
+
encoding_format: PostV2ProxyEmbeddingsEncodingFormat$inboundSchema.default(
|
|
527
|
+
"float",
|
|
528
|
+
),
|
|
529
|
+
dimensions: z.number().optional(),
|
|
530
|
+
user: z.string().optional(),
|
|
531
|
+
orq: z.lazy(() => PostV2ProxyEmbeddingsOrq$inboundSchema).optional(),
|
|
532
|
+
}).transform((v) => {
|
|
533
|
+
return remap$(v, {
|
|
534
|
+
"encoding_format": "encodingFormat",
|
|
535
|
+
});
|
|
536
|
+
});
|
|
537
|
+
|
|
538
|
+
/** @internal */
|
|
539
|
+
export type PostV2ProxyEmbeddingsRequestBody$Outbound = {
|
|
540
|
+
input: string | Array<string>;
|
|
541
|
+
model: string;
|
|
542
|
+
encoding_format: string;
|
|
543
|
+
dimensions?: number | undefined;
|
|
544
|
+
user?: string | undefined;
|
|
545
|
+
orq?: PostV2ProxyEmbeddingsOrq$Outbound | undefined;
|
|
546
|
+
};
|
|
547
|
+
|
|
548
|
+
/** @internal */
|
|
549
|
+
export const PostV2ProxyEmbeddingsRequestBody$outboundSchema: z.ZodType<
|
|
550
|
+
PostV2ProxyEmbeddingsRequestBody$Outbound,
|
|
551
|
+
z.ZodTypeDef,
|
|
552
|
+
PostV2ProxyEmbeddingsRequestBody
|
|
553
|
+
> = z.object({
|
|
554
|
+
input: z.union([z.string(), z.array(z.string())]),
|
|
555
|
+
model: z.string(),
|
|
556
|
+
encodingFormat: PostV2ProxyEmbeddingsEncodingFormat$outboundSchema.default(
|
|
557
|
+
"float",
|
|
558
|
+
),
|
|
559
|
+
dimensions: z.number().optional(),
|
|
560
|
+
user: z.string().optional(),
|
|
561
|
+
orq: z.lazy(() => PostV2ProxyEmbeddingsOrq$outboundSchema).optional(),
|
|
562
|
+
}).transform((v) => {
|
|
563
|
+
return remap$(v, {
|
|
564
|
+
encodingFormat: "encoding_format",
|
|
565
|
+
});
|
|
566
|
+
});
|
|
567
|
+
|
|
568
|
+
/**
|
|
569
|
+
* @internal
|
|
570
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
571
|
+
*/
|
|
572
|
+
export namespace PostV2ProxyEmbeddingsRequestBody$ {
|
|
573
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRequestBody$inboundSchema` instead. */
|
|
574
|
+
export const inboundSchema = PostV2ProxyEmbeddingsRequestBody$inboundSchema;
|
|
575
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRequestBody$outboundSchema` instead. */
|
|
576
|
+
export const outboundSchema = PostV2ProxyEmbeddingsRequestBody$outboundSchema;
|
|
577
|
+
/** @deprecated use `PostV2ProxyEmbeddingsRequestBody$Outbound` instead. */
|
|
578
|
+
export type Outbound = PostV2ProxyEmbeddingsRequestBody$Outbound;
|
|
579
|
+
}
|
|
580
|
+
|
|
581
|
+
export function postV2ProxyEmbeddingsRequestBodyToJSON(
|
|
582
|
+
postV2ProxyEmbeddingsRequestBody: PostV2ProxyEmbeddingsRequestBody,
|
|
583
|
+
): string {
|
|
584
|
+
return JSON.stringify(
|
|
585
|
+
PostV2ProxyEmbeddingsRequestBody$outboundSchema.parse(
|
|
586
|
+
postV2ProxyEmbeddingsRequestBody,
|
|
587
|
+
),
|
|
588
|
+
);
|
|
589
|
+
}
|
|
590
|
+
|
|
591
|
+
export function postV2ProxyEmbeddingsRequestBodyFromJSON(
|
|
592
|
+
jsonString: string,
|
|
593
|
+
): SafeParseResult<PostV2ProxyEmbeddingsRequestBody, SDKValidationError> {
|
|
594
|
+
return safeParse(
|
|
595
|
+
jsonString,
|
|
596
|
+
(x) => PostV2ProxyEmbeddingsRequestBody$inboundSchema.parse(JSON.parse(x)),
|
|
597
|
+
`Failed to parse 'PostV2ProxyEmbeddingsRequestBody' from JSON`,
|
|
598
|
+
);
|
|
599
|
+
}
|
|
600
|
+
|
|
601
|
+
/** @internal */
|
|
602
|
+
export const PostV2ProxyEmbeddingsObject$inboundSchema: z.ZodNativeEnum<
|
|
603
|
+
typeof PostV2ProxyEmbeddingsObject
|
|
604
|
+
> = z.nativeEnum(PostV2ProxyEmbeddingsObject);
|
|
605
|
+
|
|
606
|
+
/** @internal */
|
|
607
|
+
export const PostV2ProxyEmbeddingsObject$outboundSchema: z.ZodNativeEnum<
|
|
608
|
+
typeof PostV2ProxyEmbeddingsObject
|
|
609
|
+
> = PostV2ProxyEmbeddingsObject$inboundSchema;
|
|
610
|
+
|
|
611
|
+
/**
|
|
612
|
+
* @internal
|
|
613
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
614
|
+
*/
|
|
615
|
+
export namespace PostV2ProxyEmbeddingsObject$ {
|
|
616
|
+
/** @deprecated use `PostV2ProxyEmbeddingsObject$inboundSchema` instead. */
|
|
617
|
+
export const inboundSchema = PostV2ProxyEmbeddingsObject$inboundSchema;
|
|
618
|
+
/** @deprecated use `PostV2ProxyEmbeddingsObject$outboundSchema` instead. */
|
|
619
|
+
export const outboundSchema = PostV2ProxyEmbeddingsObject$outboundSchema;
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
/** @internal */
|
|
623
|
+
export const PostV2ProxyEmbeddingsProxyObject$inboundSchema: z.ZodNativeEnum<
|
|
624
|
+
typeof PostV2ProxyEmbeddingsProxyObject
|
|
625
|
+
> = z.nativeEnum(PostV2ProxyEmbeddingsProxyObject);
|
|
626
|
+
|
|
627
|
+
/** @internal */
|
|
628
|
+
export const PostV2ProxyEmbeddingsProxyObject$outboundSchema: z.ZodNativeEnum<
|
|
629
|
+
typeof PostV2ProxyEmbeddingsProxyObject
|
|
630
|
+
> = PostV2ProxyEmbeddingsProxyObject$inboundSchema;
|
|
631
|
+
|
|
632
|
+
/**
|
|
633
|
+
* @internal
|
|
634
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
635
|
+
*/
|
|
636
|
+
export namespace PostV2ProxyEmbeddingsProxyObject$ {
|
|
637
|
+
/** @deprecated use `PostV2ProxyEmbeddingsProxyObject$inboundSchema` instead. */
|
|
638
|
+
export const inboundSchema = PostV2ProxyEmbeddingsProxyObject$inboundSchema;
|
|
639
|
+
/** @deprecated use `PostV2ProxyEmbeddingsProxyObject$outboundSchema` instead. */
|
|
640
|
+
export const outboundSchema = PostV2ProxyEmbeddingsProxyObject$outboundSchema;
|
|
641
|
+
}
|
|
642
|
+
|
|
643
|
+
/** @internal */
|
|
644
|
+
export const Embedding$inboundSchema: z.ZodType<
|
|
645
|
+
Embedding,
|
|
646
|
+
z.ZodTypeDef,
|
|
647
|
+
unknown
|
|
648
|
+
> = z.union([z.array(z.number()), z.string()]);
|
|
649
|
+
|
|
650
|
+
/** @internal */
|
|
651
|
+
export type Embedding$Outbound = Array<number> | string;
|
|
652
|
+
|
|
653
|
+
/** @internal */
|
|
654
|
+
export const Embedding$outboundSchema: z.ZodType<
|
|
655
|
+
Embedding$Outbound,
|
|
656
|
+
z.ZodTypeDef,
|
|
657
|
+
Embedding
|
|
658
|
+
> = z.union([z.array(z.number()), z.string()]);
|
|
659
|
+
|
|
660
|
+
/**
|
|
661
|
+
* @internal
|
|
662
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
663
|
+
*/
|
|
664
|
+
export namespace Embedding$ {
|
|
665
|
+
/** @deprecated use `Embedding$inboundSchema` instead. */
|
|
666
|
+
export const inboundSchema = Embedding$inboundSchema;
|
|
667
|
+
/** @deprecated use `Embedding$outboundSchema` instead. */
|
|
668
|
+
export const outboundSchema = Embedding$outboundSchema;
|
|
669
|
+
/** @deprecated use `Embedding$Outbound` instead. */
|
|
670
|
+
export type Outbound = Embedding$Outbound;
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export function embeddingToJSON(embedding: Embedding): string {
|
|
674
|
+
return JSON.stringify(Embedding$outboundSchema.parse(embedding));
|
|
675
|
+
}
|
|
676
|
+
|
|
677
|
+
export function embeddingFromJSON(
|
|
678
|
+
jsonString: string,
|
|
679
|
+
): SafeParseResult<Embedding, SDKValidationError> {
|
|
680
|
+
return safeParse(
|
|
681
|
+
jsonString,
|
|
682
|
+
(x) => Embedding$inboundSchema.parse(JSON.parse(x)),
|
|
683
|
+
`Failed to parse 'Embedding' from JSON`,
|
|
684
|
+
);
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
/** @internal */
|
|
688
|
+
export const PostV2ProxyEmbeddingsData$inboundSchema: z.ZodType<
|
|
689
|
+
PostV2ProxyEmbeddingsData,
|
|
690
|
+
z.ZodTypeDef,
|
|
691
|
+
unknown
|
|
692
|
+
> = z.object({
|
|
693
|
+
object: PostV2ProxyEmbeddingsProxyObject$inboundSchema,
|
|
694
|
+
embedding: z.union([z.array(z.number()), z.string()]),
|
|
695
|
+
index: z.number(),
|
|
696
|
+
});
|
|
697
|
+
|
|
698
|
+
/** @internal */
|
|
699
|
+
export type PostV2ProxyEmbeddingsData$Outbound = {
|
|
700
|
+
object: string;
|
|
701
|
+
embedding: Array<number> | string;
|
|
702
|
+
index: number;
|
|
703
|
+
};
|
|
704
|
+
|
|
705
|
+
/** @internal */
|
|
706
|
+
export const PostV2ProxyEmbeddingsData$outboundSchema: z.ZodType<
|
|
707
|
+
PostV2ProxyEmbeddingsData$Outbound,
|
|
708
|
+
z.ZodTypeDef,
|
|
709
|
+
PostV2ProxyEmbeddingsData
|
|
710
|
+
> = z.object({
|
|
711
|
+
object: PostV2ProxyEmbeddingsProxyObject$outboundSchema,
|
|
712
|
+
embedding: z.union([z.array(z.number()), z.string()]),
|
|
713
|
+
index: z.number(),
|
|
714
|
+
});
|
|
715
|
+
|
|
716
|
+
/**
|
|
717
|
+
* @internal
|
|
718
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
719
|
+
*/
|
|
720
|
+
export namespace PostV2ProxyEmbeddingsData$ {
|
|
721
|
+
/** @deprecated use `PostV2ProxyEmbeddingsData$inboundSchema` instead. */
|
|
722
|
+
export const inboundSchema = PostV2ProxyEmbeddingsData$inboundSchema;
|
|
723
|
+
/** @deprecated use `PostV2ProxyEmbeddingsData$outboundSchema` instead. */
|
|
724
|
+
export const outboundSchema = PostV2ProxyEmbeddingsData$outboundSchema;
|
|
725
|
+
/** @deprecated use `PostV2ProxyEmbeddingsData$Outbound` instead. */
|
|
726
|
+
export type Outbound = PostV2ProxyEmbeddingsData$Outbound;
|
|
727
|
+
}
|
|
728
|
+
|
|
729
|
+
export function postV2ProxyEmbeddingsDataToJSON(
|
|
730
|
+
postV2ProxyEmbeddingsData: PostV2ProxyEmbeddingsData,
|
|
731
|
+
): string {
|
|
732
|
+
return JSON.stringify(
|
|
733
|
+
PostV2ProxyEmbeddingsData$outboundSchema.parse(postV2ProxyEmbeddingsData),
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
export function postV2ProxyEmbeddingsDataFromJSON(
|
|
738
|
+
jsonString: string,
|
|
739
|
+
): SafeParseResult<PostV2ProxyEmbeddingsData, SDKValidationError> {
|
|
740
|
+
return safeParse(
|
|
741
|
+
jsonString,
|
|
742
|
+
(x) => PostV2ProxyEmbeddingsData$inboundSchema.parse(JSON.parse(x)),
|
|
743
|
+
`Failed to parse 'PostV2ProxyEmbeddingsData' from JSON`,
|
|
744
|
+
);
|
|
745
|
+
}
|
|
746
|
+
|
|
747
|
+
/** @internal */
|
|
748
|
+
export const PostV2ProxyEmbeddingsUsage$inboundSchema: z.ZodType<
|
|
749
|
+
PostV2ProxyEmbeddingsUsage,
|
|
750
|
+
z.ZodTypeDef,
|
|
751
|
+
unknown
|
|
752
|
+
> = z.object({
|
|
753
|
+
prompt_tokens: z.number(),
|
|
754
|
+
total_tokens: z.number(),
|
|
755
|
+
}).transform((v) => {
|
|
756
|
+
return remap$(v, {
|
|
757
|
+
"prompt_tokens": "promptTokens",
|
|
758
|
+
"total_tokens": "totalTokens",
|
|
759
|
+
});
|
|
760
|
+
});
|
|
761
|
+
|
|
762
|
+
/** @internal */
|
|
763
|
+
export type PostV2ProxyEmbeddingsUsage$Outbound = {
|
|
764
|
+
prompt_tokens: number;
|
|
765
|
+
total_tokens: number;
|
|
766
|
+
};
|
|
767
|
+
|
|
768
|
+
/** @internal */
|
|
769
|
+
export const PostV2ProxyEmbeddingsUsage$outboundSchema: z.ZodType<
|
|
770
|
+
PostV2ProxyEmbeddingsUsage$Outbound,
|
|
771
|
+
z.ZodTypeDef,
|
|
772
|
+
PostV2ProxyEmbeddingsUsage
|
|
773
|
+
> = z.object({
|
|
774
|
+
promptTokens: z.number(),
|
|
775
|
+
totalTokens: z.number(),
|
|
776
|
+
}).transform((v) => {
|
|
777
|
+
return remap$(v, {
|
|
778
|
+
promptTokens: "prompt_tokens",
|
|
779
|
+
totalTokens: "total_tokens",
|
|
780
|
+
});
|
|
781
|
+
});
|
|
782
|
+
|
|
783
|
+
/**
|
|
784
|
+
* @internal
|
|
785
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
786
|
+
*/
|
|
787
|
+
export namespace PostV2ProxyEmbeddingsUsage$ {
|
|
788
|
+
/** @deprecated use `PostV2ProxyEmbeddingsUsage$inboundSchema` instead. */
|
|
789
|
+
export const inboundSchema = PostV2ProxyEmbeddingsUsage$inboundSchema;
|
|
790
|
+
/** @deprecated use `PostV2ProxyEmbeddingsUsage$outboundSchema` instead. */
|
|
791
|
+
export const outboundSchema = PostV2ProxyEmbeddingsUsage$outboundSchema;
|
|
792
|
+
/** @deprecated use `PostV2ProxyEmbeddingsUsage$Outbound` instead. */
|
|
793
|
+
export type Outbound = PostV2ProxyEmbeddingsUsage$Outbound;
|
|
794
|
+
}
|
|
795
|
+
|
|
796
|
+
export function postV2ProxyEmbeddingsUsageToJSON(
|
|
797
|
+
postV2ProxyEmbeddingsUsage: PostV2ProxyEmbeddingsUsage,
|
|
798
|
+
): string {
|
|
799
|
+
return JSON.stringify(
|
|
800
|
+
PostV2ProxyEmbeddingsUsage$outboundSchema.parse(postV2ProxyEmbeddingsUsage),
|
|
801
|
+
);
|
|
802
|
+
}
|
|
803
|
+
|
|
804
|
+
export function postV2ProxyEmbeddingsUsageFromJSON(
|
|
805
|
+
jsonString: string,
|
|
806
|
+
): SafeParseResult<PostV2ProxyEmbeddingsUsage, SDKValidationError> {
|
|
807
|
+
return safeParse(
|
|
808
|
+
jsonString,
|
|
809
|
+
(x) => PostV2ProxyEmbeddingsUsage$inboundSchema.parse(JSON.parse(x)),
|
|
810
|
+
`Failed to parse 'PostV2ProxyEmbeddingsUsage' from JSON`,
|
|
811
|
+
);
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
/** @internal */
|
|
815
|
+
export const PostV2ProxyEmbeddingsResponseBody$inboundSchema: z.ZodType<
|
|
816
|
+
PostV2ProxyEmbeddingsResponseBody,
|
|
817
|
+
z.ZodTypeDef,
|
|
818
|
+
unknown
|
|
819
|
+
> = z.object({
|
|
820
|
+
object: PostV2ProxyEmbeddingsObject$inboundSchema,
|
|
821
|
+
data: z.array(z.lazy(() => PostV2ProxyEmbeddingsData$inboundSchema)),
|
|
822
|
+
model: z.string(),
|
|
823
|
+
usage: z.lazy(() => PostV2ProxyEmbeddingsUsage$inboundSchema).optional(),
|
|
824
|
+
});
|
|
825
|
+
|
|
826
|
+
/** @internal */
|
|
827
|
+
export type PostV2ProxyEmbeddingsResponseBody$Outbound = {
|
|
828
|
+
object: string;
|
|
829
|
+
data: Array<PostV2ProxyEmbeddingsData$Outbound>;
|
|
830
|
+
model: string;
|
|
831
|
+
usage?: PostV2ProxyEmbeddingsUsage$Outbound | undefined;
|
|
832
|
+
};
|
|
833
|
+
|
|
834
|
+
/** @internal */
|
|
835
|
+
export const PostV2ProxyEmbeddingsResponseBody$outboundSchema: z.ZodType<
|
|
836
|
+
PostV2ProxyEmbeddingsResponseBody$Outbound,
|
|
837
|
+
z.ZodTypeDef,
|
|
838
|
+
PostV2ProxyEmbeddingsResponseBody
|
|
839
|
+
> = z.object({
|
|
840
|
+
object: PostV2ProxyEmbeddingsObject$outboundSchema,
|
|
841
|
+
data: z.array(z.lazy(() => PostV2ProxyEmbeddingsData$outboundSchema)),
|
|
842
|
+
model: z.string(),
|
|
843
|
+
usage: z.lazy(() => PostV2ProxyEmbeddingsUsage$outboundSchema).optional(),
|
|
844
|
+
});
|
|
845
|
+
|
|
846
|
+
/**
|
|
847
|
+
* @internal
|
|
848
|
+
* @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
|
|
849
|
+
*/
|
|
850
|
+
export namespace PostV2ProxyEmbeddingsResponseBody$ {
|
|
851
|
+
/** @deprecated use `PostV2ProxyEmbeddingsResponseBody$inboundSchema` instead. */
|
|
852
|
+
export const inboundSchema = PostV2ProxyEmbeddingsResponseBody$inboundSchema;
|
|
853
|
+
/** @deprecated use `PostV2ProxyEmbeddingsResponseBody$outboundSchema` instead. */
|
|
854
|
+
export const outboundSchema =
|
|
855
|
+
PostV2ProxyEmbeddingsResponseBody$outboundSchema;
|
|
856
|
+
/** @deprecated use `PostV2ProxyEmbeddingsResponseBody$Outbound` instead. */
|
|
857
|
+
export type Outbound = PostV2ProxyEmbeddingsResponseBody$Outbound;
|
|
858
|
+
}
|
|
859
|
+
|
|
860
|
+
export function postV2ProxyEmbeddingsResponseBodyToJSON(
|
|
861
|
+
postV2ProxyEmbeddingsResponseBody: PostV2ProxyEmbeddingsResponseBody,
|
|
862
|
+
): string {
|
|
863
|
+
return JSON.stringify(
|
|
864
|
+
PostV2ProxyEmbeddingsResponseBody$outboundSchema.parse(
|
|
865
|
+
postV2ProxyEmbeddingsResponseBody,
|
|
866
|
+
),
|
|
867
|
+
);
|
|
868
|
+
}
|
|
869
|
+
|
|
870
|
+
export function postV2ProxyEmbeddingsResponseBodyFromJSON(
|
|
871
|
+
jsonString: string,
|
|
872
|
+
): SafeParseResult<PostV2ProxyEmbeddingsResponseBody, SDKValidationError> {
|
|
873
|
+
return safeParse(
|
|
874
|
+
jsonString,
|
|
875
|
+
(x) => PostV2ProxyEmbeddingsResponseBody$inboundSchema.parse(JSON.parse(x)),
|
|
876
|
+
`Failed to parse 'PostV2ProxyEmbeddingsResponseBody' from JSON`,
|
|
877
|
+
);
|
|
878
|
+
}
|