@bodhiapp/ts-client 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +1 -0
- package/dist/openapi-typescript/openapi-schema.d.ts +6084 -0
- package/dist/openapi-typescript/openapi-schema.ts +6085 -0
- package/dist/types/types.gen.d.ts +1534 -235
- package/dist/types/types.gen.ts +1686 -298
- package/package.json +8 -5
package/dist/types/types.gen.ts
CHANGED
|
@@ -13,12 +13,12 @@ export type Alias = (UserAlias & {
|
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
export type ApiAlias = {
|
|
16
|
+
id: string;
|
|
16
17
|
api_format: ApiFormat;
|
|
17
18
|
base_url: string;
|
|
18
|
-
created_at: string;
|
|
19
|
-
id: string;
|
|
20
19
|
models: Array<string>;
|
|
21
20
|
prefix?: string | null;
|
|
21
|
+
created_at: string;
|
|
22
22
|
updated_at: string;
|
|
23
23
|
};
|
|
24
24
|
|
|
@@ -34,196 +34,899 @@ export type ApiFormatsResponse = {
|
|
|
34
34
|
data: Array<ApiFormat>;
|
|
35
35
|
};
|
|
36
36
|
|
|
37
|
+
/**
|
|
38
|
+
* Validated API key wrapper - validates length when Some, allows None for public APIs
|
|
39
|
+
*/
|
|
40
|
+
export type ApiKey = string | null;
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* Represents an API key update action for API model updates
|
|
44
|
+
*/
|
|
45
|
+
export type ApiKeyUpdateAction = {
|
|
46
|
+
action: 'keep';
|
|
47
|
+
} | {
|
|
48
|
+
/**
|
|
49
|
+
* Set a new API key (or add one if none exists) - can be None for public APIs
|
|
50
|
+
*/
|
|
51
|
+
value: ApiKey;
|
|
52
|
+
action: 'set';
|
|
53
|
+
};
|
|
54
|
+
|
|
37
55
|
/**
|
|
38
56
|
* Response containing API model configuration
|
|
39
57
|
*/
|
|
40
58
|
export type ApiModelResponse = {
|
|
59
|
+
id: string;
|
|
41
60
|
api_format: ApiFormat;
|
|
42
|
-
api_key_masked: string;
|
|
43
61
|
base_url: string;
|
|
44
|
-
|
|
45
|
-
id: string;
|
|
62
|
+
api_key_masked?: string | null;
|
|
46
63
|
models: Array<string>;
|
|
47
64
|
prefix?: string | null;
|
|
65
|
+
created_at: string;
|
|
48
66
|
updated_at: string;
|
|
49
67
|
};
|
|
50
68
|
|
|
51
69
|
export type ApiToken = {
|
|
52
|
-
created_at: string;
|
|
53
70
|
id: string;
|
|
71
|
+
user_id: string;
|
|
54
72
|
name: string;
|
|
55
|
-
|
|
73
|
+
token_prefix: string;
|
|
56
74
|
token_hash: string;
|
|
57
|
-
|
|
75
|
+
scopes: string;
|
|
76
|
+
status: TokenStatus;
|
|
77
|
+
created_at: string;
|
|
58
78
|
updated_at: string;
|
|
59
|
-
user_id: string;
|
|
60
79
|
};
|
|
61
80
|
|
|
62
81
|
export type ApiTokenResponse = {
|
|
63
82
|
/**
|
|
64
|
-
* API token with
|
|
83
|
+
* API token with bodhiapp_ prefix for programmatic access
|
|
84
|
+
*/
|
|
85
|
+
token: string;
|
|
86
|
+
};
|
|
87
|
+
|
|
88
|
+
export type AppAccessRequest = {
|
|
89
|
+
app_client_id: string;
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export type AppAccessResponse = {
|
|
93
|
+
scope: string;
|
|
94
|
+
};
|
|
95
|
+
|
|
96
|
+
/**
|
|
97
|
+
* Application information and status
|
|
98
|
+
*/
|
|
99
|
+
export type AppInfo = {
|
|
100
|
+
/**
|
|
101
|
+
* Application version number (semantic versioning)
|
|
102
|
+
*/
|
|
103
|
+
version: string;
|
|
104
|
+
/**
|
|
105
|
+
* Git commit SHA of the build
|
|
106
|
+
*/
|
|
107
|
+
commit_sha: string;
|
|
108
|
+
/**
|
|
109
|
+
* Current application setup and operational status
|
|
110
|
+
*/
|
|
111
|
+
status: AppStatus;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
export type AppRole = ResourceRole | TokenScope | UserScope;
|
|
115
|
+
|
|
116
|
+
export type AppStatus = 'setup' | 'ready' | 'resource-admin';
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* Request body for approving access with role assignment
|
|
120
|
+
*/
|
|
121
|
+
export type ApproveUserAccessRequest = {
|
|
122
|
+
/**
|
|
123
|
+
* Role to assign to the user
|
|
124
|
+
*/
|
|
125
|
+
role: ResourceRole;
|
|
126
|
+
};
|
|
127
|
+
|
|
128
|
+
export type AuthCallbackRequest = {
|
|
129
|
+
/**
|
|
130
|
+
* OAuth authorization code from successful authentication (required for success flow)
|
|
131
|
+
*/
|
|
132
|
+
code?: string | null;
|
|
133
|
+
/**
|
|
134
|
+
* OAuth state parameter for CSRF protection (must match initiated request)
|
|
135
|
+
*/
|
|
136
|
+
state?: string | null;
|
|
137
|
+
/**
|
|
138
|
+
* OAuth error code if authentication failed (e.g., "access_denied")
|
|
139
|
+
*/
|
|
140
|
+
error?: string | null;
|
|
141
|
+
/**
|
|
142
|
+
* Human-readable OAuth error description if authentication failed
|
|
143
|
+
*/
|
|
144
|
+
error_description?: string | null;
|
|
145
|
+
[key: string]: string | (string | null) | (string | null) | (string | null) | (string | null) | undefined;
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
/**
|
|
149
|
+
* Change user role request
|
|
150
|
+
*/
|
|
151
|
+
export type ChangeRoleRequest = {
|
|
152
|
+
/**
|
|
153
|
+
* Role to assign to the user
|
|
154
|
+
*/
|
|
155
|
+
role: string;
|
|
156
|
+
};
|
|
157
|
+
|
|
158
|
+
export type ChatChoice = {
|
|
159
|
+
/**
|
|
160
|
+
* The index of the choice in the list of choices.
|
|
161
|
+
*/
|
|
162
|
+
index: number;
|
|
163
|
+
message: ChatCompletionResponseMessage;
|
|
164
|
+
finish_reason?: null | FinishReason;
|
|
165
|
+
logprobs?: null | ChatChoiceLogprobs;
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
export type ChatChoiceLogprobs = {
|
|
169
|
+
/**
|
|
170
|
+
* A list of message content tokens with log probability information.
|
|
171
|
+
*/
|
|
172
|
+
content?: Array<ChatCompletionTokenLogprob> | null;
|
|
173
|
+
refusal?: Array<ChatCompletionTokenLogprob> | null;
|
|
174
|
+
};
|
|
175
|
+
|
|
176
|
+
export type ChatChoiceStream = {
|
|
177
|
+
/**
|
|
178
|
+
* The index of the choice in the list of choices.
|
|
179
|
+
*/
|
|
180
|
+
index: number;
|
|
181
|
+
delta: ChatCompletionStreamResponseDelta;
|
|
182
|
+
finish_reason?: null | FinishReason;
|
|
183
|
+
logprobs?: null | ChatChoiceLogprobs;
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
export type ChatCompletionAudio = {
|
|
187
|
+
/**
|
|
188
|
+
* The voice the model uses to respond. Supported voices are `ash`, `ballad`, `coral`, `sage`, and `verse` (also supported but not recommended are `alloy`, `echo`, and `shimmer`; these voices are less expressive).
|
|
189
|
+
*/
|
|
190
|
+
voice: ChatCompletionAudioVoice;
|
|
191
|
+
/**
|
|
192
|
+
* Specifies the output audio format. Must be one of `wav`, `mp3`, `flac`, `opus`, or `pcm16`.
|
|
193
|
+
*/
|
|
194
|
+
format: ChatCompletionAudioFormat;
|
|
195
|
+
};
|
|
196
|
+
|
|
197
|
+
export type ChatCompletionAudioFormat = 'wav' | 'mp3' | 'flac' | 'opus' | 'pcm16';
|
|
198
|
+
|
|
199
|
+
export type ChatCompletionAudioVoice = 'alloy' | 'ash' | 'ballad' | 'coral' | 'echo' | 'sage' | 'shimmer' | 'verse';
|
|
200
|
+
|
|
201
|
+
export type ChatCompletionFunctionCall = 'none' | 'auto' | {
|
|
202
|
+
/**
|
|
203
|
+
* Forces the model to call the specified function.
|
|
204
|
+
*/
|
|
205
|
+
Function: {
|
|
206
|
+
name: string;
|
|
207
|
+
};
|
|
208
|
+
};
|
|
209
|
+
|
|
210
|
+
/**
|
|
211
|
+
* @deprecated
|
|
212
|
+
*/
|
|
213
|
+
export type ChatCompletionFunctions = {
|
|
214
|
+
/**
|
|
215
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
216
|
+
*/
|
|
217
|
+
name: string;
|
|
218
|
+
/**
|
|
219
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
220
|
+
*/
|
|
221
|
+
description?: string | null;
|
|
222
|
+
/**
|
|
223
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
224
|
+
*
|
|
225
|
+
* Omitting `parameters` defines a function with an empty parameter list.
|
|
226
|
+
*/
|
|
227
|
+
parameters: unknown;
|
|
228
|
+
};
|
|
229
|
+
|
|
230
|
+
export type ChatCompletionMessageToolCall = {
|
|
231
|
+
/**
|
|
232
|
+
* The ID of the tool call.
|
|
233
|
+
*/
|
|
234
|
+
id: string;
|
|
235
|
+
/**
|
|
236
|
+
* The type of the tool. Currently, only `function` is supported.
|
|
237
|
+
*/
|
|
238
|
+
type: ChatCompletionToolType;
|
|
239
|
+
/**
|
|
240
|
+
* The function that the model called.
|
|
241
|
+
*/
|
|
242
|
+
function: FunctionCall;
|
|
243
|
+
};
|
|
244
|
+
|
|
245
|
+
export type ChatCompletionMessageToolCallChunk = {
|
|
246
|
+
index: number;
|
|
247
|
+
/**
|
|
248
|
+
* The ID of the tool call.
|
|
249
|
+
*/
|
|
250
|
+
id?: string | null;
|
|
251
|
+
type?: null | ChatCompletionToolType;
|
|
252
|
+
function?: null | FunctionCallStream;
|
|
253
|
+
};
|
|
254
|
+
|
|
255
|
+
/**
|
|
256
|
+
* Output types that you would like the model to generate for this request.
|
|
257
|
+
*
|
|
258
|
+
* Most models are capable of generating text, which is the default: `["text"]`
|
|
259
|
+
*
|
|
260
|
+
* The `gpt-4o-audio-preview` model can also be used to [generate
|
|
261
|
+
* audio](https://platform.openai.com/docs/guides/audio). To request that this model generate both text and audio responses, you can use: `["text", "audio"]`
|
|
262
|
+
*/
|
|
263
|
+
export type ChatCompletionModalities = 'text' | 'audio';
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Specifies a tool the model should use. Use to force the model to call a specific function.
|
|
267
|
+
*/
|
|
268
|
+
export type ChatCompletionNamedToolChoice = {
|
|
269
|
+
/**
|
|
270
|
+
* The type of the tool. Currently, only `function` is supported.
|
|
271
|
+
*/
|
|
272
|
+
type: ChatCompletionToolType;
|
|
273
|
+
function: FunctionName;
|
|
274
|
+
};
|
|
275
|
+
|
|
276
|
+
export type ChatCompletionRequestAssistantMessage = {
|
|
277
|
+
content?: null | ChatCompletionRequestAssistantMessageContent;
|
|
278
|
+
/**
|
|
279
|
+
* The refusal message by the assistant.
|
|
280
|
+
*/
|
|
281
|
+
refusal?: string | null;
|
|
282
|
+
/**
|
|
283
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
284
|
+
*/
|
|
285
|
+
name?: string | null;
|
|
286
|
+
audio?: null | ChatCompletionRequestAssistantMessageAudio;
|
|
287
|
+
tool_calls?: Array<ChatCompletionMessageToolCall> | null;
|
|
288
|
+
function_call?: null | FunctionCall;
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
export type ChatCompletionRequestAssistantMessageAudio = {
|
|
292
|
+
/**
|
|
293
|
+
* Unique identifier for a previous audio response from the model.
|
|
294
|
+
*/
|
|
295
|
+
id: string;
|
|
296
|
+
};
|
|
297
|
+
|
|
298
|
+
export type ChatCompletionRequestAssistantMessageContent = string | Array<ChatCompletionRequestAssistantMessageContentPart>;
|
|
299
|
+
|
|
300
|
+
export type ChatCompletionRequestAssistantMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
|
|
301
|
+
type: 'text';
|
|
302
|
+
}) | (ChatCompletionRequestMessageContentPartRefusal & {
|
|
303
|
+
type: 'refusal';
|
|
304
|
+
});
|
|
305
|
+
|
|
306
|
+
export type ChatCompletionRequestDeveloperMessage = {
|
|
307
|
+
/**
|
|
308
|
+
* The contents of the developer message.
|
|
309
|
+
*/
|
|
310
|
+
content: ChatCompletionRequestDeveloperMessageContent;
|
|
311
|
+
/**
|
|
312
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
313
|
+
*/
|
|
314
|
+
name?: string | null;
|
|
315
|
+
};
|
|
316
|
+
|
|
317
|
+
export type ChatCompletionRequestDeveloperMessageContent = string | Array<ChatCompletionRequestMessageContentPartText>;
|
|
318
|
+
|
|
319
|
+
export type ChatCompletionRequestFunctionMessage = {
|
|
320
|
+
/**
|
|
321
|
+
* The return value from the function call, to return to the model.
|
|
322
|
+
*/
|
|
323
|
+
content?: string | null;
|
|
324
|
+
/**
|
|
325
|
+
* The name of the function to call.
|
|
326
|
+
*/
|
|
327
|
+
name: string;
|
|
328
|
+
};
|
|
329
|
+
|
|
330
|
+
export type ChatCompletionRequestMessage = (ChatCompletionRequestDeveloperMessage & {
|
|
331
|
+
role: 'developer';
|
|
332
|
+
}) | (ChatCompletionRequestSystemMessage & {
|
|
333
|
+
role: 'system';
|
|
334
|
+
}) | (ChatCompletionRequestUserMessage & {
|
|
335
|
+
role: 'user';
|
|
336
|
+
}) | (ChatCompletionRequestAssistantMessage & {
|
|
337
|
+
role: 'assistant';
|
|
338
|
+
}) | (ChatCompletionRequestToolMessage & {
|
|
339
|
+
role: 'tool';
|
|
340
|
+
}) | (ChatCompletionRequestFunctionMessage & {
|
|
341
|
+
role: 'function';
|
|
342
|
+
});
|
|
343
|
+
|
|
344
|
+
/**
|
|
345
|
+
* Learn about [audio inputs](https://platform.openai.com/docs/guides/audio).
|
|
346
|
+
*/
|
|
347
|
+
export type ChatCompletionRequestMessageContentPartAudio = {
|
|
348
|
+
input_audio: InputAudio;
|
|
349
|
+
};
|
|
350
|
+
|
|
351
|
+
export type ChatCompletionRequestMessageContentPartImage = {
|
|
352
|
+
image_url: ImageUrl;
|
|
353
|
+
};
|
|
354
|
+
|
|
355
|
+
export type ChatCompletionRequestMessageContentPartRefusal = {
|
|
356
|
+
/**
|
|
357
|
+
* The refusal message generated by the model.
|
|
358
|
+
*/
|
|
359
|
+
refusal: string;
|
|
360
|
+
};
|
|
361
|
+
|
|
362
|
+
export type ChatCompletionRequestMessageContentPartText = {
|
|
363
|
+
text: string;
|
|
364
|
+
};
|
|
365
|
+
|
|
366
|
+
export type ChatCompletionRequestSystemMessage = {
|
|
367
|
+
/**
|
|
368
|
+
* The contents of the system message.
|
|
369
|
+
*/
|
|
370
|
+
content: ChatCompletionRequestSystemMessageContent;
|
|
371
|
+
/**
|
|
372
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
373
|
+
*/
|
|
374
|
+
name?: string | null;
|
|
375
|
+
};
|
|
376
|
+
|
|
377
|
+
export type ChatCompletionRequestSystemMessageContent = string | Array<ChatCompletionRequestSystemMessageContentPart>;
|
|
378
|
+
|
|
379
|
+
export type ChatCompletionRequestSystemMessageContentPart = ChatCompletionRequestMessageContentPartText & {
|
|
380
|
+
type: 'text';
|
|
381
|
+
};
|
|
382
|
+
|
|
383
|
+
/**
|
|
384
|
+
* Tool message
|
|
385
|
+
*/
|
|
386
|
+
export type ChatCompletionRequestToolMessage = {
|
|
387
|
+
/**
|
|
388
|
+
* The contents of the tool message.
|
|
389
|
+
*/
|
|
390
|
+
content: ChatCompletionRequestToolMessageContent;
|
|
391
|
+
tool_call_id: string;
|
|
392
|
+
};
|
|
393
|
+
|
|
394
|
+
export type ChatCompletionRequestToolMessageContent = string | Array<ChatCompletionRequestToolMessageContentPart>;
|
|
395
|
+
|
|
396
|
+
export type ChatCompletionRequestToolMessageContentPart = ChatCompletionRequestMessageContentPartText & {
|
|
397
|
+
type: 'text';
|
|
398
|
+
};
|
|
399
|
+
|
|
400
|
+
export type ChatCompletionRequestUserMessage = {
|
|
401
|
+
/**
|
|
402
|
+
* The contents of the user message.
|
|
403
|
+
*/
|
|
404
|
+
content: ChatCompletionRequestUserMessageContent;
|
|
405
|
+
/**
|
|
406
|
+
* An optional name for the participant. Provides the model information to differentiate between participants of the same role.
|
|
407
|
+
*/
|
|
408
|
+
name?: string | null;
|
|
409
|
+
};
|
|
410
|
+
|
|
411
|
+
export type ChatCompletionRequestUserMessageContent = string | Array<ChatCompletionRequestUserMessageContentPart>;
|
|
412
|
+
|
|
413
|
+
export type ChatCompletionRequestUserMessageContentPart = (ChatCompletionRequestMessageContentPartText & {
|
|
414
|
+
type: 'text';
|
|
415
|
+
}) | (ChatCompletionRequestMessageContentPartImage & {
|
|
416
|
+
type: 'image_url';
|
|
417
|
+
}) | (ChatCompletionRequestMessageContentPartAudio & {
|
|
418
|
+
type: 'input_audio';
|
|
419
|
+
});
|
|
420
|
+
|
|
421
|
+
/**
|
|
422
|
+
* A chat completion message generated by the model.
|
|
423
|
+
*/
|
|
424
|
+
export type ChatCompletionResponseMessage = {
|
|
425
|
+
/**
|
|
426
|
+
* The contents of the message.
|
|
427
|
+
*/
|
|
428
|
+
content?: string | null;
|
|
429
|
+
/**
|
|
430
|
+
* The refusal message generated by the model.
|
|
431
|
+
*/
|
|
432
|
+
refusal?: string | null;
|
|
433
|
+
/**
|
|
434
|
+
* The tool calls generated by the model, such as function calls.
|
|
435
|
+
*/
|
|
436
|
+
tool_calls?: Array<ChatCompletionMessageToolCall> | null;
|
|
437
|
+
/**
|
|
438
|
+
* The role of the author of this message.
|
|
439
|
+
*/
|
|
440
|
+
role: Role;
|
|
441
|
+
function_call?: null | FunctionCall;
|
|
442
|
+
audio?: null | ChatCompletionResponseMessageAudio;
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
export type ChatCompletionResponseMessageAudio = {
|
|
446
|
+
/**
|
|
447
|
+
* Unique identifier for this audio response.
|
|
448
|
+
*/
|
|
449
|
+
id: string;
|
|
450
|
+
/**
|
|
451
|
+
* The Unix timestamp (in seconds) for when this audio response will no longer be accessible on the server for use in multi-turn conversations.
|
|
452
|
+
*/
|
|
453
|
+
expires_at: number;
|
|
454
|
+
/**
|
|
455
|
+
* Base64 encoded audio bytes generated by the model, in the format specified in the request.
|
|
456
|
+
*/
|
|
457
|
+
data: string;
|
|
458
|
+
/**
|
|
459
|
+
* Transcript of the audio generated by the model.
|
|
460
|
+
*/
|
|
461
|
+
transcript: string;
|
|
462
|
+
};
|
|
463
|
+
|
|
464
|
+
/**
|
|
465
|
+
* Options for streaming response. Only set this when you set `stream: true`.
|
|
466
|
+
*/
|
|
467
|
+
export type ChatCompletionStreamOptions = {
|
|
468
|
+
/**
|
|
469
|
+
* If set, an additional chunk will be streamed before the `data: [DONE]` message. The `usage` field on this chunk shows the token usage statistics for the entire request, and the `choices` field will always be an empty array. All other chunks will also include a `usage` field, but with a null value.
|
|
470
|
+
*/
|
|
471
|
+
include_usage: boolean;
|
|
472
|
+
};
|
|
473
|
+
|
|
474
|
+
/**
|
|
475
|
+
* A chat completion delta generated by streamed model responses.
|
|
476
|
+
*/
|
|
477
|
+
export type ChatCompletionStreamResponseDelta = {
|
|
478
|
+
/**
|
|
479
|
+
* The contents of the chunk message.
|
|
480
|
+
*/
|
|
481
|
+
content?: string | null;
|
|
482
|
+
function_call?: null | FunctionCallStream;
|
|
483
|
+
tool_calls?: Array<ChatCompletionMessageToolCallChunk> | null;
|
|
484
|
+
role?: null | Role;
|
|
485
|
+
/**
|
|
486
|
+
* The refusal message generated by the model.
|
|
487
|
+
*/
|
|
488
|
+
refusal?: string | null;
|
|
489
|
+
};
|
|
490
|
+
|
|
491
|
+
export type ChatCompletionTokenLogprob = {
|
|
492
|
+
/**
|
|
493
|
+
* The token.
|
|
494
|
+
*/
|
|
495
|
+
token: string;
|
|
496
|
+
/**
|
|
497
|
+
* The log probability of this token, if it is within the top 20 most likely tokens. Otherwise, the value `-9999.0` is used to signify that the token is very unlikely.
|
|
498
|
+
*/
|
|
499
|
+
logprob: number;
|
|
500
|
+
/**
|
|
501
|
+
* A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
|
|
502
|
+
*/
|
|
503
|
+
bytes?: Array<number> | null;
|
|
504
|
+
/**
|
|
505
|
+
* List of the most likely tokens and their log probability, at this token position. In rare cases, there may be fewer than the number of requested `top_logprobs` returned.
|
|
506
|
+
*/
|
|
507
|
+
top_logprobs: Array<TopLogprobs>;
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
export type ChatCompletionTool = {
|
|
511
|
+
type: ChatCompletionToolType;
|
|
512
|
+
function: FunctionObject;
|
|
513
|
+
};
|
|
514
|
+
|
|
515
|
+
/**
|
|
516
|
+
* Controls which (if any) tool is called by the model.
|
|
517
|
+
* `none` means the model will not call any tool and instead generates a message.
|
|
518
|
+
* `auto` means the model can pick between generating a message or calling one or more tools.
|
|
519
|
+
* `required` means the model must call one or more tools.
|
|
520
|
+
* Specifying a particular tool via `{"type": "function", "function": {"name": "my_function"}}` forces the model to call that tool.
|
|
521
|
+
*
|
|
522
|
+
* `none` is the default when no tools are present. `auto` is the default if tools are present.
|
|
523
|
+
*/
|
|
524
|
+
export type ChatCompletionToolChoiceOption = 'none' | 'auto' | 'required' | {
|
|
525
|
+
named: ChatCompletionNamedToolChoice;
|
|
526
|
+
};
|
|
527
|
+
|
|
528
|
+
export type ChatCompletionToolType = 'function';
|
|
529
|
+
|
|
530
|
+
export type ChatRequest = {
|
|
531
|
+
model: string;
|
|
532
|
+
messages: Array<Message>;
|
|
533
|
+
stream?: boolean | null;
|
|
534
|
+
format?: string | null;
|
|
535
|
+
keep_alive?: null | Duration;
|
|
536
|
+
options?: null | Options;
|
|
537
|
+
};
|
|
538
|
+
|
|
539
|
+
/**
|
|
540
|
+
* Breakdown of tokens used in a completion.
|
|
541
|
+
*/
|
|
542
|
+
export type CompletionTokensDetails = {
|
|
543
|
+
accepted_prediction_tokens?: number | null;
|
|
544
|
+
/**
|
|
545
|
+
* Audio input tokens generated by the model.
|
|
546
|
+
*/
|
|
547
|
+
audio_tokens?: number | null;
|
|
548
|
+
/**
|
|
549
|
+
* Tokens generated by the model for reasoning.
|
|
550
|
+
*/
|
|
551
|
+
reasoning_tokens?: number | null;
|
|
552
|
+
/**
|
|
553
|
+
* When using Predicted Outputs, the number of tokens in the
|
|
554
|
+
* prediction that did not appear in the completion. However, like
|
|
555
|
+
* reasoning tokens, these tokens are still counted in the total
|
|
556
|
+
* completion tokens for purposes of billing, output, and context
|
|
557
|
+
* window limits.
|
|
558
|
+
*/
|
|
559
|
+
rejected_prediction_tokens?: number | null;
|
|
560
|
+
};
|
|
561
|
+
|
|
562
|
+
/**
|
|
563
|
+
* Usage statistics for the completion request.
|
|
564
|
+
*/
|
|
565
|
+
export type CompletionUsage = {
|
|
566
|
+
/**
|
|
567
|
+
* Number of tokens in the prompt.
|
|
568
|
+
*/
|
|
569
|
+
prompt_tokens: number;
|
|
570
|
+
/**
|
|
571
|
+
* Number of tokens in the generated completion.
|
|
572
|
+
*/
|
|
573
|
+
completion_tokens: number;
|
|
574
|
+
/**
|
|
575
|
+
* Total number of tokens used in the request (prompt + completion).
|
|
576
|
+
*/
|
|
577
|
+
total_tokens: number;
|
|
578
|
+
prompt_tokens_details?: null | PromptTokensDetails;
|
|
579
|
+
completion_tokens_details?: null | CompletionTokensDetails;
|
|
580
|
+
};
|
|
581
|
+
|
|
582
|
+
export type CreateAliasRequest = {
|
|
583
|
+
alias: string;
|
|
584
|
+
repo: string;
|
|
585
|
+
filename: string;
|
|
586
|
+
snapshot?: string | null;
|
|
587
|
+
request_params?: null | OaiRequestParams;
|
|
588
|
+
context_params?: Array<string> | null;
|
|
589
|
+
};
|
|
590
|
+
|
|
591
|
+
/**
|
|
592
|
+
* Request to create a new API model configuration
|
|
593
|
+
*/
|
|
594
|
+
export type CreateApiModelRequest = {
|
|
595
|
+
/**
|
|
596
|
+
* API format/protocol (e.g., "openai")
|
|
597
|
+
*/
|
|
598
|
+
api_format: ApiFormat;
|
|
599
|
+
/**
|
|
600
|
+
* API base URL
|
|
601
|
+
*/
|
|
602
|
+
base_url: string;
|
|
603
|
+
/**
|
|
604
|
+
* API key for authentication (null for public APIs)
|
|
605
|
+
*/
|
|
606
|
+
api_key?: ApiKey;
|
|
607
|
+
/**
|
|
608
|
+
* List of available models
|
|
609
|
+
*/
|
|
610
|
+
models: Array<string>;
|
|
611
|
+
/**
|
|
612
|
+
* Optional prefix for model namespacing (e.g., "azure/" for "azure/gpt-4", "openai:" for "openai:gpt-4")
|
|
613
|
+
*/
|
|
614
|
+
prefix?: string | null;
|
|
615
|
+
};
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Request to create a new API token
|
|
619
|
+
*/
|
|
620
|
+
export type CreateApiTokenRequest = {
|
|
621
|
+
/**
|
|
622
|
+
* Descriptive name for the API token (minimum 3 characters)
|
|
623
|
+
*/
|
|
624
|
+
name?: string | null;
|
|
625
|
+
/**
|
|
626
|
+
* Token scope defining access level
|
|
627
|
+
*/
|
|
628
|
+
scope: TokenScope;
|
|
629
|
+
};
|
|
630
|
+
|
|
631
|
+
export type CreateChatCompletionRequest = {
|
|
632
|
+
/**
|
|
633
|
+
* A list of messages comprising the conversation so far. Depending on the [model](https://platform.openai.com/docs/models) you use, different message types (modalities) are supported, like [text](https://platform.openai.com/docs/guides/text-generation), [images](https://platform.openai.com/docs/guides/vision), and [audio](https://platform.openai.com/docs/guides/audio).
|
|
634
|
+
*/
|
|
635
|
+
messages: Array<ChatCompletionRequestMessage>;
|
|
636
|
+
/**
|
|
637
|
+
* ID of the model to use.
|
|
638
|
+
* See the [model endpoint compatibility](https://platform.openai.com/docs/models#model-endpoint-compatibility) table for details on which models work with the Chat API.
|
|
639
|
+
*/
|
|
640
|
+
model: string;
|
|
641
|
+
/**
|
|
642
|
+
* Whether or not to store the output of this chat completion request
|
|
643
|
+
*
|
|
644
|
+
* for use in our [model distillation](https://platform.openai.com/docs/guides/distillation) or [evals](https://platform.openai.com/docs/guides/evals) products.
|
|
645
|
+
*/
|
|
646
|
+
store?: boolean | null;
|
|
647
|
+
reasoning_effort?: null | ReasoningEffort;
|
|
648
|
+
/**
|
|
649
|
+
* Developer-defined tags and values used for filtering completions in the [dashboard](https://platform.openai.com/chat-completions).
|
|
650
|
+
*/
|
|
651
|
+
metadata?: unknown;
|
|
652
|
+
/**
|
|
653
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim.
|
|
654
|
+
*/
|
|
655
|
+
frequency_penalty?: number | null;
|
|
656
|
+
/**
|
|
657
|
+
* Modify the likelihood of specified tokens appearing in the completion.
|
|
658
|
+
*
|
|
659
|
+
* Accepts a json object that maps tokens (specified by their token ID in the tokenizer) to an associated bias value from -100 to 100.
|
|
660
|
+
* Mathematically, the bias is added to the logits generated by the model prior to sampling.
|
|
661
|
+
* The exact effect will vary per model, but values between -1 and 1 should decrease or increase likelihood of selection;
|
|
662
|
+
* values like -100 or 100 should result in a ban or exclusive selection of the relevant token.
|
|
663
|
+
*/
|
|
664
|
+
logit_bias?: {} | null;
|
|
665
|
+
/**
|
|
666
|
+
* Whether to return log probabilities of the output tokens or not. If true, returns the log probabilities of each output token returned in the `content` of `message`.
|
|
667
|
+
*/
|
|
668
|
+
logprobs?: boolean | null;
|
|
669
|
+
/**
|
|
670
|
+
* An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability. `logprobs` must be set to `true` if this parameter is used.
|
|
671
|
+
*/
|
|
672
|
+
top_logprobs?: number | null;
|
|
673
|
+
/**
|
|
674
|
+
* The maximum number of [tokens](https://platform.openai.com/tokenizer) that can be generated in the chat completion.
|
|
675
|
+
*
|
|
676
|
+
* This value can be used to control [costs](https://openai.com/api/pricing/) for text generated via API.
|
|
677
|
+
* This value is now deprecated in favor of `max_completion_tokens`, and is
|
|
678
|
+
* not compatible with [o1 series models](https://platform.openai.com/docs/guides/reasoning).
|
|
679
|
+
* @deprecated
|
|
680
|
+
*/
|
|
681
|
+
max_tokens?: number | null;
|
|
682
|
+
/**
|
|
683
|
+
* An upper bound for the number of tokens that can be generated for a completion, including visible output tokens and [reasoning tokens](https://platform.openai.com/docs/guides/reasoning).
|
|
684
|
+
*/
|
|
685
|
+
max_completion_tokens?: number | null;
|
|
686
|
+
/**
|
|
687
|
+
* How many chat completion choices to generate for each input message. Note that you will be charged based on the number of generated tokens across all of the choices. Keep `n` as `1` to minimize costs.
|
|
688
|
+
*/
|
|
689
|
+
n?: number | null;
|
|
690
|
+
modalities?: Array<ChatCompletionModalities> | null;
|
|
691
|
+
prediction?: null | PredictionContent;
|
|
692
|
+
audio?: null | ChatCompletionAudio;
|
|
693
|
+
/**
|
|
694
|
+
* Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the model's likelihood to talk about new topics.
|
|
695
|
+
*/
|
|
696
|
+
presence_penalty?: number | null;
|
|
697
|
+
response_format?: null | ResponseFormat;
|
|
698
|
+
/**
|
|
699
|
+
* This feature is in Beta.
|
|
700
|
+
* If specified, our system will make a best effort to sample deterministically, such that repeated requests
|
|
701
|
+
* with the same `seed` and parameters should return the same result.
|
|
702
|
+
* Determinism is not guaranteed, and you should refer to the `system_fingerprint` response parameter to monitor changes in the backend.
|
|
703
|
+
*/
|
|
704
|
+
seed?: number | null;
|
|
705
|
+
service_tier?: null | ServiceTier;
|
|
706
|
+
stop?: null | Stop;
|
|
707
|
+
/**
|
|
708
|
+
* If set, partial message deltas will be sent, like in ChatGPT.
|
|
709
|
+
* Tokens will be sent as data-only [server-sent events](https://developer.mozilla.org/en-US/docs/Web/API/Server-sent_events/Using_server-sent_events#Event_stream_format)
|
|
710
|
+
* as they become available, with the stream terminated by a `data: [DONE]` message. [Example Python code](https://cookbook.openai.com/examples/how_to_stream_completions).
|
|
711
|
+
*/
|
|
712
|
+
stream?: boolean | null;
|
|
713
|
+
stream_options?: null | ChatCompletionStreamOptions;
|
|
714
|
+
/**
|
|
715
|
+
* What sampling temperature to use, between 0 and 2. Higher values like 0.8 will make the output more random,
|
|
716
|
+
* while lower values like 0.2 will make it more focused and deterministic.
|
|
717
|
+
*
|
|
718
|
+
* We generally recommend altering this or `top_p` but not both.
|
|
719
|
+
*/
|
|
720
|
+
temperature?: number | null;
|
|
721
|
+
/**
|
|
722
|
+
* An alternative to sampling with temperature, called nucleus sampling,
|
|
723
|
+
* where the model considers the results of the tokens with top_p probability mass.
|
|
724
|
+
* So 0.1 means only the tokens comprising the top 10% probability mass are considered.
|
|
725
|
+
*
|
|
726
|
+
* We generally recommend altering this or `temperature` but not both.
|
|
727
|
+
*/
|
|
728
|
+
top_p?: number | null;
|
|
729
|
+
/**
|
|
730
|
+
* A list of tools the model may call. Currently, only functions are supported as a tool.
|
|
731
|
+
* Use this to provide a list of functions the model may generate JSON inputs for. A max of 128 functions are supported.
|
|
732
|
+
*/
|
|
733
|
+
tools?: Array<ChatCompletionTool> | null;
|
|
734
|
+
tool_choice?: null | ChatCompletionToolChoiceOption;
|
|
735
|
+
/**
|
|
736
|
+
* Whether to enable [parallel function calling](https://platform.openai.com/docs/guides/function-calling/parallel-function-calling) during tool use.
|
|
65
737
|
*/
|
|
66
|
-
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
export type AppAccessRequest = {
|
|
70
|
-
app_client_id: string;
|
|
71
|
-
};
|
|
72
|
-
|
|
73
|
-
export type AppAccessResponse = {
|
|
74
|
-
scope: string;
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Application information and status
|
|
79
|
-
*/
|
|
80
|
-
export type AppInfo = {
|
|
738
|
+
parallel_tool_calls?: boolean | null;
|
|
81
739
|
/**
|
|
82
|
-
*
|
|
740
|
+
* A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/guides/safety-best-practices#end-user-ids).
|
|
83
741
|
*/
|
|
84
|
-
|
|
742
|
+
user?: string | null;
|
|
743
|
+
web_search_options?: null | WebSearchOptions;
|
|
744
|
+
function_call?: null | ChatCompletionFunctionCall;
|
|
85
745
|
/**
|
|
86
|
-
*
|
|
746
|
+
* Deprecated in favor of `tools`.
|
|
747
|
+
*
|
|
748
|
+
* A list of functions the model may generate JSON inputs for.
|
|
749
|
+
* @deprecated
|
|
87
750
|
*/
|
|
88
|
-
|
|
751
|
+
functions?: Array<ChatCompletionFunctions> | null;
|
|
89
752
|
};
|
|
90
753
|
|
|
91
|
-
export type AppRole = Role | TokenScope | UserScope;
|
|
92
|
-
|
|
93
|
-
export type AppStatus = 'setup' | 'ready' | 'resource-admin';
|
|
94
|
-
|
|
95
754
|
/**
|
|
96
|
-
*
|
|
755
|
+
* Represents a chat completion response returned by model, based on the provided input.
|
|
97
756
|
*/
|
|
98
|
-
export type
|
|
757
|
+
export type CreateChatCompletionResponse = {
|
|
99
758
|
/**
|
|
100
|
-
*
|
|
759
|
+
* A unique identifier for the chat completion.
|
|
101
760
|
*/
|
|
102
|
-
|
|
103
|
-
};
|
|
104
|
-
|
|
105
|
-
export type AuthCallbackRequest = {
|
|
761
|
+
id: string;
|
|
106
762
|
/**
|
|
107
|
-
*
|
|
763
|
+
* A list of chat completion choices. Can be more than one if `n` is greater than 1.
|
|
108
764
|
*/
|
|
109
|
-
|
|
765
|
+
choices: Array<ChatChoice>;
|
|
110
766
|
/**
|
|
111
|
-
*
|
|
767
|
+
* The Unix timestamp (in seconds) of when the chat completion was created.
|
|
112
768
|
*/
|
|
113
|
-
|
|
769
|
+
created: number;
|
|
114
770
|
/**
|
|
115
|
-
*
|
|
771
|
+
* The model used for the chat completion.
|
|
116
772
|
*/
|
|
117
|
-
|
|
773
|
+
model: string;
|
|
774
|
+
service_tier?: null | ServiceTierResponse;
|
|
118
775
|
/**
|
|
119
|
-
*
|
|
776
|
+
* This fingerprint represents the backend configuration that the model runs with.
|
|
777
|
+
*
|
|
778
|
+
* Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
|
|
120
779
|
*/
|
|
121
|
-
|
|
122
|
-
|
|
780
|
+
system_fingerprint?: string | null;
|
|
781
|
+
/**
|
|
782
|
+
* The object type, which is always `chat.completion`.
|
|
783
|
+
*/
|
|
784
|
+
object: string;
|
|
785
|
+
usage?: null | CompletionUsage;
|
|
123
786
|
};
|
|
124
787
|
|
|
125
788
|
/**
|
|
126
|
-
*
|
|
789
|
+
* Represents a streamed chunk of a chat completion response returned by model, based on the provided input.
|
|
127
790
|
*/
|
|
128
|
-
export type
|
|
791
|
+
export type CreateChatCompletionStreamResponse = {
|
|
129
792
|
/**
|
|
130
|
-
*
|
|
793
|
+
* A unique identifier for the chat completion. Each chunk has the same ID.
|
|
794
|
+
*/
|
|
795
|
+
id: string;
|
|
796
|
+
/**
|
|
797
|
+
* A list of chat completion choices. Can contain more than one elements if `n` is greater than 1. Can also be empty for the last chunk if you set `stream_options: {"include_usage": true}`.
|
|
798
|
+
*/
|
|
799
|
+
choices: Array<ChatChoiceStream>;
|
|
800
|
+
/**
|
|
801
|
+
* The Unix timestamp (in seconds) of when the chat completion was created. Each chunk has the same timestamp.
|
|
802
|
+
*/
|
|
803
|
+
created: number;
|
|
804
|
+
/**
|
|
805
|
+
* The model to generate the completion.
|
|
131
806
|
*/
|
|
132
|
-
role: string;
|
|
133
|
-
};
|
|
134
|
-
|
|
135
|
-
export type ChatRequest = {
|
|
136
|
-
format?: string | null;
|
|
137
|
-
keep_alive?: null | Duration;
|
|
138
|
-
messages: Array<Message>;
|
|
139
807
|
model: string;
|
|
140
|
-
|
|
141
|
-
stream?: boolean | null;
|
|
142
|
-
};
|
|
143
|
-
|
|
144
|
-
export type CreateAliasRequest = {
|
|
145
|
-
alias: string;
|
|
146
|
-
context_params?: Array<string> | null;
|
|
147
|
-
filename: string;
|
|
148
|
-
repo: string;
|
|
149
|
-
request_params?: null | OaiRequestParams;
|
|
150
|
-
snapshot?: string | null;
|
|
151
|
-
};
|
|
152
|
-
|
|
153
|
-
/**
|
|
154
|
-
* Request to create a new API model configuration
|
|
155
|
-
*/
|
|
156
|
-
export type CreateApiModelRequest = {
|
|
808
|
+
service_tier?: null | ServiceTierResponse;
|
|
157
809
|
/**
|
|
158
|
-
*
|
|
810
|
+
* This fingerprint represents the backend configuration that the model runs with.
|
|
811
|
+
* Can be used in conjunction with the `seed` request parameter to understand when backend changes have been made that might impact determinism.
|
|
159
812
|
*/
|
|
160
|
-
|
|
813
|
+
system_fingerprint?: string | null;
|
|
161
814
|
/**
|
|
162
|
-
*
|
|
815
|
+
* The object type, which is always `chat.completion.chunk`.
|
|
163
816
|
*/
|
|
164
|
-
|
|
817
|
+
object: string;
|
|
818
|
+
usage?: null | CompletionUsage;
|
|
819
|
+
};
|
|
820
|
+
|
|
821
|
+
export type CreateEmbeddingRequest = {
|
|
165
822
|
/**
|
|
166
|
-
*
|
|
823
|
+
* ID of the model to use. You can use the
|
|
824
|
+
* [List models](https://platform.openai.com/docs/api-reference/models/list)
|
|
825
|
+
* API to see all of your available models, or see our
|
|
826
|
+
* [Model overview](https://platform.openai.com/docs/models/overview)
|
|
827
|
+
* for descriptions of them.
|
|
167
828
|
*/
|
|
168
|
-
|
|
829
|
+
model: string;
|
|
169
830
|
/**
|
|
170
|
-
*
|
|
831
|
+
* Input text to embed, encoded as a string or array of tokens. To embed multiple inputs in a single request, pass an array of strings or array of token arrays. The input must not exceed the max input tokens for the model (8192 tokens for `text-embedding-ada-002`), cannot be an empty string, and any array must be 2048 dimensions or less. [Example Python code](https://cookbook.openai.com/examples/how_to_count_tokens_with_tiktoken) for counting tokens.
|
|
171
832
|
*/
|
|
172
|
-
|
|
833
|
+
input: EmbeddingInput;
|
|
834
|
+
encoding_format?: null | EncodingFormat;
|
|
173
835
|
/**
|
|
174
|
-
*
|
|
836
|
+
* A unique identifier representing your end-user, which will help OpenAI
|
|
837
|
+
* to monitor and detect abuse. [Learn more](https://platform.openai.com/docs/usage-policies/end-user-ids).
|
|
175
838
|
*/
|
|
176
|
-
|
|
839
|
+
user?: string | null;
|
|
840
|
+
/**
|
|
841
|
+
* The number of dimensions the resulting output embeddings should have. Only supported in `text-embedding-3` and later models.
|
|
842
|
+
*/
|
|
843
|
+
dimensions?: number | null;
|
|
177
844
|
};
|
|
178
845
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
*/
|
|
182
|
-
export type CreateApiTokenRequest = {
|
|
846
|
+
export type CreateEmbeddingResponse = {
|
|
847
|
+
object: string;
|
|
183
848
|
/**
|
|
184
|
-
*
|
|
849
|
+
* The name of the model used to generate the embedding.
|
|
185
850
|
*/
|
|
186
|
-
|
|
851
|
+
model: string;
|
|
852
|
+
/**
|
|
853
|
+
* The list of embeddings generated by the model.
|
|
854
|
+
*/
|
|
855
|
+
data: Array<Embedding>;
|
|
856
|
+
/**
|
|
857
|
+
* The usage information for the request.
|
|
858
|
+
*/
|
|
859
|
+
usage: EmbeddingUsage;
|
|
187
860
|
};
|
|
188
861
|
|
|
189
862
|
export type DownloadRequest = {
|
|
190
|
-
created_at: string;
|
|
191
|
-
downloaded_bytes?: number;
|
|
192
|
-
error?: string | null;
|
|
193
|
-
filename: string;
|
|
194
863
|
id: string;
|
|
195
864
|
repo: string;
|
|
196
|
-
|
|
865
|
+
filename: string;
|
|
197
866
|
status: DownloadStatus;
|
|
198
|
-
|
|
867
|
+
error?: string | null;
|
|
868
|
+
created_at: string;
|
|
199
869
|
updated_at: string;
|
|
870
|
+
total_bytes?: number | null;
|
|
871
|
+
downloaded_bytes?: number;
|
|
872
|
+
started_at: string;
|
|
200
873
|
};
|
|
201
874
|
|
|
202
875
|
export type DownloadStatus = 'pending' | 'completed' | 'error';
|
|
203
876
|
|
|
204
877
|
export type Duration = string;
|
|
205
878
|
|
|
206
|
-
|
|
207
|
-
|
|
879
|
+
/**
|
|
880
|
+
* Represents an embedding vector returned by embedding endpoint.
|
|
881
|
+
*/
|
|
882
|
+
export type Embedding = {
|
|
883
|
+
/**
|
|
884
|
+
* The index of the embedding in the list of embeddings.
|
|
885
|
+
*/
|
|
886
|
+
index: number;
|
|
887
|
+
/**
|
|
888
|
+
* The object type, which is always "embedding".
|
|
889
|
+
*/
|
|
890
|
+
object: string;
|
|
891
|
+
/**
|
|
892
|
+
* The embedding vector, which is a list of floats. The length of vector
|
|
893
|
+
* depends on the model as listed in the [embedding guide](https://platform.openai.com/docs/guides/embeddings).
|
|
894
|
+
*/
|
|
895
|
+
embedding: Array<number>;
|
|
208
896
|
};
|
|
209
897
|
|
|
210
|
-
export type
|
|
898
|
+
export type EmbeddingInput = string | Array<string> | Array<number> | Array<Array<number>>;
|
|
899
|
+
|
|
900
|
+
export type EmbeddingUsage = {
|
|
211
901
|
/**
|
|
212
|
-
*
|
|
902
|
+
* The number of tokens used by the prompt.
|
|
213
903
|
*/
|
|
214
|
-
|
|
904
|
+
prompt_tokens: number;
|
|
215
905
|
/**
|
|
216
|
-
*
|
|
906
|
+
* The total number of tokens used by the request.
|
|
217
907
|
*/
|
|
218
|
-
|
|
908
|
+
total_tokens: number;
|
|
909
|
+
};
|
|
910
|
+
|
|
911
|
+
export type EncodingFormat = 'float' | 'base64';
|
|
912
|
+
|
|
913
|
+
export type ErrorBody = {
|
|
219
914
|
/**
|
|
220
|
-
*
|
|
915
|
+
* Human-readable error message describing what went wrong
|
|
221
916
|
*/
|
|
222
|
-
|
|
917
|
+
message: string;
|
|
223
918
|
/**
|
|
224
919
|
* Error type categorizing the kind of error that occurred
|
|
225
920
|
*/
|
|
226
921
|
type: string;
|
|
922
|
+
/**
|
|
923
|
+
* Specific error code for programmatic error handling
|
|
924
|
+
*/
|
|
925
|
+
code?: string | null;
|
|
926
|
+
/**
|
|
927
|
+
* Parameter name that caused the error (for validation errors)
|
|
928
|
+
*/
|
|
929
|
+
param?: string | null;
|
|
227
930
|
};
|
|
228
931
|
|
|
229
932
|
/**
|
|
@@ -231,17 +934,13 @@ export type ErrorBody = {
|
|
|
231
934
|
*/
|
|
232
935
|
export type FetchModelsRequest = {
|
|
233
936
|
/**
|
|
234
|
-
*
|
|
937
|
+
* Credentials to use for fetching models
|
|
235
938
|
*/
|
|
236
|
-
|
|
939
|
+
creds?: TestCreds;
|
|
237
940
|
/**
|
|
238
|
-
* API base URL (
|
|
941
|
+
* API base URL (required - always needed to know where to fetch models from)
|
|
239
942
|
*/
|
|
240
943
|
base_url: string;
|
|
241
|
-
/**
|
|
242
|
-
* API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
|
|
243
|
-
*/
|
|
244
|
-
id?: string;
|
|
245
944
|
};
|
|
246
945
|
|
|
247
946
|
/**
|
|
@@ -251,12 +950,90 @@ export type FetchModelsResponse = {
|
|
|
251
950
|
models: Array<string>;
|
|
252
951
|
};
|
|
253
952
|
|
|
953
|
+
export type FinishReason = 'stop' | 'length' | 'tool_calls' | 'content_filter' | 'function_call';
|
|
954
|
+
|
|
955
|
+
/**
|
|
956
|
+
* The name and arguments of a function that should be called, as generated by the model.
|
|
957
|
+
*/
|
|
958
|
+
export type FunctionCall = {
|
|
959
|
+
/**
|
|
960
|
+
* The name of the function to call.
|
|
961
|
+
*/
|
|
962
|
+
name: string;
|
|
963
|
+
/**
|
|
964
|
+
* The arguments to call the function with, as generated by the model in JSON format. Note that the model does not always generate valid JSON, and may hallucinate parameters not defined by your function schema. Validate the arguments in your code before calling your function.
|
|
965
|
+
*/
|
|
966
|
+
arguments: string;
|
|
967
|
+
};
|
|
968
|
+
|
|
969
|
+
export type FunctionCallStream = {
|
|
970
|
+
/**
|
|
971
|
+
* The name of the function to call.
|
|
972
|
+
*/
|
|
973
|
+
name?: string | null;
|
|
974
|
+
/**
|
|
975
|
+
* The arguments to call the function with, as generated by the model in JSON format.
|
|
976
|
+
* Note that the model does not always generate valid JSON, and may hallucinate
|
|
977
|
+
* parameters not defined by your function schema. Validate the arguments in your
|
|
978
|
+
* code before calling your function.
|
|
979
|
+
*/
|
|
980
|
+
arguments?: string | null;
|
|
981
|
+
};
|
|
982
|
+
|
|
983
|
+
export type FunctionName = {
|
|
984
|
+
/**
|
|
985
|
+
* The name of the function to call.
|
|
986
|
+
*/
|
|
987
|
+
name: string;
|
|
988
|
+
};
|
|
989
|
+
|
|
990
|
+
export type FunctionObject = {
|
|
991
|
+
/**
|
|
992
|
+
* The name of the function to be called. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
993
|
+
*/
|
|
994
|
+
name: string;
|
|
995
|
+
/**
|
|
996
|
+
* A description of what the function does, used by the model to choose when and how to call the function.
|
|
997
|
+
*/
|
|
998
|
+
description?: string | null;
|
|
999
|
+
/**
|
|
1000
|
+
* The parameters the functions accepts, described as a JSON Schema object. See the [guide](https://platform.openai.com/docs/guides/text-generation/function-calling) for examples, and the [JSON Schema reference](https://json-schema.org/understanding-json-schema/) for documentation about the format.
|
|
1001
|
+
*
|
|
1002
|
+
* Omitting `parameters` defines a function with an empty parameter list.
|
|
1003
|
+
*/
|
|
1004
|
+
parameters?: unknown;
|
|
1005
|
+
/**
|
|
1006
|
+
* Whether to enable strict schema adherence when generating the function call. If set to true, the model will follow the exact schema defined in the `parameters` field. Only a subset of JSON Schema is supported when `strict` is `true`. Learn more about Structured Outputs in the [function calling guide](https://platform.openai.com/docs/guides/function-calling).
|
|
1007
|
+
*/
|
|
1008
|
+
strict?: boolean | null;
|
|
1009
|
+
};
|
|
1010
|
+
|
|
1011
|
+
export type ImageDetail = 'auto' | 'low' | 'high';
|
|
1012
|
+
|
|
1013
|
+
export type ImageUrl = {
|
|
1014
|
+
/**
|
|
1015
|
+
* Either a URL of the image or the base64 encoded image data.
|
|
1016
|
+
*/
|
|
1017
|
+
url: string;
|
|
1018
|
+
detail?: null | ImageDetail;
|
|
1019
|
+
};
|
|
1020
|
+
|
|
1021
|
+
export type InputAudio = {
|
|
1022
|
+
/**
|
|
1023
|
+
* Base64 encoded audio data.
|
|
1024
|
+
*/
|
|
1025
|
+
data: string;
|
|
1026
|
+
/**
|
|
1027
|
+
* The format of the encoded audio data. Currently supports "wav" and "mp3".
|
|
1028
|
+
*/
|
|
1029
|
+
format: InputAudioFormat;
|
|
1030
|
+
};
|
|
1031
|
+
|
|
1032
|
+
export type InputAudioFormat = 'wav' | 'mp3';
|
|
1033
|
+
|
|
254
1034
|
export type ListModelResponse = {
|
|
1035
|
+
object: string;
|
|
255
1036
|
data: Array<{
|
|
256
|
-
/**
|
|
257
|
-
* The Unix timestamp (in seconds) when the model was created.
|
|
258
|
-
*/
|
|
259
|
-
created: number;
|
|
260
1037
|
/**
|
|
261
1038
|
* The model identifier, which can be referenced in the API endpoints.
|
|
262
1039
|
*/
|
|
@@ -265,12 +1042,15 @@ export type ListModelResponse = {
|
|
|
265
1042
|
* The object type, which is always "model".
|
|
266
1043
|
*/
|
|
267
1044
|
object: string;
|
|
1045
|
+
/**
|
|
1046
|
+
* The Unix timestamp (in seconds) when the model was created.
|
|
1047
|
+
*/
|
|
1048
|
+
created: number;
|
|
268
1049
|
/**
|
|
269
1050
|
* The organization that owns the model.
|
|
270
1051
|
*/
|
|
271
1052
|
owned_by: string;
|
|
272
1053
|
}>;
|
|
273
|
-
object: string;
|
|
274
1054
|
};
|
|
275
1055
|
|
|
276
1056
|
/**
|
|
@@ -282,40 +1062,40 @@ export type ListUsersParams = {
|
|
|
282
1062
|
};
|
|
283
1063
|
|
|
284
1064
|
export type LocalModelResponse = {
|
|
285
|
-
filename: string;
|
|
286
|
-
model_params: {};
|
|
287
1065
|
repo: string;
|
|
288
|
-
|
|
1066
|
+
filename: string;
|
|
289
1067
|
snapshot: string;
|
|
1068
|
+
size?: number | null;
|
|
1069
|
+
model_params: {};
|
|
290
1070
|
};
|
|
291
1071
|
|
|
292
1072
|
export type Message = {
|
|
1073
|
+
role: string;
|
|
293
1074
|
content: string;
|
|
294
1075
|
images?: Array<string> | null;
|
|
295
|
-
role: string;
|
|
296
1076
|
};
|
|
297
1077
|
|
|
298
1078
|
export type Model = {
|
|
299
|
-
details: ModelDetails;
|
|
300
|
-
digest: string;
|
|
301
1079
|
model: string;
|
|
302
1080
|
modified_at: number;
|
|
303
1081
|
size: number;
|
|
1082
|
+
digest: string;
|
|
1083
|
+
details: ModelDetails;
|
|
304
1084
|
};
|
|
305
1085
|
|
|
306
1086
|
export type ModelAlias = {
|
|
307
1087
|
alias: string;
|
|
308
|
-
filename: string;
|
|
309
1088
|
repo: string;
|
|
1089
|
+
filename: string;
|
|
310
1090
|
snapshot: string;
|
|
311
1091
|
};
|
|
312
1092
|
|
|
313
1093
|
export type ModelDetails = {
|
|
314
|
-
|
|
315
|
-
family: string;
|
|
1094
|
+
parent_model?: string | null;
|
|
316
1095
|
format: string;
|
|
1096
|
+
family: string;
|
|
1097
|
+
families?: Array<string> | null;
|
|
317
1098
|
parameter_size: string;
|
|
318
|
-
parent_model?: string | null;
|
|
319
1099
|
quantization_level: string;
|
|
320
1100
|
};
|
|
321
1101
|
|
|
@@ -323,10 +1103,6 @@ export type ModelDetails = {
|
|
|
323
1103
|
* Describes an OpenAI model offering that can be used with the API.
|
|
324
1104
|
*/
|
|
325
1105
|
export type ModelResponse = {
|
|
326
|
-
/**
|
|
327
|
-
* The Unix timestamp (in seconds) when the model was created.
|
|
328
|
-
*/
|
|
329
|
-
created: number;
|
|
330
1106
|
/**
|
|
331
1107
|
* The model identifier, which can be referenced in the API endpoints.
|
|
332
1108
|
*/
|
|
@@ -335,6 +1111,10 @@ export type ModelResponse = {
|
|
|
335
1111
|
* The object type, which is always "model".
|
|
336
1112
|
*/
|
|
337
1113
|
object: string;
|
|
1114
|
+
/**
|
|
1115
|
+
* The Unix timestamp (in seconds) when the model was created.
|
|
1116
|
+
*/
|
|
1117
|
+
created: number;
|
|
338
1118
|
/**
|
|
339
1119
|
* The organization that owns the model.
|
|
340
1120
|
*/
|
|
@@ -349,14 +1129,14 @@ export type ModelsResponse = {
|
|
|
349
1129
|
* Request to pull a model file from HuggingFace
|
|
350
1130
|
*/
|
|
351
1131
|
export type NewDownloadRequest = {
|
|
352
|
-
/**
|
|
353
|
-
* Model file name to download (typically .gguf format)
|
|
354
|
-
*/
|
|
355
|
-
filename: string;
|
|
356
1132
|
/**
|
|
357
1133
|
* HuggingFace repository name in format 'username/repository-name'
|
|
358
1134
|
*/
|
|
359
1135
|
repo: string;
|
|
1136
|
+
/**
|
|
1137
|
+
* Model file name to download (typically .gguf format)
|
|
1138
|
+
*/
|
|
1139
|
+
filename: string;
|
|
360
1140
|
};
|
|
361
1141
|
|
|
362
1142
|
export type OaiRequestParams = {
|
|
@@ -382,42 +1162,42 @@ export type OpenAiApiError = {
|
|
|
382
1162
|
};
|
|
383
1163
|
|
|
384
1164
|
export type Options = {
|
|
385
|
-
|
|
1165
|
+
num_keep?: number | null;
|
|
1166
|
+
seed?: number | null;
|
|
1167
|
+
num_predict?: number | null;
|
|
1168
|
+
top_k?: number | null;
|
|
1169
|
+
top_p?: number | null;
|
|
1170
|
+
tfs_z?: number | null;
|
|
1171
|
+
typical_p?: number | null;
|
|
1172
|
+
repeat_last_n?: number | null;
|
|
1173
|
+
temperature?: number | null;
|
|
1174
|
+
repeat_penalty?: number | null;
|
|
1175
|
+
presence_penalty?: number | null;
|
|
386
1176
|
frequency_penalty?: number | null;
|
|
387
|
-
logits_all?: boolean | null;
|
|
388
|
-
low_vram?: boolean | null;
|
|
389
|
-
main_gpu?: number | null;
|
|
390
1177
|
mirostat?: number | null;
|
|
391
|
-
mirostat_eta?: number | null;
|
|
392
1178
|
mirostat_tau?: number | null;
|
|
393
|
-
|
|
394
|
-
num_ctx?: number | null;
|
|
395
|
-
num_gpu?: number | null;
|
|
396
|
-
num_keep?: number | null;
|
|
397
|
-
num_predict?: number | null;
|
|
398
|
-
num_thread?: number | null;
|
|
399
|
-
numa?: boolean | null;
|
|
1179
|
+
mirostat_eta?: number | null;
|
|
400
1180
|
penalize_newline?: boolean | null;
|
|
401
|
-
presence_penalty?: number | null;
|
|
402
|
-
repeat_last_n?: number | null;
|
|
403
|
-
repeat_penalty?: number | null;
|
|
404
|
-
seed?: number | null;
|
|
405
1181
|
stop?: Array<string> | null;
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
1182
|
+
numa?: boolean | null;
|
|
1183
|
+
num_ctx?: number | null;
|
|
1184
|
+
num_batch?: number | null;
|
|
1185
|
+
num_gpu?: number | null;
|
|
1186
|
+
main_gpu?: number | null;
|
|
1187
|
+
low_vram?: boolean | null;
|
|
1188
|
+
f16_kv?: boolean | null;
|
|
1189
|
+
logits_all?: boolean | null;
|
|
413
1190
|
vocab_only?: boolean | null;
|
|
1191
|
+
use_mmap?: boolean | null;
|
|
1192
|
+
use_mlock?: boolean | null;
|
|
1193
|
+
num_thread?: number | null;
|
|
414
1194
|
};
|
|
415
1195
|
|
|
416
1196
|
export type PaginatedAliasResponse = {
|
|
417
1197
|
data: Array<Alias>;
|
|
1198
|
+
total: number;
|
|
418
1199
|
page: number;
|
|
419
1200
|
page_size: number;
|
|
420
|
-
total: number;
|
|
421
1201
|
};
|
|
422
1202
|
|
|
423
1203
|
/**
|
|
@@ -425,44 +1205,36 @@ export type PaginatedAliasResponse = {
|
|
|
425
1205
|
*/
|
|
426
1206
|
export type PaginatedApiModelResponse = {
|
|
427
1207
|
data: Array<ApiModelResponse>;
|
|
1208
|
+
total: number;
|
|
428
1209
|
page: number;
|
|
429
1210
|
page_size: number;
|
|
430
|
-
total: number;
|
|
431
1211
|
};
|
|
432
1212
|
|
|
433
1213
|
export type PaginatedApiTokenResponse = {
|
|
434
1214
|
data: Array<ApiToken>;
|
|
1215
|
+
total: number;
|
|
435
1216
|
page: number;
|
|
436
1217
|
page_size: number;
|
|
437
|
-
total: number;
|
|
438
1218
|
};
|
|
439
1219
|
|
|
440
1220
|
export type PaginatedDownloadResponse = {
|
|
441
1221
|
data: Array<DownloadRequest>;
|
|
1222
|
+
total: number;
|
|
442
1223
|
page: number;
|
|
443
1224
|
page_size: number;
|
|
444
|
-
total: number;
|
|
445
1225
|
};
|
|
446
1226
|
|
|
447
1227
|
export type PaginatedLocalModelResponse = {
|
|
448
1228
|
data: Array<LocalModelResponse>;
|
|
1229
|
+
total: number;
|
|
449
1230
|
page: number;
|
|
450
1231
|
page_size: number;
|
|
451
|
-
total: number;
|
|
452
1232
|
};
|
|
453
1233
|
|
|
454
1234
|
/**
|
|
455
1235
|
* Paginated response for access requests
|
|
456
1236
|
*/
|
|
457
1237
|
export type PaginatedUserAccessResponse = {
|
|
458
|
-
/**
|
|
459
|
-
* Current page number
|
|
460
|
-
*/
|
|
461
|
-
page: number;
|
|
462
|
-
/**
|
|
463
|
-
* Number of items per page
|
|
464
|
-
*/
|
|
465
|
-
page_size: number;
|
|
466
1238
|
/**
|
|
467
1239
|
* List of access requests
|
|
468
1240
|
*/
|
|
@@ -471,13 +1243,21 @@ export type PaginatedUserAccessResponse = {
|
|
|
471
1243
|
* Total number of requests
|
|
472
1244
|
*/
|
|
473
1245
|
total: number;
|
|
1246
|
+
/**
|
|
1247
|
+
* Current page number
|
|
1248
|
+
*/
|
|
1249
|
+
page: number;
|
|
1250
|
+
/**
|
|
1251
|
+
* Number of items per page
|
|
1252
|
+
*/
|
|
1253
|
+
page_size: number;
|
|
474
1254
|
};
|
|
475
1255
|
|
|
476
1256
|
export type PaginatedUserAliasResponse = {
|
|
477
1257
|
data: Array<UserAliasResponse>;
|
|
1258
|
+
total: number;
|
|
478
1259
|
page: number;
|
|
479
1260
|
page_size: number;
|
|
480
|
-
total: number;
|
|
481
1261
|
};
|
|
482
1262
|
|
|
483
1263
|
/**
|
|
@@ -512,6 +1292,40 @@ export type PingResponse = {
|
|
|
512
1292
|
message: string;
|
|
513
1293
|
};
|
|
514
1294
|
|
|
1295
|
+
/**
|
|
1296
|
+
* The type of the predicted content you want to provide. This type is
|
|
1297
|
+
* currently always `content`.
|
|
1298
|
+
*/
|
|
1299
|
+
export type PredictionContent = {
|
|
1300
|
+
/**
|
|
1301
|
+
* The type of the predicted content you want to provide. This type is
|
|
1302
|
+
* currently always `content`.
|
|
1303
|
+
*/
|
|
1304
|
+
content: PredictionContentContent;
|
|
1305
|
+
type: 'content';
|
|
1306
|
+
};
|
|
1307
|
+
|
|
1308
|
+
/**
|
|
1309
|
+
* The content that should be matched when generating a model response. If generated tokens would match this content, the entire model response can be returned much more quickly.
|
|
1310
|
+
*/
|
|
1311
|
+
export type PredictionContentContent = string | Array<ChatCompletionRequestMessageContentPartText>;
|
|
1312
|
+
|
|
1313
|
+
/**
|
|
1314
|
+
* Breakdown of tokens used in a completion.
|
|
1315
|
+
*/
|
|
1316
|
+
export type PromptTokensDetails = {
|
|
1317
|
+
/**
|
|
1318
|
+
* Audio input tokens present in the prompt.
|
|
1319
|
+
*/
|
|
1320
|
+
audio_tokens?: number | null;
|
|
1321
|
+
/**
|
|
1322
|
+
* Cached tokens present in the prompt.
|
|
1323
|
+
*/
|
|
1324
|
+
cached_tokens?: number | null;
|
|
1325
|
+
};
|
|
1326
|
+
|
|
1327
|
+
export type ReasoningEffort = 'minimal' | 'low' | 'medium' | 'high';
|
|
1328
|
+
|
|
515
1329
|
export type RedirectResponse = {
|
|
516
1330
|
/**
|
|
517
1331
|
* The URL to redirect to (OAuth authorization URL or application home page)
|
|
@@ -519,21 +1333,55 @@ export type RedirectResponse = {
|
|
|
519
1333
|
location: string;
|
|
520
1334
|
};
|
|
521
1335
|
|
|
522
|
-
export type
|
|
1336
|
+
export type ResourceRole = 'resource_user' | 'resource_power_user' | 'resource_manager' | 'resource_admin';
|
|
1337
|
+
|
|
1338
|
+
export type ResponseFormat = {
|
|
1339
|
+
type: 'text';
|
|
1340
|
+
} | {
|
|
1341
|
+
type: 'json_object';
|
|
1342
|
+
} | {
|
|
1343
|
+
json_schema: ResponseFormatJsonSchema;
|
|
1344
|
+
type: 'json_schema';
|
|
1345
|
+
};
|
|
1346
|
+
|
|
1347
|
+
export type ResponseFormatJsonSchema = {
|
|
1348
|
+
/**
|
|
1349
|
+
* A description of what the response format is for, used by the model to determine how to respond in the format.
|
|
1350
|
+
*/
|
|
1351
|
+
description?: string | null;
|
|
1352
|
+
/**
|
|
1353
|
+
* The name of the response format. Must be a-z, A-Z, 0-9, or contain underscores and dashes, with a maximum length of 64.
|
|
1354
|
+
*/
|
|
1355
|
+
name: string;
|
|
1356
|
+
/**
|
|
1357
|
+
* The schema for the response format, described as a JSON Schema object.
|
|
1358
|
+
*/
|
|
1359
|
+
schema?: unknown;
|
|
1360
|
+
/**
|
|
1361
|
+
* Whether to enable strict schema adherence when generating the output. If set to true, the model will always follow the exact schema defined in the `schema` field. Only a subset of JSON Schema is supported when `strict` is `true`. To learn more, read the [Structured Outputs guide](https://platform.openai.com/docs/guides/structured-outputs).
|
|
1362
|
+
*/
|
|
1363
|
+
strict?: boolean | null;
|
|
1364
|
+
};
|
|
1365
|
+
|
|
1366
|
+
export type Role = 'system' | 'user' | 'assistant' | 'tool' | 'function';
|
|
1367
|
+
|
|
1368
|
+
export type ServiceTier = 'auto' | 'default' | 'flex' | 'scale' | 'priority';
|
|
1369
|
+
|
|
1370
|
+
export type ServiceTierResponse = 'scale' | 'default' | 'flex' | 'priority';
|
|
523
1371
|
|
|
524
1372
|
export type SettingInfo = {
|
|
1373
|
+
key: string;
|
|
525
1374
|
current_value: unknown;
|
|
526
1375
|
default_value: unknown;
|
|
527
|
-
key: string;
|
|
528
|
-
metadata: SettingMetadata;
|
|
529
1376
|
source: SettingSource;
|
|
1377
|
+
metadata: SettingMetadata;
|
|
530
1378
|
};
|
|
531
1379
|
|
|
532
1380
|
export type SettingMetadata = {
|
|
533
1381
|
type: 'string';
|
|
534
1382
|
} | {
|
|
535
|
-
max: number;
|
|
536
1383
|
min: number;
|
|
1384
|
+
max: number;
|
|
537
1385
|
type: 'number';
|
|
538
1386
|
} | {
|
|
539
1387
|
type: 'boolean';
|
|
@@ -548,14 +1396,14 @@ export type SettingSource = 'system' | 'command_line' | 'environment' | 'setting
|
|
|
548
1396
|
* Request to setup the application in authenticated mode
|
|
549
1397
|
*/
|
|
550
1398
|
export type SetupRequest = {
|
|
551
|
-
/**
|
|
552
|
-
* Optional description of the server's purpose
|
|
553
|
-
*/
|
|
554
|
-
description?: string | null;
|
|
555
1399
|
/**
|
|
556
1400
|
* Server name for identification (minimum 10 characters)
|
|
557
1401
|
*/
|
|
558
1402
|
name: string;
|
|
1403
|
+
/**
|
|
1404
|
+
* Optional description of the server's purpose
|
|
1405
|
+
*/
|
|
1406
|
+
description?: string | null;
|
|
559
1407
|
};
|
|
560
1408
|
|
|
561
1409
|
/**
|
|
@@ -582,22 +1430,37 @@ export type ShowResponse = {
|
|
|
582
1430
|
template: string;
|
|
583
1431
|
};
|
|
584
1432
|
|
|
1433
|
+
export type Stop = string | Array<string>;
|
|
1434
|
+
|
|
1435
|
+
/**
|
|
1436
|
+
* Credentials for test/fetch operations
|
|
1437
|
+
*/
|
|
1438
|
+
export type TestCreds = {
|
|
1439
|
+
/**
|
|
1440
|
+
* Look up credentials from stored API model
|
|
1441
|
+
*/
|
|
1442
|
+
value: string;
|
|
1443
|
+
type: 'id';
|
|
1444
|
+
} | {
|
|
1445
|
+
/**
|
|
1446
|
+
* Use direct API key (null for no authentication)
|
|
1447
|
+
*/
|
|
1448
|
+
value: ApiKey;
|
|
1449
|
+
type: 'api_key';
|
|
1450
|
+
};
|
|
1451
|
+
|
|
585
1452
|
/**
|
|
586
1453
|
* Request to test API connectivity with a prompt
|
|
587
1454
|
*/
|
|
588
1455
|
export type TestPromptRequest = {
|
|
589
1456
|
/**
|
|
590
|
-
*
|
|
1457
|
+
* Credentials to use for testing
|
|
591
1458
|
*/
|
|
592
|
-
|
|
1459
|
+
creds?: TestCreds;
|
|
593
1460
|
/**
|
|
594
|
-
* API base URL
|
|
1461
|
+
* API base URL
|
|
595
1462
|
*/
|
|
596
1463
|
base_url: string;
|
|
597
|
-
/**
|
|
598
|
-
* API model ID to look up stored credentials (provide either api_key OR id, api_key takes preference if both provided)
|
|
599
|
-
*/
|
|
600
|
-
id?: string;
|
|
601
1464
|
/**
|
|
602
1465
|
* Model to use for testing
|
|
603
1466
|
*/
|
|
@@ -612,21 +1475,43 @@ export type TestPromptRequest = {
|
|
|
612
1475
|
* Response from testing API connectivity
|
|
613
1476
|
*/
|
|
614
1477
|
export type TestPromptResponse = {
|
|
615
|
-
error?: string | null;
|
|
616
|
-
response?: string | null;
|
|
617
1478
|
success: boolean;
|
|
1479
|
+
response?: string | null;
|
|
1480
|
+
error?: string | null;
|
|
1481
|
+
};
|
|
1482
|
+
|
|
1483
|
+
/**
|
|
1484
|
+
* API Token information response
|
|
1485
|
+
*/
|
|
1486
|
+
export type TokenInfo = {
|
|
1487
|
+
role: TokenScope;
|
|
618
1488
|
};
|
|
619
1489
|
|
|
620
1490
|
export type TokenScope = 'scope_token_user' | 'scope_token_power_user' | 'scope_token_manager' | 'scope_token_admin';
|
|
621
1491
|
|
|
622
1492
|
export type TokenStatus = 'active' | 'inactive';
|
|
623
1493
|
|
|
1494
|
+
export type TopLogprobs = {
|
|
1495
|
+
/**
|
|
1496
|
+
* The token.
|
|
1497
|
+
*/
|
|
1498
|
+
token: string;
|
|
1499
|
+
/**
|
|
1500
|
+
* The log probability of this token.
|
|
1501
|
+
*/
|
|
1502
|
+
logprob: number;
|
|
1503
|
+
/**
|
|
1504
|
+
* A list of integers representing the UTF-8 bytes representation of the token. Useful in instances where characters are represented by multiple tokens and their byte representations must be combined to generate the correct text representation. Can be `null` if there is no bytes representation for the token.
|
|
1505
|
+
*/
|
|
1506
|
+
bytes?: Array<number> | null;
|
|
1507
|
+
};
|
|
1508
|
+
|
|
624
1509
|
export type UpdateAliasRequest = {
|
|
625
|
-
context_params?: Array<string> | null;
|
|
626
|
-
filename: string;
|
|
627
1510
|
repo: string;
|
|
628
|
-
|
|
1511
|
+
filename: string;
|
|
629
1512
|
snapshot?: string | null;
|
|
1513
|
+
request_params?: null | OaiRequestParams;
|
|
1514
|
+
context_params?: Array<string> | null;
|
|
630
1515
|
};
|
|
631
1516
|
|
|
632
1517
|
/**
|
|
@@ -637,14 +1522,14 @@ export type UpdateApiModelRequest = {
|
|
|
637
1522
|
* API format/protocol (required)
|
|
638
1523
|
*/
|
|
639
1524
|
api_format: ApiFormat;
|
|
640
|
-
/**
|
|
641
|
-
* API key for authentication (optional, only update if provided for security)
|
|
642
|
-
*/
|
|
643
|
-
api_key?: string | null;
|
|
644
1525
|
/**
|
|
645
1526
|
* API base URL (required)
|
|
646
1527
|
*/
|
|
647
1528
|
base_url: string;
|
|
1529
|
+
/**
|
|
1530
|
+
* API key update action (Keep/Set with Some or None)
|
|
1531
|
+
*/
|
|
1532
|
+
api_key?: ApiKeyUpdateAction;
|
|
648
1533
|
/**
|
|
649
1534
|
* List of available models (required)
|
|
650
1535
|
*/
|
|
@@ -680,31 +1565,31 @@ export type UpdateSettingRequest = {
|
|
|
680
1565
|
};
|
|
681
1566
|
|
|
682
1567
|
export type UserAccessRequest = {
|
|
683
|
-
/**
|
|
684
|
-
* Creation timestamp
|
|
685
|
-
*/
|
|
686
|
-
created_at: string;
|
|
687
1568
|
/**
|
|
688
1569
|
* Unique identifier for the request
|
|
689
1570
|
*/
|
|
690
1571
|
id: number;
|
|
1572
|
+
/**
|
|
1573
|
+
* Username of the requesting user
|
|
1574
|
+
*/
|
|
1575
|
+
username: string;
|
|
1576
|
+
/**
|
|
1577
|
+
* User ID (UUID) of the requesting user
|
|
1578
|
+
*/
|
|
1579
|
+
user_id: string;
|
|
691
1580
|
reviewer?: string | null;
|
|
692
1581
|
/**
|
|
693
1582
|
* Current status of the request
|
|
694
1583
|
*/
|
|
695
1584
|
status: UserAccessRequestStatus;
|
|
696
1585
|
/**
|
|
697
|
-
*
|
|
698
|
-
*/
|
|
699
|
-
updated_at: string;
|
|
700
|
-
/**
|
|
701
|
-
* User ID (UUID) of the requesting user
|
|
1586
|
+
* Creation timestamp
|
|
702
1587
|
*/
|
|
703
|
-
|
|
1588
|
+
created_at: string;
|
|
704
1589
|
/**
|
|
705
|
-
*
|
|
1590
|
+
* Last update timestamp
|
|
706
1591
|
*/
|
|
707
|
-
|
|
1592
|
+
updated_at: string;
|
|
708
1593
|
};
|
|
709
1594
|
|
|
710
1595
|
export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
|
|
@@ -714,60 +1599,60 @@ export type UserAccessRequestStatus = 'pending' | 'approved' | 'rejected';
|
|
|
714
1599
|
*/
|
|
715
1600
|
export type UserAccessStatusResponse = {
|
|
716
1601
|
/**
|
|
717
|
-
*
|
|
1602
|
+
* Username of the requesting user
|
|
718
1603
|
*/
|
|
719
|
-
|
|
1604
|
+
username: string;
|
|
720
1605
|
/**
|
|
721
1606
|
* Current status of the request (pending, approved, rejected)
|
|
722
1607
|
*/
|
|
723
1608
|
status: UserAccessRequestStatus;
|
|
724
1609
|
/**
|
|
725
|
-
*
|
|
1610
|
+
* Creation timestamp
|
|
726
1611
|
*/
|
|
727
|
-
|
|
1612
|
+
created_at: string;
|
|
728
1613
|
/**
|
|
729
|
-
*
|
|
1614
|
+
* Last update timestamp
|
|
730
1615
|
*/
|
|
731
|
-
|
|
1616
|
+
updated_at: string;
|
|
732
1617
|
};
|
|
733
1618
|
|
|
734
1619
|
export type UserAlias = {
|
|
735
1620
|
alias: string;
|
|
736
|
-
context_params?: Array<string>;
|
|
737
|
-
filename: string;
|
|
738
1621
|
repo: string;
|
|
739
|
-
|
|
1622
|
+
filename: string;
|
|
740
1623
|
snapshot: string;
|
|
1624
|
+
request_params?: OaiRequestParams;
|
|
1625
|
+
context_params?: Array<string>;
|
|
741
1626
|
};
|
|
742
1627
|
|
|
743
1628
|
export type UserAliasResponse = {
|
|
744
1629
|
alias: string;
|
|
745
|
-
context_params: Array<string>;
|
|
746
|
-
filename: string;
|
|
747
|
-
model_params: {};
|
|
748
1630
|
repo: string;
|
|
749
|
-
|
|
1631
|
+
filename: string;
|
|
750
1632
|
snapshot: string;
|
|
751
1633
|
source: string;
|
|
1634
|
+
model_params: {};
|
|
1635
|
+
request_params: OaiRequestParams;
|
|
1636
|
+
context_params: Array<string>;
|
|
752
1637
|
};
|
|
753
1638
|
|
|
754
1639
|
export type UserInfo = {
|
|
1640
|
+
user_id: string;
|
|
1641
|
+
username: string;
|
|
755
1642
|
first_name?: string | null;
|
|
756
1643
|
last_name?: string | null;
|
|
757
1644
|
role?: null | AppRole;
|
|
758
|
-
user_id: string;
|
|
759
|
-
username: string;
|
|
760
1645
|
};
|
|
761
1646
|
|
|
762
1647
|
export type UserListResponse = {
|
|
763
1648
|
client_id: string;
|
|
764
|
-
|
|
765
|
-
has_previous: boolean;
|
|
1649
|
+
users: Array<UserInfo>;
|
|
766
1650
|
page: number;
|
|
767
1651
|
page_size: number;
|
|
768
1652
|
total_pages: number;
|
|
769
1653
|
total_users: number;
|
|
770
|
-
|
|
1654
|
+
has_next: boolean;
|
|
1655
|
+
has_previous: boolean;
|
|
771
1656
|
};
|
|
772
1657
|
|
|
773
1658
|
/**
|
|
@@ -777,10 +1662,54 @@ export type UserResponse = {
|
|
|
777
1662
|
auth_status: 'logged_out';
|
|
778
1663
|
} | (UserInfo & {
|
|
779
1664
|
auth_status: 'logged_in';
|
|
1665
|
+
}) | (TokenInfo & {
|
|
1666
|
+
auth_status: 'api_token';
|
|
780
1667
|
});
|
|
781
1668
|
|
|
782
1669
|
export type UserScope = 'scope_user_user' | 'scope_user_power_user' | 'scope_user_manager' | 'scope_user_admin';
|
|
783
1670
|
|
|
1671
|
+
/**
|
|
1672
|
+
* The amount of context window space to use for the search.
|
|
1673
|
+
*/
|
|
1674
|
+
export type WebSearchContextSize = 'low' | 'medium' | 'high';
|
|
1675
|
+
|
|
1676
|
+
/**
|
|
1677
|
+
* Approximate location parameters for the search.
|
|
1678
|
+
*/
|
|
1679
|
+
export type WebSearchLocation = {
|
|
1680
|
+
/**
|
|
1681
|
+
* The two-letter [ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1) of the user, e.g. `US`.
|
|
1682
|
+
*/
|
|
1683
|
+
country?: string | null;
|
|
1684
|
+
/**
|
|
1685
|
+
* Free text input for the region of the user, e.g. `California`.
|
|
1686
|
+
*/
|
|
1687
|
+
region?: string | null;
|
|
1688
|
+
/**
|
|
1689
|
+
* Free text input for the city of the user, e.g. `San Francisco`.
|
|
1690
|
+
*/
|
|
1691
|
+
city?: string | null;
|
|
1692
|
+
/**
|
|
1693
|
+
* The [IANA timezone](https://timeapi.io/documentation/iana-timezones) of the user, e.g. `America/Los_Angeles`.
|
|
1694
|
+
*/
|
|
1695
|
+
timezone?: string | null;
|
|
1696
|
+
};
|
|
1697
|
+
|
|
1698
|
+
/**
|
|
1699
|
+
* Options for the web search tool.
|
|
1700
|
+
*/
|
|
1701
|
+
export type WebSearchOptions = {
|
|
1702
|
+
search_context_size?: null | WebSearchContextSize;
|
|
1703
|
+
user_location?: null | WebSearchUserLocation;
|
|
1704
|
+
};
|
|
1705
|
+
|
|
1706
|
+
export type WebSearchUserLocation = {
|
|
1707
|
+
type: WebSearchUserLocationType;
|
|
1708
|
+
approximate: WebSearchLocation;
|
|
1709
|
+
};
|
|
1710
|
+
|
|
1711
|
+
export type WebSearchUserLocationType = 'approximate';
|
|
1712
|
+
|
|
784
1713
|
export type ChatOllamaModelData = {
|
|
785
1714
|
/**
|
|
786
1715
|
* Chat request in Ollama format
|
|
@@ -793,9 +1722,17 @@ export type ChatOllamaModelData = {
|
|
|
793
1722
|
|
|
794
1723
|
export type ChatOllamaModelErrors = {
|
|
795
1724
|
/**
|
|
796
|
-
* Invalid request
|
|
1725
|
+
* Invalid request parameters
|
|
1726
|
+
*/
|
|
1727
|
+
400: OpenAiApiError;
|
|
1728
|
+
/**
|
|
1729
|
+
* Not authenticated
|
|
1730
|
+
*/
|
|
1731
|
+
401: OpenAiApiError;
|
|
1732
|
+
/**
|
|
1733
|
+
* Insufficient permissions
|
|
797
1734
|
*/
|
|
798
|
-
|
|
1735
|
+
403: OpenAiApiError;
|
|
799
1736
|
/**
|
|
800
1737
|
* Model not found
|
|
801
1738
|
*/
|
|
@@ -803,7 +1740,7 @@ export type ChatOllamaModelErrors = {
|
|
|
803
1740
|
/**
|
|
804
1741
|
* Internal server error
|
|
805
1742
|
*/
|
|
806
|
-
500:
|
|
1743
|
+
500: OpenAiApiError;
|
|
807
1744
|
};
|
|
808
1745
|
|
|
809
1746
|
export type ChatOllamaModelError = ChatOllamaModelErrors[keyof ChatOllamaModelErrors];
|
|
@@ -826,6 +1763,18 @@ export type ShowOllamaModelData = {
|
|
|
826
1763
|
};
|
|
827
1764
|
|
|
828
1765
|
export type ShowOllamaModelErrors = {
|
|
1766
|
+
/**
|
|
1767
|
+
* Invalid request parameters
|
|
1768
|
+
*/
|
|
1769
|
+
400: OpenAiApiError;
|
|
1770
|
+
/**
|
|
1771
|
+
* Not authenticated
|
|
1772
|
+
*/
|
|
1773
|
+
401: OpenAiApiError;
|
|
1774
|
+
/**
|
|
1775
|
+
* Insufficient permissions
|
|
1776
|
+
*/
|
|
1777
|
+
403: OpenAiApiError;
|
|
829
1778
|
/**
|
|
830
1779
|
* Model not found
|
|
831
1780
|
*/
|
|
@@ -833,7 +1782,7 @@ export type ShowOllamaModelErrors = {
|
|
|
833
1782
|
/**
|
|
834
1783
|
* Internal server error
|
|
835
1784
|
*/
|
|
836
|
-
500:
|
|
1785
|
+
500: OpenAiApiError;
|
|
837
1786
|
};
|
|
838
1787
|
|
|
839
1788
|
export type ShowOllamaModelError = ShowOllamaModelErrors[keyof ShowOllamaModelErrors];
|
|
@@ -855,10 +1804,22 @@ export type ListOllamaModelsData = {
|
|
|
855
1804
|
};
|
|
856
1805
|
|
|
857
1806
|
export type ListOllamaModelsErrors = {
|
|
1807
|
+
/**
|
|
1808
|
+
* Invalid request parameters
|
|
1809
|
+
*/
|
|
1810
|
+
400: OpenAiApiError;
|
|
1811
|
+
/**
|
|
1812
|
+
* Not authenticated
|
|
1813
|
+
*/
|
|
1814
|
+
401: OpenAiApiError;
|
|
1815
|
+
/**
|
|
1816
|
+
* Insufficient permissions
|
|
1817
|
+
*/
|
|
1818
|
+
403: OpenAiApiError;
|
|
858
1819
|
/**
|
|
859
1820
|
* Internal server error
|
|
860
1821
|
*/
|
|
861
|
-
500:
|
|
1822
|
+
500: OpenAiApiError;
|
|
862
1823
|
};
|
|
863
1824
|
|
|
864
1825
|
export type ListOllamaModelsError = ListOllamaModelsErrors[keyof ListOllamaModelsErrors];
|
|
@@ -897,6 +1858,10 @@ export type ListAllAccessRequestsData = {
|
|
|
897
1858
|
};
|
|
898
1859
|
|
|
899
1860
|
export type ListAllAccessRequestsErrors = {
|
|
1861
|
+
/**
|
|
1862
|
+
* Invalid request parameters
|
|
1863
|
+
*/
|
|
1864
|
+
400: OpenAiApiError;
|
|
900
1865
|
/**
|
|
901
1866
|
* Not authenticated
|
|
902
1867
|
*/
|
|
@@ -905,6 +1870,10 @@ export type ListAllAccessRequestsErrors = {
|
|
|
905
1870
|
* Insufficient permissions
|
|
906
1871
|
*/
|
|
907
1872
|
403: OpenAiApiError;
|
|
1873
|
+
/**
|
|
1874
|
+
* Internal server error
|
|
1875
|
+
*/
|
|
1876
|
+
500: OpenAiApiError;
|
|
908
1877
|
};
|
|
909
1878
|
|
|
910
1879
|
export type ListAllAccessRequestsError = ListAllAccessRequestsErrors[keyof ListAllAccessRequestsErrors];
|
|
@@ -943,6 +1912,10 @@ export type ListPendingAccessRequestsData = {
|
|
|
943
1912
|
};
|
|
944
1913
|
|
|
945
1914
|
export type ListPendingAccessRequestsErrors = {
|
|
1915
|
+
/**
|
|
1916
|
+
* Invalid request parameters
|
|
1917
|
+
*/
|
|
1918
|
+
400: OpenAiApiError;
|
|
946
1919
|
/**
|
|
947
1920
|
* Not authenticated
|
|
948
1921
|
*/
|
|
@@ -951,6 +1924,10 @@ export type ListPendingAccessRequestsErrors = {
|
|
|
951
1924
|
* Insufficient permissions
|
|
952
1925
|
*/
|
|
953
1926
|
403: OpenAiApiError;
|
|
1927
|
+
/**
|
|
1928
|
+
* Internal server error
|
|
1929
|
+
*/
|
|
1930
|
+
500: OpenAiApiError;
|
|
954
1931
|
};
|
|
955
1932
|
|
|
956
1933
|
export type ListPendingAccessRequestsError = ListPendingAccessRequestsErrors[keyof ListPendingAccessRequestsErrors];
|
|
@@ -980,6 +1957,10 @@ export type ApproveAccessRequestData = {
|
|
|
980
1957
|
};
|
|
981
1958
|
|
|
982
1959
|
export type ApproveAccessRequestErrors = {
|
|
1960
|
+
/**
|
|
1961
|
+
* Invalid request parameters
|
|
1962
|
+
*/
|
|
1963
|
+
400: OpenAiApiError;
|
|
983
1964
|
/**
|
|
984
1965
|
* Not authenticated
|
|
985
1966
|
*/
|
|
@@ -992,6 +1973,10 @@ export type ApproveAccessRequestErrors = {
|
|
|
992
1973
|
* Request not found
|
|
993
1974
|
*/
|
|
994
1975
|
404: OpenAiApiError;
|
|
1976
|
+
/**
|
|
1977
|
+
* Internal server error
|
|
1978
|
+
*/
|
|
1979
|
+
500: OpenAiApiError;
|
|
995
1980
|
};
|
|
996
1981
|
|
|
997
1982
|
export type ApproveAccessRequestError = ApproveAccessRequestErrors[keyof ApproveAccessRequestErrors];
|
|
@@ -1016,6 +2001,10 @@ export type RejectAccessRequestData = {
|
|
|
1016
2001
|
};
|
|
1017
2002
|
|
|
1018
2003
|
export type RejectAccessRequestErrors = {
|
|
2004
|
+
/**
|
|
2005
|
+
* Invalid request parameters
|
|
2006
|
+
*/
|
|
2007
|
+
400: OpenAiApiError;
|
|
1019
2008
|
/**
|
|
1020
2009
|
* Not authenticated
|
|
1021
2010
|
*/
|
|
@@ -1028,6 +2017,10 @@ export type RejectAccessRequestErrors = {
|
|
|
1028
2017
|
* Request not found
|
|
1029
2018
|
*/
|
|
1030
2019
|
404: OpenAiApiError;
|
|
2020
|
+
/**
|
|
2021
|
+
* Internal server error
|
|
2022
|
+
*/
|
|
2023
|
+
500: OpenAiApiError;
|
|
1031
2024
|
};
|
|
1032
2025
|
|
|
1033
2026
|
export type RejectAccessRequestError = RejectAccessRequestErrors[keyof RejectAccessRequestErrors];
|
|
@@ -1065,7 +2058,19 @@ export type ListApiModelsData = {
|
|
|
1065
2058
|
|
|
1066
2059
|
export type ListApiModelsErrors = {
|
|
1067
2060
|
/**
|
|
1068
|
-
*
|
|
2061
|
+
* Invalid request parameters
|
|
2062
|
+
*/
|
|
2063
|
+
400: OpenAiApiError;
|
|
2064
|
+
/**
|
|
2065
|
+
* Not authenticated
|
|
2066
|
+
*/
|
|
2067
|
+
401: OpenAiApiError;
|
|
2068
|
+
/**
|
|
2069
|
+
* Insufficient permissions
|
|
2070
|
+
*/
|
|
2071
|
+
403: OpenAiApiError;
|
|
2072
|
+
/**
|
|
2073
|
+
* Internal server error
|
|
1069
2074
|
*/
|
|
1070
2075
|
500: OpenAiApiError;
|
|
1071
2076
|
};
|
|
@@ -1090,9 +2095,17 @@ export type CreateApiModelData = {
|
|
|
1090
2095
|
|
|
1091
2096
|
export type CreateApiModelErrors = {
|
|
1092
2097
|
/**
|
|
1093
|
-
* Invalid request
|
|
2098
|
+
* Invalid request parameters
|
|
1094
2099
|
*/
|
|
1095
2100
|
400: OpenAiApiError;
|
|
2101
|
+
/**
|
|
2102
|
+
* Not authenticated
|
|
2103
|
+
*/
|
|
2104
|
+
401: OpenAiApiError;
|
|
2105
|
+
/**
|
|
2106
|
+
* Insufficient permissions
|
|
2107
|
+
*/
|
|
2108
|
+
403: OpenAiApiError;
|
|
1096
2109
|
/**
|
|
1097
2110
|
* Alias already exists
|
|
1098
2111
|
*/
|
|
@@ -1123,7 +2136,19 @@ export type GetApiFormatsData = {
|
|
|
1123
2136
|
|
|
1124
2137
|
export type GetApiFormatsErrors = {
|
|
1125
2138
|
/**
|
|
1126
|
-
*
|
|
2139
|
+
* Invalid request parameters
|
|
2140
|
+
*/
|
|
2141
|
+
400: OpenAiApiError;
|
|
2142
|
+
/**
|
|
2143
|
+
* Not authenticated
|
|
2144
|
+
*/
|
|
2145
|
+
401: OpenAiApiError;
|
|
2146
|
+
/**
|
|
2147
|
+
* Insufficient permissions
|
|
2148
|
+
*/
|
|
2149
|
+
403: OpenAiApiError;
|
|
2150
|
+
/**
|
|
2151
|
+
* Internal server error
|
|
1127
2152
|
*/
|
|
1128
2153
|
500: OpenAiApiError;
|
|
1129
2154
|
};
|
|
@@ -1148,9 +2173,17 @@ export type FetchApiModelsData = {
|
|
|
1148
2173
|
|
|
1149
2174
|
export type FetchApiModelsErrors = {
|
|
1150
2175
|
/**
|
|
1151
|
-
* Invalid request
|
|
2176
|
+
* Invalid request parameters
|
|
1152
2177
|
*/
|
|
1153
2178
|
400: OpenAiApiError;
|
|
2179
|
+
/**
|
|
2180
|
+
* Not authenticated
|
|
2181
|
+
*/
|
|
2182
|
+
401: OpenAiApiError;
|
|
2183
|
+
/**
|
|
2184
|
+
* Insufficient permissions
|
|
2185
|
+
*/
|
|
2186
|
+
403: OpenAiApiError;
|
|
1154
2187
|
/**
|
|
1155
2188
|
* Internal server error
|
|
1156
2189
|
*/
|
|
@@ -1177,9 +2210,17 @@ export type TestApiModelData = {
|
|
|
1177
2210
|
|
|
1178
2211
|
export type TestApiModelErrors = {
|
|
1179
2212
|
/**
|
|
1180
|
-
* Invalid request
|
|
2213
|
+
* Invalid request parameters
|
|
1181
2214
|
*/
|
|
1182
2215
|
400: OpenAiApiError;
|
|
2216
|
+
/**
|
|
2217
|
+
* Not authenticated
|
|
2218
|
+
*/
|
|
2219
|
+
401: OpenAiApiError;
|
|
2220
|
+
/**
|
|
2221
|
+
* Insufficient permissions
|
|
2222
|
+
*/
|
|
2223
|
+
403: OpenAiApiError;
|
|
1183
2224
|
/**
|
|
1184
2225
|
* Internal server error
|
|
1185
2226
|
*/
|
|
@@ -1201,15 +2242,27 @@ export type DeleteApiModelData = {
|
|
|
1201
2242
|
body?: never;
|
|
1202
2243
|
path: {
|
|
1203
2244
|
/**
|
|
1204
|
-
* API model
|
|
2245
|
+
* API model ID
|
|
1205
2246
|
*/
|
|
1206
|
-
|
|
2247
|
+
id: string;
|
|
1207
2248
|
};
|
|
1208
2249
|
query?: never;
|
|
1209
|
-
url: '/bodhi/v1/api-models/{
|
|
2250
|
+
url: '/bodhi/v1/api-models/{id}';
|
|
1210
2251
|
};
|
|
1211
2252
|
|
|
1212
2253
|
export type DeleteApiModelErrors = {
|
|
2254
|
+
/**
|
|
2255
|
+
* Invalid request parameters
|
|
2256
|
+
*/
|
|
2257
|
+
400: OpenAiApiError;
|
|
2258
|
+
/**
|
|
2259
|
+
* Not authenticated
|
|
2260
|
+
*/
|
|
2261
|
+
401: OpenAiApiError;
|
|
2262
|
+
/**
|
|
2263
|
+
* Insufficient permissions
|
|
2264
|
+
*/
|
|
2265
|
+
403: OpenAiApiError;
|
|
1213
2266
|
/**
|
|
1214
2267
|
* API model not found
|
|
1215
2268
|
*/
|
|
@@ -1231,25 +2284,33 @@ export type DeleteApiModelResponses = {
|
|
|
1231
2284
|
|
|
1232
2285
|
export type DeleteApiModelResponse = DeleteApiModelResponses[keyof DeleteApiModelResponses];
|
|
1233
2286
|
|
|
1234
|
-
export type
|
|
1235
|
-
body
|
|
2287
|
+
export type GetApiModelData = {
|
|
2288
|
+
body?: never;
|
|
1236
2289
|
path: {
|
|
1237
2290
|
/**
|
|
1238
|
-
* API model alias
|
|
2291
|
+
* Unique identifier for the API model alias
|
|
1239
2292
|
*/
|
|
1240
|
-
|
|
2293
|
+
id: string;
|
|
1241
2294
|
};
|
|
1242
2295
|
query?: never;
|
|
1243
|
-
url: '/bodhi/v1/api-models/{
|
|
2296
|
+
url: '/bodhi/v1/api-models/{id}';
|
|
1244
2297
|
};
|
|
1245
2298
|
|
|
1246
|
-
export type
|
|
2299
|
+
export type GetApiModelErrors = {
|
|
1247
2300
|
/**
|
|
1248
|
-
* Invalid request
|
|
2301
|
+
* Invalid request parameters
|
|
1249
2302
|
*/
|
|
1250
2303
|
400: OpenAiApiError;
|
|
1251
2304
|
/**
|
|
1252
|
-
*
|
|
2305
|
+
* Not authenticated
|
|
2306
|
+
*/
|
|
2307
|
+
401: OpenAiApiError;
|
|
2308
|
+
/**
|
|
2309
|
+
* Insufficient permissions
|
|
2310
|
+
*/
|
|
2311
|
+
403: OpenAiApiError;
|
|
2312
|
+
/**
|
|
2313
|
+
* API model with specified ID not found
|
|
1253
2314
|
*/
|
|
1254
2315
|
404: OpenAiApiError;
|
|
1255
2316
|
/**
|
|
@@ -1258,22 +2319,22 @@ export type UpdateApiModelErrors = {
|
|
|
1258
2319
|
500: OpenAiApiError;
|
|
1259
2320
|
};
|
|
1260
2321
|
|
|
1261
|
-
export type
|
|
2322
|
+
export type GetApiModelError = GetApiModelErrors[keyof GetApiModelErrors];
|
|
1262
2323
|
|
|
1263
|
-
export type
|
|
2324
|
+
export type GetApiModelResponses = {
|
|
1264
2325
|
/**
|
|
1265
|
-
* API model
|
|
2326
|
+
* API model configuration retrieved successfully
|
|
1266
2327
|
*/
|
|
1267
2328
|
200: ApiModelResponse;
|
|
1268
2329
|
};
|
|
1269
2330
|
|
|
1270
|
-
export type
|
|
2331
|
+
export type GetApiModelResponse = GetApiModelResponses[keyof GetApiModelResponses];
|
|
1271
2332
|
|
|
1272
|
-
export type
|
|
1273
|
-
body
|
|
2333
|
+
export type UpdateApiModelData = {
|
|
2334
|
+
body: UpdateApiModelRequest;
|
|
1274
2335
|
path: {
|
|
1275
2336
|
/**
|
|
1276
|
-
*
|
|
2337
|
+
* API model ID
|
|
1277
2338
|
*/
|
|
1278
2339
|
id: string;
|
|
1279
2340
|
};
|
|
@@ -1281,27 +2342,39 @@ export type GetApiModelData = {
|
|
|
1281
2342
|
url: '/bodhi/v1/api-models/{id}';
|
|
1282
2343
|
};
|
|
1283
2344
|
|
|
1284
|
-
export type
|
|
2345
|
+
export type UpdateApiModelErrors = {
|
|
1285
2346
|
/**
|
|
1286
|
-
*
|
|
2347
|
+
* Invalid request parameters
|
|
2348
|
+
*/
|
|
2349
|
+
400: OpenAiApiError;
|
|
2350
|
+
/**
|
|
2351
|
+
* Not authenticated
|
|
2352
|
+
*/
|
|
2353
|
+
401: OpenAiApiError;
|
|
2354
|
+
/**
|
|
2355
|
+
* Insufficient permissions
|
|
2356
|
+
*/
|
|
2357
|
+
403: OpenAiApiError;
|
|
2358
|
+
/**
|
|
2359
|
+
* API model not found
|
|
1287
2360
|
*/
|
|
1288
2361
|
404: OpenAiApiError;
|
|
1289
2362
|
/**
|
|
1290
|
-
* Internal server error
|
|
2363
|
+
* Internal server error
|
|
1291
2364
|
*/
|
|
1292
2365
|
500: OpenAiApiError;
|
|
1293
2366
|
};
|
|
1294
2367
|
|
|
1295
|
-
export type
|
|
2368
|
+
export type UpdateApiModelError = UpdateApiModelErrors[keyof UpdateApiModelErrors];
|
|
1296
2369
|
|
|
1297
|
-
export type
|
|
2370
|
+
export type UpdateApiModelResponses = {
|
|
1298
2371
|
/**
|
|
1299
|
-
* API model
|
|
2372
|
+
* API model updated
|
|
1300
2373
|
*/
|
|
1301
2374
|
200: ApiModelResponse;
|
|
1302
2375
|
};
|
|
1303
2376
|
|
|
1304
|
-
export type
|
|
2377
|
+
export type UpdateApiModelResponse = UpdateApiModelResponses[keyof UpdateApiModelResponses];
|
|
1305
2378
|
|
|
1306
2379
|
export type RequestAccessData = {
|
|
1307
2380
|
/**
|
|
@@ -1315,11 +2388,19 @@ export type RequestAccessData = {
|
|
|
1315
2388
|
|
|
1316
2389
|
export type RequestAccessErrors = {
|
|
1317
2390
|
/**
|
|
1318
|
-
* Invalid request
|
|
2391
|
+
* Invalid request parameters
|
|
1319
2392
|
*/
|
|
1320
2393
|
400: OpenAiApiError;
|
|
1321
2394
|
/**
|
|
1322
|
-
*
|
|
2395
|
+
* Not authenticated
|
|
2396
|
+
*/
|
|
2397
|
+
401: OpenAiApiError;
|
|
2398
|
+
/**
|
|
2399
|
+
* Insufficient permissions
|
|
2400
|
+
*/
|
|
2401
|
+
403: OpenAiApiError;
|
|
2402
|
+
/**
|
|
2403
|
+
* Internal server error
|
|
1323
2404
|
*/
|
|
1324
2405
|
500: OpenAiApiError;
|
|
1325
2406
|
};
|
|
@@ -1346,12 +2427,24 @@ export type CompleteOAuthFlowData = {
|
|
|
1346
2427
|
};
|
|
1347
2428
|
|
|
1348
2429
|
export type CompleteOAuthFlowErrors = {
|
|
2430
|
+
/**
|
|
2431
|
+
* Invalid request parameters
|
|
2432
|
+
*/
|
|
2433
|
+
400: OpenAiApiError;
|
|
2434
|
+
/**
|
|
2435
|
+
* Not authenticated
|
|
2436
|
+
*/
|
|
2437
|
+
401: OpenAiApiError;
|
|
2438
|
+
/**
|
|
2439
|
+
* Insufficient permissions
|
|
2440
|
+
*/
|
|
2441
|
+
403: OpenAiApiError;
|
|
1349
2442
|
/**
|
|
1350
2443
|
* OAuth error, invalid request parameters, or state mismatch
|
|
1351
2444
|
*/
|
|
1352
2445
|
422: OpenAiApiError;
|
|
1353
2446
|
/**
|
|
1354
|
-
* Internal server error
|
|
2447
|
+
* Internal server error
|
|
1355
2448
|
*/
|
|
1356
2449
|
500: OpenAiApiError;
|
|
1357
2450
|
};
|
|
@@ -1376,7 +2469,19 @@ export type InitiateOAuthFlowData = {
|
|
|
1376
2469
|
|
|
1377
2470
|
export type InitiateOAuthFlowErrors = {
|
|
1378
2471
|
/**
|
|
1379
|
-
*
|
|
2472
|
+
* Invalid request parameters
|
|
2473
|
+
*/
|
|
2474
|
+
400: OpenAiApiError;
|
|
2475
|
+
/**
|
|
2476
|
+
* Not authenticated
|
|
2477
|
+
*/
|
|
2478
|
+
401: OpenAiApiError;
|
|
2479
|
+
/**
|
|
2480
|
+
* Insufficient permissions
|
|
2481
|
+
*/
|
|
2482
|
+
403: OpenAiApiError;
|
|
2483
|
+
/**
|
|
2484
|
+
* Internal server error
|
|
1380
2485
|
*/
|
|
1381
2486
|
500: OpenAiApiError;
|
|
1382
2487
|
};
|
|
@@ -1404,6 +2509,10 @@ export type GetAppInfoData = {
|
|
|
1404
2509
|
};
|
|
1405
2510
|
|
|
1406
2511
|
export type GetAppInfoErrors = {
|
|
2512
|
+
/**
|
|
2513
|
+
* Invalid request parameters
|
|
2514
|
+
*/
|
|
2515
|
+
400: OpenAiApiError;
|
|
1407
2516
|
/**
|
|
1408
2517
|
* Internal server error
|
|
1409
2518
|
*/
|
|
@@ -1430,7 +2539,19 @@ export type LogoutUserData = {
|
|
|
1430
2539
|
|
|
1431
2540
|
export type LogoutUserErrors = {
|
|
1432
2541
|
/**
|
|
1433
|
-
*
|
|
2542
|
+
* Invalid request parameters
|
|
2543
|
+
*/
|
|
2544
|
+
400: OpenAiApiError;
|
|
2545
|
+
/**
|
|
2546
|
+
* Not authenticated
|
|
2547
|
+
*/
|
|
2548
|
+
401: OpenAiApiError;
|
|
2549
|
+
/**
|
|
2550
|
+
* Insufficient permissions
|
|
2551
|
+
*/
|
|
2552
|
+
403: OpenAiApiError;
|
|
2553
|
+
/**
|
|
2554
|
+
* Internal server error
|
|
1434
2555
|
*/
|
|
1435
2556
|
500: OpenAiApiError;
|
|
1436
2557
|
};
|
|
@@ -1471,6 +2592,18 @@ export type ListModelFilesData = {
|
|
|
1471
2592
|
};
|
|
1472
2593
|
|
|
1473
2594
|
export type ListModelFilesErrors = {
|
|
2595
|
+
/**
|
|
2596
|
+
* Invalid request parameters
|
|
2597
|
+
*/
|
|
2598
|
+
400: OpenAiApiError;
|
|
2599
|
+
/**
|
|
2600
|
+
* Not authenticated
|
|
2601
|
+
*/
|
|
2602
|
+
401: OpenAiApiError;
|
|
2603
|
+
/**
|
|
2604
|
+
* Insufficient permissions
|
|
2605
|
+
*/
|
|
2606
|
+
403: OpenAiApiError;
|
|
1474
2607
|
/**
|
|
1475
2608
|
* Internal server error
|
|
1476
2609
|
*/
|
|
@@ -1514,7 +2647,19 @@ export type ListDownloadsData = {
|
|
|
1514
2647
|
|
|
1515
2648
|
export type ListDownloadsErrors = {
|
|
1516
2649
|
/**
|
|
1517
|
-
*
|
|
2650
|
+
* Invalid request parameters
|
|
2651
|
+
*/
|
|
2652
|
+
400: OpenAiApiError;
|
|
2653
|
+
/**
|
|
2654
|
+
* Not authenticated
|
|
2655
|
+
*/
|
|
2656
|
+
401: OpenAiApiError;
|
|
2657
|
+
/**
|
|
2658
|
+
* Insufficient permissions
|
|
2659
|
+
*/
|
|
2660
|
+
403: OpenAiApiError;
|
|
2661
|
+
/**
|
|
2662
|
+
* Internal server error
|
|
1518
2663
|
*/
|
|
1519
2664
|
500: OpenAiApiError;
|
|
1520
2665
|
};
|
|
@@ -1542,9 +2687,17 @@ export type PullModelFileData = {
|
|
|
1542
2687
|
|
|
1543
2688
|
export type PullModelFileErrors = {
|
|
1544
2689
|
/**
|
|
1545
|
-
*
|
|
2690
|
+
* Invalid request parameters
|
|
2691
|
+
*/
|
|
2692
|
+
400: OpenAiApiError;
|
|
2693
|
+
/**
|
|
2694
|
+
* Not authenticated
|
|
1546
2695
|
*/
|
|
1547
|
-
|
|
2696
|
+
401: OpenAiApiError;
|
|
2697
|
+
/**
|
|
2698
|
+
* Insufficient permissions
|
|
2699
|
+
*/
|
|
2700
|
+
403: OpenAiApiError;
|
|
1548
2701
|
/**
|
|
1549
2702
|
* Internal server error
|
|
1550
2703
|
*/
|
|
@@ -1580,9 +2733,17 @@ export type PullModelByAliasData = {
|
|
|
1580
2733
|
|
|
1581
2734
|
export type PullModelByAliasErrors = {
|
|
1582
2735
|
/**
|
|
1583
|
-
*
|
|
2736
|
+
* Invalid request parameters
|
|
1584
2737
|
*/
|
|
1585
2738
|
400: OpenAiApiError;
|
|
2739
|
+
/**
|
|
2740
|
+
* Not authenticated
|
|
2741
|
+
*/
|
|
2742
|
+
401: OpenAiApiError;
|
|
2743
|
+
/**
|
|
2744
|
+
* Insufficient permissions
|
|
2745
|
+
*/
|
|
2746
|
+
403: OpenAiApiError;
|
|
1586
2747
|
/**
|
|
1587
2748
|
* Alias not found
|
|
1588
2749
|
*/
|
|
@@ -1621,6 +2782,18 @@ export type GetDownloadStatusData = {
|
|
|
1621
2782
|
};
|
|
1622
2783
|
|
|
1623
2784
|
export type GetDownloadStatusErrors = {
|
|
2785
|
+
/**
|
|
2786
|
+
* Invalid request parameters
|
|
2787
|
+
*/
|
|
2788
|
+
400: OpenAiApiError;
|
|
2789
|
+
/**
|
|
2790
|
+
* Not authenticated
|
|
2791
|
+
*/
|
|
2792
|
+
401: OpenAiApiError;
|
|
2793
|
+
/**
|
|
2794
|
+
* Insufficient permissions
|
|
2795
|
+
*/
|
|
2796
|
+
403: OpenAiApiError;
|
|
1624
2797
|
/**
|
|
1625
2798
|
* Download request not found
|
|
1626
2799
|
*/
|
|
@@ -1667,6 +2840,18 @@ export type ListAllModelsData = {
|
|
|
1667
2840
|
};
|
|
1668
2841
|
|
|
1669
2842
|
export type ListAllModelsErrors = {
|
|
2843
|
+
/**
|
|
2844
|
+
* Invalid request parameters
|
|
2845
|
+
*/
|
|
2846
|
+
400: OpenAiApiError;
|
|
2847
|
+
/**
|
|
2848
|
+
* Not authenticated
|
|
2849
|
+
*/
|
|
2850
|
+
401: OpenAiApiError;
|
|
2851
|
+
/**
|
|
2852
|
+
* Insufficient permissions
|
|
2853
|
+
*/
|
|
2854
|
+
403: OpenAiApiError;
|
|
1670
2855
|
/**
|
|
1671
2856
|
* Internal server error
|
|
1672
2857
|
*/
|
|
@@ -1693,9 +2878,17 @@ export type CreateAliasData = {
|
|
|
1693
2878
|
|
|
1694
2879
|
export type CreateAliasErrors = {
|
|
1695
2880
|
/**
|
|
1696
|
-
* Invalid request
|
|
2881
|
+
* Invalid request parameters
|
|
1697
2882
|
*/
|
|
1698
2883
|
400: OpenAiApiError;
|
|
2884
|
+
/**
|
|
2885
|
+
* Not authenticated
|
|
2886
|
+
*/
|
|
2887
|
+
401: OpenAiApiError;
|
|
2888
|
+
/**
|
|
2889
|
+
* Insufficient permissions
|
|
2890
|
+
*/
|
|
2891
|
+
403: OpenAiApiError;
|
|
1699
2892
|
/**
|
|
1700
2893
|
* Internal server error
|
|
1701
2894
|
*/
|
|
@@ -1726,6 +2919,18 @@ export type GetAliasData = {
|
|
|
1726
2919
|
};
|
|
1727
2920
|
|
|
1728
2921
|
export type GetAliasErrors = {
|
|
2922
|
+
/**
|
|
2923
|
+
* Invalid request parameters
|
|
2924
|
+
*/
|
|
2925
|
+
400: OpenAiApiError;
|
|
2926
|
+
/**
|
|
2927
|
+
* Not authenticated
|
|
2928
|
+
*/
|
|
2929
|
+
401: OpenAiApiError;
|
|
2930
|
+
/**
|
|
2931
|
+
* Insufficient permissions
|
|
2932
|
+
*/
|
|
2933
|
+
403: OpenAiApiError;
|
|
1729
2934
|
/**
|
|
1730
2935
|
* Alias not found
|
|
1731
2936
|
*/
|
|
@@ -1761,9 +2966,17 @@ export type UpdateAliasData = {
|
|
|
1761
2966
|
|
|
1762
2967
|
export type UpdateAliasErrors = {
|
|
1763
2968
|
/**
|
|
1764
|
-
* Invalid request
|
|
2969
|
+
* Invalid request parameters
|
|
1765
2970
|
*/
|
|
1766
2971
|
400: OpenAiApiError;
|
|
2972
|
+
/**
|
|
2973
|
+
* Not authenticated
|
|
2974
|
+
*/
|
|
2975
|
+
401: OpenAiApiError;
|
|
2976
|
+
/**
|
|
2977
|
+
* Insufficient permissions
|
|
2978
|
+
*/
|
|
2979
|
+
403: OpenAiApiError;
|
|
1767
2980
|
/**
|
|
1768
2981
|
* Internal server error
|
|
1769
2982
|
*/
|
|
@@ -1774,9 +2987,9 @@ export type UpdateAliasError = UpdateAliasErrors[keyof UpdateAliasErrors];
|
|
|
1774
2987
|
|
|
1775
2988
|
export type UpdateAliasResponses = {
|
|
1776
2989
|
/**
|
|
1777
|
-
* Alias
|
|
2990
|
+
* Alias updated succesfully
|
|
1778
2991
|
*/
|
|
1779
|
-
|
|
2992
|
+
200: UserAliasResponse;
|
|
1780
2993
|
};
|
|
1781
2994
|
|
|
1782
2995
|
export type UpdateAliasResponse = UpdateAliasResponses[keyof UpdateAliasResponses];
|
|
@@ -1790,9 +3003,17 @@ export type ListSettingsData = {
|
|
|
1790
3003
|
|
|
1791
3004
|
export type ListSettingsErrors = {
|
|
1792
3005
|
/**
|
|
1793
|
-
*
|
|
3006
|
+
* Invalid request parameters
|
|
3007
|
+
*/
|
|
3008
|
+
400: OpenAiApiError;
|
|
3009
|
+
/**
|
|
3010
|
+
* Not authenticated
|
|
1794
3011
|
*/
|
|
1795
3012
|
401: OpenAiApiError;
|
|
3013
|
+
/**
|
|
3014
|
+
* Insufficient permissions
|
|
3015
|
+
*/
|
|
3016
|
+
403: OpenAiApiError;
|
|
1796
3017
|
/**
|
|
1797
3018
|
* Internal server error
|
|
1798
3019
|
*/
|
|
@@ -1823,10 +3044,26 @@ export type DeleteSettingData = {
|
|
|
1823
3044
|
};
|
|
1824
3045
|
|
|
1825
3046
|
export type DeleteSettingErrors = {
|
|
3047
|
+
/**
|
|
3048
|
+
* Invalid request parameters
|
|
3049
|
+
*/
|
|
3050
|
+
400: OpenAiApiError;
|
|
3051
|
+
/**
|
|
3052
|
+
* Not authenticated
|
|
3053
|
+
*/
|
|
3054
|
+
401: OpenAiApiError;
|
|
3055
|
+
/**
|
|
3056
|
+
* Insufficient permissions
|
|
3057
|
+
*/
|
|
3058
|
+
403: OpenAiApiError;
|
|
1826
3059
|
/**
|
|
1827
3060
|
* Setting not found
|
|
1828
3061
|
*/
|
|
1829
3062
|
404: OpenAiApiError;
|
|
3063
|
+
/**
|
|
3064
|
+
* Internal server error
|
|
3065
|
+
*/
|
|
3066
|
+
500: OpenAiApiError;
|
|
1830
3067
|
};
|
|
1831
3068
|
|
|
1832
3069
|
export type DeleteSettingError = DeleteSettingErrors[keyof DeleteSettingErrors];
|
|
@@ -1862,13 +3099,25 @@ export type UpdateSettingData = {
|
|
|
1862
3099
|
|
|
1863
3100
|
export type UpdateSettingErrors = {
|
|
1864
3101
|
/**
|
|
1865
|
-
* Invalid
|
|
3102
|
+
* Invalid request parameters
|
|
1866
3103
|
*/
|
|
1867
3104
|
400: OpenAiApiError;
|
|
3105
|
+
/**
|
|
3106
|
+
* Not authenticated
|
|
3107
|
+
*/
|
|
3108
|
+
401: OpenAiApiError;
|
|
3109
|
+
/**
|
|
3110
|
+
* Insufficient permissions
|
|
3111
|
+
*/
|
|
3112
|
+
403: OpenAiApiError;
|
|
1868
3113
|
/**
|
|
1869
3114
|
* Setting not found
|
|
1870
3115
|
*/
|
|
1871
3116
|
404: OpenAiApiError;
|
|
3117
|
+
/**
|
|
3118
|
+
* Internal server error
|
|
3119
|
+
*/
|
|
3120
|
+
500: OpenAiApiError;
|
|
1872
3121
|
};
|
|
1873
3122
|
|
|
1874
3123
|
export type UpdateSettingError = UpdateSettingErrors[keyof UpdateSettingErrors];
|
|
@@ -1894,11 +3143,11 @@ export type SetupAppData = {
|
|
|
1894
3143
|
|
|
1895
3144
|
export type SetupAppErrors = {
|
|
1896
3145
|
/**
|
|
1897
|
-
* Invalid request
|
|
3146
|
+
* Invalid request parameters
|
|
1898
3147
|
*/
|
|
1899
3148
|
400: OpenAiApiError;
|
|
1900
3149
|
/**
|
|
1901
|
-
* Internal server error
|
|
3150
|
+
* Internal server error
|
|
1902
3151
|
*/
|
|
1903
3152
|
500: OpenAiApiError;
|
|
1904
3153
|
};
|
|
@@ -1940,9 +3189,17 @@ export type ListApiTokensData = {
|
|
|
1940
3189
|
|
|
1941
3190
|
export type ListApiTokensErrors = {
|
|
1942
3191
|
/**
|
|
1943
|
-
*
|
|
3192
|
+
* Invalid request parameters
|
|
3193
|
+
*/
|
|
3194
|
+
400: OpenAiApiError;
|
|
3195
|
+
/**
|
|
3196
|
+
* Not authenticated
|
|
1944
3197
|
*/
|
|
1945
3198
|
401: OpenAiApiError;
|
|
3199
|
+
/**
|
|
3200
|
+
* Insufficient permissions
|
|
3201
|
+
*/
|
|
3202
|
+
403: OpenAiApiError;
|
|
1946
3203
|
/**
|
|
1947
3204
|
* Internal server error
|
|
1948
3205
|
*/
|
|
@@ -1972,11 +3229,19 @@ export type CreateApiTokenData = {
|
|
|
1972
3229
|
|
|
1973
3230
|
export type CreateApiTokenErrors = {
|
|
1974
3231
|
/**
|
|
1975
|
-
* Invalid request parameters
|
|
3232
|
+
* Invalid request parameters
|
|
1976
3233
|
*/
|
|
1977
3234
|
400: OpenAiApiError;
|
|
1978
3235
|
/**
|
|
1979
|
-
*
|
|
3236
|
+
* Not authenticated
|
|
3237
|
+
*/
|
|
3238
|
+
401: OpenAiApiError;
|
|
3239
|
+
/**
|
|
3240
|
+
* Insufficient permissions
|
|
3241
|
+
*/
|
|
3242
|
+
403: OpenAiApiError;
|
|
3243
|
+
/**
|
|
3244
|
+
* Internal server error
|
|
1980
3245
|
*/
|
|
1981
3246
|
500: OpenAiApiError;
|
|
1982
3247
|
};
|
|
@@ -2009,9 +3274,17 @@ export type UpdateApiTokenData = {
|
|
|
2009
3274
|
|
|
2010
3275
|
export type UpdateApiTokenErrors = {
|
|
2011
3276
|
/**
|
|
2012
|
-
*
|
|
3277
|
+
* Invalid request parameters
|
|
3278
|
+
*/
|
|
3279
|
+
400: OpenAiApiError;
|
|
3280
|
+
/**
|
|
3281
|
+
* Not authenticated
|
|
2013
3282
|
*/
|
|
2014
3283
|
401: OpenAiApiError;
|
|
3284
|
+
/**
|
|
3285
|
+
* Insufficient permissions
|
|
3286
|
+
*/
|
|
3287
|
+
403: OpenAiApiError;
|
|
2015
3288
|
/**
|
|
2016
3289
|
* Token not found
|
|
2017
3290
|
*/
|
|
@@ -2042,7 +3315,19 @@ export type GetCurrentUserData = {
|
|
|
2042
3315
|
|
|
2043
3316
|
export type GetCurrentUserErrors = {
|
|
2044
3317
|
/**
|
|
2045
|
-
*
|
|
3318
|
+
* Invalid request parameters
|
|
3319
|
+
*/
|
|
3320
|
+
400: OpenAiApiError;
|
|
3321
|
+
/**
|
|
3322
|
+
* Not authenticated
|
|
3323
|
+
*/
|
|
3324
|
+
401: OpenAiApiError;
|
|
3325
|
+
/**
|
|
3326
|
+
* Insufficient permissions
|
|
3327
|
+
*/
|
|
3328
|
+
403: OpenAiApiError;
|
|
3329
|
+
/**
|
|
3330
|
+
* Internal server error
|
|
2046
3331
|
*/
|
|
2047
3332
|
500: OpenAiApiError;
|
|
2048
3333
|
};
|
|
@@ -2051,7 +3336,7 @@ export type GetCurrentUserError = GetCurrentUserErrors[keyof GetCurrentUserError
|
|
|
2051
3336
|
|
|
2052
3337
|
export type GetCurrentUserResponses = {
|
|
2053
3338
|
/**
|
|
2054
|
-
*
|
|
3339
|
+
* User information (authenticated or not)
|
|
2055
3340
|
*/
|
|
2056
3341
|
200: UserResponse;
|
|
2057
3342
|
};
|
|
@@ -2066,10 +3351,18 @@ export type RequestUserAccessData = {
|
|
|
2066
3351
|
};
|
|
2067
3352
|
|
|
2068
3353
|
export type RequestUserAccessErrors = {
|
|
3354
|
+
/**
|
|
3355
|
+
* Invalid request parameters
|
|
3356
|
+
*/
|
|
3357
|
+
400: OpenAiApiError;
|
|
2069
3358
|
/**
|
|
2070
3359
|
* Not authenticated
|
|
2071
3360
|
*/
|
|
2072
3361
|
401: OpenAiApiError;
|
|
3362
|
+
/**
|
|
3363
|
+
* Insufficient permissions
|
|
3364
|
+
*/
|
|
3365
|
+
403: OpenAiApiError;
|
|
2073
3366
|
/**
|
|
2074
3367
|
* Pending request already exists
|
|
2075
3368
|
*/
|
|
@@ -2078,6 +3371,10 @@ export type RequestUserAccessErrors = {
|
|
|
2078
3371
|
* User already has role
|
|
2079
3372
|
*/
|
|
2080
3373
|
422: OpenAiApiError;
|
|
3374
|
+
/**
|
|
3375
|
+
* Internal server error
|
|
3376
|
+
*/
|
|
3377
|
+
500: OpenAiApiError;
|
|
2081
3378
|
};
|
|
2082
3379
|
|
|
2083
3380
|
export type RequestUserAccessError = RequestUserAccessErrors[keyof RequestUserAccessErrors];
|
|
@@ -2086,11 +3383,9 @@ export type RequestUserAccessResponses = {
|
|
|
2086
3383
|
/**
|
|
2087
3384
|
* Access request created successfully
|
|
2088
3385
|
*/
|
|
2089
|
-
201:
|
|
3386
|
+
201: unknown;
|
|
2090
3387
|
};
|
|
2091
3388
|
|
|
2092
|
-
export type RequestUserAccessResponse = RequestUserAccessResponses[keyof RequestUserAccessResponses];
|
|
2093
|
-
|
|
2094
3389
|
export type GetUserAccessStatusData = {
|
|
2095
3390
|
body?: never;
|
|
2096
3391
|
path?: never;
|
|
@@ -2100,17 +3395,25 @@ export type GetUserAccessStatusData = {
|
|
|
2100
3395
|
|
|
2101
3396
|
export type GetUserAccessStatusErrors = {
|
|
2102
3397
|
/**
|
|
2103
|
-
*
|
|
3398
|
+
* Invalid request parameters
|
|
2104
3399
|
*/
|
|
2105
3400
|
400: OpenAiApiError;
|
|
2106
3401
|
/**
|
|
2107
3402
|
* Not authenticated
|
|
2108
3403
|
*/
|
|
2109
3404
|
401: OpenAiApiError;
|
|
3405
|
+
/**
|
|
3406
|
+
* Insufficient permissions
|
|
3407
|
+
*/
|
|
3408
|
+
403: OpenAiApiError;
|
|
2110
3409
|
/**
|
|
2111
3410
|
* Request not found
|
|
2112
3411
|
*/
|
|
2113
3412
|
404: OpenAiApiError;
|
|
3413
|
+
/**
|
|
3414
|
+
* Internal server error
|
|
3415
|
+
*/
|
|
3416
|
+
500: OpenAiApiError;
|
|
2114
3417
|
};
|
|
2115
3418
|
|
|
2116
3419
|
export type GetUserAccessStatusError = GetUserAccessStatusErrors[keyof GetUserAccessStatusErrors];
|
|
@@ -2184,7 +3487,7 @@ export type RemoveUserData = {
|
|
|
2184
3487
|
|
|
2185
3488
|
export type RemoveUserErrors = {
|
|
2186
3489
|
/**
|
|
2187
|
-
* Invalid request
|
|
3490
|
+
* Invalid request parameters
|
|
2188
3491
|
*/
|
|
2189
3492
|
400: OpenAiApiError;
|
|
2190
3493
|
/**
|
|
@@ -2228,7 +3531,7 @@ export type ChangeUserRoleData = {
|
|
|
2228
3531
|
|
|
2229
3532
|
export type ChangeUserRoleErrors = {
|
|
2230
3533
|
/**
|
|
2231
|
-
* Invalid request
|
|
3534
|
+
* Invalid request parameters
|
|
2232
3535
|
*/
|
|
2233
3536
|
400: OpenAiApiError;
|
|
2234
3537
|
/**
|
|
@@ -2265,6 +3568,19 @@ export type HealthCheckData = {
|
|
|
2265
3568
|
url: '/health';
|
|
2266
3569
|
};
|
|
2267
3570
|
|
|
3571
|
+
export type HealthCheckErrors = {
|
|
3572
|
+
/**
|
|
3573
|
+
* Invalid request parameters
|
|
3574
|
+
*/
|
|
3575
|
+
400: OpenAiApiError;
|
|
3576
|
+
/**
|
|
3577
|
+
* Internal server error
|
|
3578
|
+
*/
|
|
3579
|
+
500: OpenAiApiError;
|
|
3580
|
+
};
|
|
3581
|
+
|
|
3582
|
+
export type HealthCheckError = HealthCheckErrors[keyof HealthCheckErrors];
|
|
3583
|
+
|
|
2268
3584
|
export type HealthCheckResponses = {
|
|
2269
3585
|
/**
|
|
2270
3586
|
* Application is healthy and fully operational
|
|
@@ -2281,6 +3597,19 @@ export type PingServerData = {
|
|
|
2281
3597
|
url: '/ping';
|
|
2282
3598
|
};
|
|
2283
3599
|
|
|
3600
|
+
export type PingServerErrors = {
|
|
3601
|
+
/**
|
|
3602
|
+
* Invalid request parameters
|
|
3603
|
+
*/
|
|
3604
|
+
400: OpenAiApiError;
|
|
3605
|
+
/**
|
|
3606
|
+
* Internal server error
|
|
3607
|
+
*/
|
|
3608
|
+
500: OpenAiApiError;
|
|
3609
|
+
};
|
|
3610
|
+
|
|
3611
|
+
export type PingServerError = PingServerErrors[keyof PingServerErrors];
|
|
3612
|
+
|
|
2284
3613
|
export type PingServerResponses = {
|
|
2285
3614
|
/**
|
|
2286
3615
|
* Server is responding normally
|
|
@@ -2291,7 +3620,7 @@ export type PingServerResponses = {
|
|
|
2291
3620
|
export type PingServerResponse = PingServerResponses[keyof PingServerResponses];
|
|
2292
3621
|
|
|
2293
3622
|
export type CreateChatCompletionData = {
|
|
2294
|
-
body:
|
|
3623
|
+
body: CreateChatCompletionRequest;
|
|
2295
3624
|
path?: never;
|
|
2296
3625
|
query?: never;
|
|
2297
3626
|
url: '/v1/chat/completions';
|
|
@@ -2303,9 +3632,13 @@ export type CreateChatCompletionErrors = {
|
|
|
2303
3632
|
*/
|
|
2304
3633
|
400: OpenAiApiError;
|
|
2305
3634
|
/**
|
|
2306
|
-
*
|
|
3635
|
+
* Not authenticated
|
|
2307
3636
|
*/
|
|
2308
3637
|
401: OpenAiApiError;
|
|
3638
|
+
/**
|
|
3639
|
+
* Insufficient permissions
|
|
3640
|
+
*/
|
|
3641
|
+
403: OpenAiApiError;
|
|
2309
3642
|
/**
|
|
2310
3643
|
* Internal server error
|
|
2311
3644
|
*/
|
|
@@ -2318,13 +3651,52 @@ export type CreateChatCompletionResponses = {
|
|
|
2318
3651
|
/**
|
|
2319
3652
|
* Chat completion response
|
|
2320
3653
|
*/
|
|
2321
|
-
200:
|
|
3654
|
+
200: CreateChatCompletionResponse;
|
|
2322
3655
|
/**
|
|
2323
3656
|
* Chat completion stream, the status is 200, using 201 to avoid OpenAPI format limitation.
|
|
2324
3657
|
*/
|
|
2325
|
-
201:
|
|
3658
|
+
201: CreateChatCompletionStreamResponse;
|
|
3659
|
+
};
|
|
3660
|
+
|
|
3661
|
+
export type CreateChatCompletionResponse2 = CreateChatCompletionResponses[keyof CreateChatCompletionResponses];
|
|
3662
|
+
|
|
3663
|
+
export type CreateEmbeddingData = {
|
|
3664
|
+
body: CreateEmbeddingRequest;
|
|
3665
|
+
path?: never;
|
|
3666
|
+
query?: never;
|
|
3667
|
+
url: '/v1/embeddings';
|
|
3668
|
+
};
|
|
3669
|
+
|
|
3670
|
+
export type CreateEmbeddingErrors = {
|
|
3671
|
+
/**
|
|
3672
|
+
* Invalid request parameters
|
|
3673
|
+
*/
|
|
3674
|
+
400: OpenAiApiError;
|
|
3675
|
+
/**
|
|
3676
|
+
* Not authenticated
|
|
3677
|
+
*/
|
|
3678
|
+
401: OpenAiApiError;
|
|
3679
|
+
/**
|
|
3680
|
+
* Insufficient permissions
|
|
3681
|
+
*/
|
|
3682
|
+
403: OpenAiApiError;
|
|
3683
|
+
/**
|
|
3684
|
+
* Internal server error
|
|
3685
|
+
*/
|
|
3686
|
+
500: OpenAiApiError;
|
|
2326
3687
|
};
|
|
2327
3688
|
|
|
3689
|
+
export type CreateEmbeddingError = CreateEmbeddingErrors[keyof CreateEmbeddingErrors];
|
|
3690
|
+
|
|
3691
|
+
export type CreateEmbeddingResponses = {
|
|
3692
|
+
/**
|
|
3693
|
+
* Embedding response
|
|
3694
|
+
*/
|
|
3695
|
+
200: CreateEmbeddingResponse;
|
|
3696
|
+
};
|
|
3697
|
+
|
|
3698
|
+
export type CreateEmbeddingResponse2 = CreateEmbeddingResponses[keyof CreateEmbeddingResponses];
|
|
3699
|
+
|
|
2328
3700
|
export type ListModelsData = {
|
|
2329
3701
|
body?: never;
|
|
2330
3702
|
path?: never;
|
|
@@ -2334,9 +3706,17 @@ export type ListModelsData = {
|
|
|
2334
3706
|
|
|
2335
3707
|
export type ListModelsErrors = {
|
|
2336
3708
|
/**
|
|
2337
|
-
* Invalid
|
|
3709
|
+
* Invalid request parameters
|
|
3710
|
+
*/
|
|
3711
|
+
400: OpenAiApiError;
|
|
3712
|
+
/**
|
|
3713
|
+
* Not authenticated
|
|
2338
3714
|
*/
|
|
2339
3715
|
401: OpenAiApiError;
|
|
3716
|
+
/**
|
|
3717
|
+
* Insufficient permissions
|
|
3718
|
+
*/
|
|
3719
|
+
403: OpenAiApiError;
|
|
2340
3720
|
/**
|
|
2341
3721
|
* Internal server error
|
|
2342
3722
|
*/
|
|
@@ -2368,9 +3748,17 @@ export type GetModelData = {
|
|
|
2368
3748
|
|
|
2369
3749
|
export type GetModelErrors = {
|
|
2370
3750
|
/**
|
|
2371
|
-
* Invalid
|
|
3751
|
+
* Invalid request parameters
|
|
3752
|
+
*/
|
|
3753
|
+
400: OpenAiApiError;
|
|
3754
|
+
/**
|
|
3755
|
+
* Not authenticated
|
|
2372
3756
|
*/
|
|
2373
3757
|
401: OpenAiApiError;
|
|
3758
|
+
/**
|
|
3759
|
+
* Insufficient permissions
|
|
3760
|
+
*/
|
|
3761
|
+
403: OpenAiApiError;
|
|
2374
3762
|
/**
|
|
2375
3763
|
* Model not found
|
|
2376
3764
|
*/
|