@nemesis-oss/ollama-sdk 1.7.0 → 1.9.0
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/CHANGELOG.md +168 -1
- package/README.md +181 -10
- package/dist/anthropic-5oYIRS6D.d.ts +1649 -0
- package/dist/anthropic-BIh45UXj.d.cts +1649 -0
- package/dist/{compose-DLStUfaF.d.ts → compose-DCVYMvOL.d.ts} +1 -1
- package/dist/{compose-DS-UWFx8.d.cts → compose-Dj6FdF2n.d.cts} +1 -1
- package/dist/generated-api.cjs +116 -9
- package/dist/generated-api.cjs.map +1 -1
- package/dist/generated-api.d.cts +321 -630
- package/dist/generated-api.d.ts +321 -630
- package/dist/generated-api.js +112 -10
- package/dist/generated-api.js.map +1 -1
- package/dist/generated-models-schemas.cjs +151 -3
- package/dist/generated-models-schemas.cjs.map +1 -1
- package/dist/generated-models-schemas.d.cts +228 -3
- package/dist/generated-models-schemas.d.ts +228 -3
- package/dist/generated-models-schemas.js +134 -4
- package/dist/generated-models-schemas.js.map +1 -1
- package/dist/generated-runtime.cjs +679 -60
- package/dist/generated-runtime.cjs.map +1 -1
- package/dist/generated-runtime.d.cts +22 -24
- package/dist/generated-runtime.d.ts +22 -24
- package/dist/generated-runtime.js +678 -61
- package/dist/generated-runtime.js.map +1 -1
- package/dist/index.cjs +2468 -132
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1666 -864
- package/dist/index.d.ts +1666 -864
- package/dist/index.js +2432 -133
- package/dist/index.js.map +1 -1
- package/dist/mcp/tools.json +306 -73
- package/dist/mcp-generated.cjs +138 -7
- package/dist/mcp-generated.cjs.map +1 -1
- package/dist/mcp-generated.d.cts +2 -2
- package/dist/mcp-generated.d.ts +2 -2
- package/dist/mcp-generated.js +138 -7
- package/dist/mcp-generated.js.map +1 -1
- package/dist/{runtime-qwD72cpn.d.ts → runtime-C3rfpkZw.d.ts} +286 -5
- package/dist/{runtime-bQ48I-RC.d.cts → runtime-D2W9TfCJ.d.cts} +286 -5
- package/dist/skills.cjs.map +1 -1
- package/dist/skills.d.cts +3 -3
- package/dist/skills.d.ts +3 -3
- package/dist/skills.js.map +1 -1
- package/dist/{types-5PAjLoCp.d.cts → types-DVcX_zMp.d.cts} +110 -10
- package/dist/{types-5PAjLoCp.d.ts → types-DVcX_zMp.d.ts} +110 -10
- package/package.json +9 -5
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
+
declare const BalanceResponseSchema: z.ZodObject<{
|
|
4
|
+
included: z.ZodUnion<readonly [z.ZodObject<{
|
|
5
|
+
balance_usd: z.ZodNumber;
|
|
6
|
+
allowance_usd: z.ZodNumber;
|
|
7
|
+
period: z.ZodObject<{
|
|
8
|
+
from: z.ZodString;
|
|
9
|
+
until: z.ZodString;
|
|
10
|
+
}, z.core.$strip>;
|
|
11
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
12
|
+
session: z.ZodObject<{
|
|
13
|
+
remaining_percent: z.ZodNumber;
|
|
14
|
+
resets_at: z.ZodString;
|
|
15
|
+
}, z.core.$strip>;
|
|
16
|
+
weekly: z.ZodObject<{
|
|
17
|
+
remaining_percent: z.ZodNumber;
|
|
18
|
+
resets_at: z.ZodString;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
}, z.core.$strip>]>;
|
|
21
|
+
purchased: z.ZodObject<{
|
|
22
|
+
balance_usd: z.ZodNumber;
|
|
23
|
+
}, z.core.$strip>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
|
|
3
26
|
declare const ChatMessageSchema: z.ZodObject<{
|
|
4
27
|
role: z.ZodEnum<{
|
|
5
28
|
system: "system";
|
|
@@ -161,6 +184,7 @@ declare const CreateRequestSchema: z.ZodObject<{
|
|
|
161
184
|
quantize: z.ZodOptional<z.ZodString>;
|
|
162
185
|
draft_quantize: z.ZodOptional<z.ZodString>;
|
|
163
186
|
requires: z.ZodOptional<z.ZodString>;
|
|
187
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
164
188
|
stream: z.ZodOptional<z.ZodBoolean>;
|
|
165
189
|
}, z.core.$strip>;
|
|
166
190
|
|
|
@@ -265,6 +289,31 @@ declare const GenerateStreamEventSchema: z.ZodObject<{
|
|
|
265
289
|
eval_duration: z.ZodOptional<z.ZodNumber>;
|
|
266
290
|
}, z.core.$strip>;
|
|
267
291
|
|
|
292
|
+
declare const IncludedBalanceSchema: z.ZodObject<{
|
|
293
|
+
balance_usd: z.ZodNumber;
|
|
294
|
+
allowance_usd: z.ZodNumber;
|
|
295
|
+
period: z.ZodObject<{
|
|
296
|
+
from: z.ZodString;
|
|
297
|
+
until: z.ZodString;
|
|
298
|
+
}, z.core.$strip>;
|
|
299
|
+
}, z.core.$strip>;
|
|
300
|
+
|
|
301
|
+
declare const LegacyBalanceLimitSchema: z.ZodObject<{
|
|
302
|
+
remaining_percent: z.ZodNumber;
|
|
303
|
+
resets_at: z.ZodString;
|
|
304
|
+
}, z.core.$strip>;
|
|
305
|
+
|
|
306
|
+
declare const LegacyIncludedBalanceSchema: z.ZodObject<{
|
|
307
|
+
session: z.ZodObject<{
|
|
308
|
+
remaining_percent: z.ZodNumber;
|
|
309
|
+
resets_at: z.ZodString;
|
|
310
|
+
}, z.core.$strip>;
|
|
311
|
+
weekly: z.ZodObject<{
|
|
312
|
+
remaining_percent: z.ZodNumber;
|
|
313
|
+
resets_at: z.ZodString;
|
|
314
|
+
}, z.core.$strip>;
|
|
315
|
+
}, z.core.$strip>;
|
|
316
|
+
|
|
268
317
|
declare const ListResponseSchema: z.ZodObject<{
|
|
269
318
|
models: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
270
319
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -277,7 +326,7 @@ declare const ListResponseSchema: z.ZodObject<{
|
|
|
277
326
|
details: z.ZodOptional<z.ZodObject<{
|
|
278
327
|
format: z.ZodOptional<z.ZodString>;
|
|
279
328
|
family: z.ZodOptional<z.ZodString>;
|
|
280
|
-
families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
329
|
+
families: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
281
330
|
parameter_size: z.ZodOptional<z.ZodString>;
|
|
282
331
|
quantization_level: z.ZodOptional<z.ZodString>;
|
|
283
332
|
}, z.core.$strip>>;
|
|
@@ -320,7 +369,7 @@ declare const ModelSummarySchema: z.ZodObject<{
|
|
|
320
369
|
details: z.ZodOptional<z.ZodObject<{
|
|
321
370
|
format: z.ZodOptional<z.ZodString>;
|
|
322
371
|
family: z.ZodOptional<z.ZodString>;
|
|
323
|
-
families: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
372
|
+
families: z.ZodOptional<z.ZodUnion<readonly [z.ZodArray<z.ZodString>, z.ZodNull]>>;
|
|
324
373
|
parameter_size: z.ZodOptional<z.ZodString>;
|
|
325
374
|
quantization_level: z.ZodOptional<z.ZodString>;
|
|
326
375
|
}, z.core.$strip>>;
|
|
@@ -392,6 +441,126 @@ declare const StatusResponseSchema: z.ZodObject<{
|
|
|
392
441
|
status: z.ZodOptional<z.ZodString>;
|
|
393
442
|
}, z.core.$strip>;
|
|
394
443
|
|
|
444
|
+
declare const SystemOneChoiceAnswerSchema: z.ZodObject<{
|
|
445
|
+
type: z.ZodEnum<{
|
|
446
|
+
choice: "choice";
|
|
447
|
+
}>;
|
|
448
|
+
choice: z.ZodString;
|
|
449
|
+
probabilities: z.ZodObject<{}, z.core.$catchall<z.ZodNumber>>;
|
|
450
|
+
confidence: z.ZodNumber;
|
|
451
|
+
}, z.core.$strip>;
|
|
452
|
+
|
|
453
|
+
declare const SystemOneChoiceQuestionSchema: z.ZodObject<{
|
|
454
|
+
type: z.ZodEnum<{
|
|
455
|
+
choice: "choice";
|
|
456
|
+
}>;
|
|
457
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
458
|
+
criteria: z.ZodObject<{}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>>;
|
|
459
|
+
}, z.core.$strip>;
|
|
460
|
+
|
|
461
|
+
/** Distribution concentration, calculated as 1 - H(p) / ln(N), where H(p) is entropy and N is the candidate count. Zero means uniform probabilities; values near 1 mean one candidate dominates. Not calibrated correctness. */
|
|
462
|
+
declare const SystemOneConfidenceSchema: z.ZodNumber;
|
|
463
|
+
|
|
464
|
+
/** A nonempty string, or an object or array serialized as JSON text. Not interpreted as chat messages or multimodal input. */
|
|
465
|
+
declare const SystemOneContentSchema: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
466
|
+
|
|
467
|
+
declare const SystemOneNoulAnswerSchema: z.ZodObject<{
|
|
468
|
+
type: z.ZodEnum<{
|
|
469
|
+
noul: "noul";
|
|
470
|
+
}>;
|
|
471
|
+
noul: z.ZodNumber;
|
|
472
|
+
}, z.core.$strip>;
|
|
473
|
+
|
|
474
|
+
declare const SystemOneNoulQuestionSchema: z.ZodObject<{
|
|
475
|
+
type: z.ZodEnum<{
|
|
476
|
+
noul: "noul";
|
|
477
|
+
}>;
|
|
478
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
479
|
+
criteria: z.ZodOptional<z.ZodObject<{
|
|
480
|
+
false: z.ZodOptional<z.ZodString>;
|
|
481
|
+
true: z.ZodOptional<z.ZodString>;
|
|
482
|
+
}, z.core.$strip>>;
|
|
483
|
+
}, z.core.$strip>;
|
|
484
|
+
|
|
485
|
+
/** Probabilities normalized over the supplied candidates, summing to 1 subject to floating-point precision. */
|
|
486
|
+
declare const SystemOneProbabilitiesSchema: z.ZodObject<{}, z.core.$catchall<z.ZodNumber>>;
|
|
487
|
+
|
|
488
|
+
declare const SystemOneRequestSchema: z.ZodObject<{
|
|
489
|
+
model: z.ZodString;
|
|
490
|
+
state: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
491
|
+
images: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
492
|
+
questions: z.ZodObject<{}, z.core.$catchall<z.ZodUnion<readonly [z.ZodObject<{
|
|
493
|
+
type: z.ZodEnum<{
|
|
494
|
+
choice: "choice";
|
|
495
|
+
}>;
|
|
496
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
497
|
+
criteria: z.ZodObject<{}, z.core.$catchall<z.ZodUnion<readonly [z.ZodString, z.ZodNull]>>>;
|
|
498
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
499
|
+
type: z.ZodEnum<{
|
|
500
|
+
noul: "noul";
|
|
501
|
+
}>;
|
|
502
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
503
|
+
criteria: z.ZodOptional<z.ZodObject<{
|
|
504
|
+
false: z.ZodOptional<z.ZodString>;
|
|
505
|
+
true: z.ZodOptional<z.ZodString>;
|
|
506
|
+
}, z.core.$strip>>;
|
|
507
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
508
|
+
type: z.ZodEnum<{
|
|
509
|
+
score: "score";
|
|
510
|
+
}>;
|
|
511
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
512
|
+
criteria: z.ZodArray<z.ZodString>;
|
|
513
|
+
}, z.core.$strip>]>>>;
|
|
514
|
+
keep_alive: z.ZodOptional<z.ZodUnion<readonly [z.ZodString, z.ZodNumber]>>;
|
|
515
|
+
}, z.core.$strip>;
|
|
516
|
+
|
|
517
|
+
declare const SystemOneResponseSchema: z.ZodObject<{
|
|
518
|
+
model: z.ZodString;
|
|
519
|
+
answers: z.ZodObject<{}, z.core.$catchall<z.ZodUnion<readonly [z.ZodObject<{
|
|
520
|
+
type: z.ZodEnum<{
|
|
521
|
+
choice: "choice";
|
|
522
|
+
}>;
|
|
523
|
+
choice: z.ZodString;
|
|
524
|
+
probabilities: z.ZodObject<{}, z.core.$catchall<z.ZodNumber>>;
|
|
525
|
+
confidence: z.ZodNumber;
|
|
526
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
527
|
+
type: z.ZodEnum<{
|
|
528
|
+
noul: "noul";
|
|
529
|
+
}>;
|
|
530
|
+
noul: z.ZodNumber;
|
|
531
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
532
|
+
type: z.ZodEnum<{
|
|
533
|
+
score: "score";
|
|
534
|
+
}>;
|
|
535
|
+
score: z.ZodNumber;
|
|
536
|
+
legend: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
537
|
+
probabilities: z.ZodObject<{}, z.core.$catchall<z.ZodNumber>>;
|
|
538
|
+
confidence: z.ZodNumber;
|
|
539
|
+
}, z.core.$strip>]>>>;
|
|
540
|
+
usage: z.ZodObject<{
|
|
541
|
+
input_tokens: z.ZodNumber;
|
|
542
|
+
output_tokens: z.ZodNumber;
|
|
543
|
+
}, z.core.$strip>;
|
|
544
|
+
}, z.core.$strip>;
|
|
545
|
+
|
|
546
|
+
declare const SystemOneScoreAnswerSchema: z.ZodObject<{
|
|
547
|
+
type: z.ZodEnum<{
|
|
548
|
+
score: "score";
|
|
549
|
+
}>;
|
|
550
|
+
score: z.ZodNumber;
|
|
551
|
+
legend: z.ZodObject<{}, z.core.$catchall<z.ZodString>>;
|
|
552
|
+
probabilities: z.ZodObject<{}, z.core.$catchall<z.ZodNumber>>;
|
|
553
|
+
confidence: z.ZodNumber;
|
|
554
|
+
}, z.core.$strip>;
|
|
555
|
+
|
|
556
|
+
declare const SystemOneScoreQuestionSchema: z.ZodObject<{
|
|
557
|
+
type: z.ZodEnum<{
|
|
558
|
+
score: "score";
|
|
559
|
+
}>;
|
|
560
|
+
instructions: z.ZodUnion<readonly [z.ZodString, z.ZodObject<{}, z.core.$catchall<z.ZodUnknown>>, z.ZodArray<z.ZodUnknown>]>;
|
|
561
|
+
criteria: z.ZodArray<z.ZodString>;
|
|
562
|
+
}, z.core.$strip>;
|
|
563
|
+
|
|
395
564
|
/** Controls a model's thinking output. Use `/api/show` to discover the supported values and default for the selected model. `true` requests thinking, `false` requests no thinking output, and `null` uses the model default. String values are model-defined; supported names must match `/api/show` exactly. Numbers are not supported. */
|
|
396
565
|
declare const ThinkValueSchema: z.ZodUnion<readonly [z.ZodBoolean, z.ZodString, z.ZodNull]>;
|
|
397
566
|
|
|
@@ -427,6 +596,62 @@ declare const ToolDefinitionSchema: z.ZodObject<{
|
|
|
427
596
|
}, z.core.$strip>;
|
|
428
597
|
}, z.core.$strip>;
|
|
429
598
|
|
|
599
|
+
declare const UsageBucketSchema: z.ZodIntersection<z.ZodObject<{
|
|
600
|
+
request_count: z.ZodNumber;
|
|
601
|
+
usage_usd: z.ZodOptional<z.ZodNumber>;
|
|
602
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
603
|
+
cached_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
604
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
605
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
606
|
+
from: z.ZodString;
|
|
607
|
+
until: z.ZodString;
|
|
608
|
+
partial: z.ZodOptional<z.ZodBoolean>;
|
|
609
|
+
}, z.core.$strip>>;
|
|
610
|
+
|
|
611
|
+
declare const UsageMetricsSchema: z.ZodObject<{
|
|
612
|
+
request_count: z.ZodNumber;
|
|
613
|
+
usage_usd: z.ZodOptional<z.ZodNumber>;
|
|
614
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
615
|
+
cached_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
616
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
617
|
+
}, z.core.$strip>;
|
|
618
|
+
|
|
619
|
+
declare const UsageResponseSchema: z.ZodObject<{
|
|
620
|
+
range: z.ZodEnum<{
|
|
621
|
+
"24h": "24h";
|
|
622
|
+
"7d": "7d";
|
|
623
|
+
"30d": "30d";
|
|
624
|
+
}>;
|
|
625
|
+
scope: z.ZodEnum<{
|
|
626
|
+
self: "self";
|
|
627
|
+
team: "team";
|
|
628
|
+
}>;
|
|
629
|
+
granularity: z.ZodEnum<{
|
|
630
|
+
hour: "hour";
|
|
631
|
+
day: "day";
|
|
632
|
+
}>;
|
|
633
|
+
from: z.ZodString;
|
|
634
|
+
until: z.ZodString;
|
|
635
|
+
totals: z.ZodObject<{
|
|
636
|
+
request_count: z.ZodNumber;
|
|
637
|
+
usage_usd: z.ZodOptional<z.ZodNumber>;
|
|
638
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
639
|
+
cached_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
640
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
641
|
+
}, z.core.$strip>;
|
|
642
|
+
buckets: z.ZodArray<z.ZodIntersection<z.ZodObject<{
|
|
643
|
+
request_count: z.ZodNumber;
|
|
644
|
+
usage_usd: z.ZodOptional<z.ZodNumber>;
|
|
645
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
646
|
+
cached_input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
647
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
648
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
649
|
+
from: z.ZodString;
|
|
650
|
+
until: z.ZodString;
|
|
651
|
+
partial: z.ZodOptional<z.ZodBoolean>;
|
|
652
|
+
}, z.core.$strip>>>;
|
|
653
|
+
}, z.core.$strip>;
|
|
654
|
+
|
|
430
655
|
declare const VersionResponseSchema: z.ZodObject<{
|
|
431
656
|
version: z.ZodOptional<z.ZodString>;
|
|
432
657
|
}, z.core.$strip>;
|
|
@@ -460,4 +685,4 @@ declare const WebSearchResultSchema: z.ZodObject<{
|
|
|
460
685
|
content: z.ZodOptional<z.ZodString>;
|
|
461
686
|
}, z.core.$strip>;
|
|
462
687
|
|
|
463
|
-
export { ChatMessageSchema, ChatRequestSchema, ChatResponseSchema, ChatStreamEventSchema, CopyRequestSchema, CreateRequestSchema, DeleteRequestSchema, EmbedRequestSchema, EmbedResponseSchema, ErrorResponseSchema, GenerateRequestSchema, GenerateResponseSchema, GenerateStreamEventSchema, ListResponseSchema, LogprobSchema, ModelOptionsSchema, ModelSummarySchema, PsResponseSchema, PsSchema, PullRequestSchema, PushRequestSchema, ShowRequestSchema, ShowResponseSchema, StatusEventSchema, StatusResponseSchema, ThinkValueSchema, ThinkingSchema, TokenLogprobSchema, ToolCallSchema, ToolDefinitionSchema, VersionResponseSchema, WebFetchRequestSchema, WebFetchResponseSchema, WebSearchRequestSchema, WebSearchResponseSchema, WebSearchResultSchema };
|
|
688
|
+
export { BalanceResponseSchema, ChatMessageSchema, ChatRequestSchema, ChatResponseSchema, ChatStreamEventSchema, CopyRequestSchema, CreateRequestSchema, DeleteRequestSchema, EmbedRequestSchema, EmbedResponseSchema, ErrorResponseSchema, GenerateRequestSchema, GenerateResponseSchema, GenerateStreamEventSchema, IncludedBalanceSchema, LegacyBalanceLimitSchema, LegacyIncludedBalanceSchema, ListResponseSchema, LogprobSchema, ModelOptionsSchema, ModelSummarySchema, PsResponseSchema, PsSchema, PullRequestSchema, PushRequestSchema, ShowRequestSchema, ShowResponseSchema, StatusEventSchema, StatusResponseSchema, SystemOneChoiceAnswerSchema, SystemOneChoiceQuestionSchema, SystemOneConfidenceSchema, SystemOneContentSchema, SystemOneNoulAnswerSchema, SystemOneNoulQuestionSchema, SystemOneProbabilitiesSchema, SystemOneRequestSchema, SystemOneResponseSchema, SystemOneScoreAnswerSchema, SystemOneScoreQuestionSchema, ThinkValueSchema, ThinkingSchema, TokenLogprobSchema, ToolCallSchema, ToolDefinitionSchema, UsageBucketSchema, UsageMetricsSchema, UsageResponseSchema, VersionResponseSchema, WebFetchRequestSchema, WebFetchResponseSchema, WebSearchRequestSchema, WebSearchResponseSchema, WebSearchResultSchema };
|
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
2
|
|
|
3
|
-
// src/generated/models/
|
|
3
|
+
// src/generated/models/BalanceResponse.schema.ts
|
|
4
|
+
var IncludedBalanceSchema = z.object({
|
|
5
|
+
balance_usd: z.number(),
|
|
6
|
+
allowance_usd: z.number(),
|
|
7
|
+
period: z.object({
|
|
8
|
+
from: z.string(),
|
|
9
|
+
until: z.string()
|
|
10
|
+
})
|
|
11
|
+
});
|
|
12
|
+
var LegacyBalanceLimitSchema = z.object({
|
|
13
|
+
remaining_percent: z.number().min(0).max(100),
|
|
14
|
+
resets_at: z.string()
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
// src/generated/models/LegacyIncludedBalance.schema.ts
|
|
18
|
+
var LegacyIncludedBalanceSchema = z.object({
|
|
19
|
+
session: LegacyBalanceLimitSchema,
|
|
20
|
+
weekly: LegacyBalanceLimitSchema
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
// src/generated/models/BalanceResponse.schema.ts
|
|
24
|
+
var BalanceResponseSchema = z.object({
|
|
25
|
+
included: z.union([IncludedBalanceSchema, LegacyIncludedBalanceSchema]),
|
|
26
|
+
purchased: z.object({
|
|
27
|
+
balance_usd: z.number()
|
|
28
|
+
})
|
|
29
|
+
});
|
|
4
30
|
var ToolCallSchema = z.object({
|
|
5
31
|
function: z.object({
|
|
6
32
|
name: z.string(),
|
|
@@ -116,6 +142,7 @@ var CreateRequestSchema = z.object({
|
|
|
116
142
|
quantize: z.string().optional(),
|
|
117
143
|
draft_quantize: z.string().optional(),
|
|
118
144
|
requires: z.string().optional(),
|
|
145
|
+
capabilities: z.array(z.string()).optional(),
|
|
119
146
|
stream: z.boolean().optional()
|
|
120
147
|
});
|
|
121
148
|
var DeleteRequestSchema = z.object({
|
|
@@ -196,7 +223,7 @@ var ModelSummarySchema = z.object({
|
|
|
196
223
|
details: z.object({
|
|
197
224
|
format: z.string().optional(),
|
|
198
225
|
family: z.string().optional(),
|
|
199
|
-
families: z.array(z.string()).optional(),
|
|
226
|
+
families: z.union([z.array(z.string()), z.null()]).optional(),
|
|
200
227
|
parameter_size: z.string().optional(),
|
|
201
228
|
quantization_level: z.string().optional()
|
|
202
229
|
}).optional()
|
|
@@ -260,6 +287,109 @@ var StatusEventSchema = z.object({
|
|
|
260
287
|
var StatusResponseSchema = z.object({
|
|
261
288
|
status: z.string().optional()
|
|
262
289
|
});
|
|
290
|
+
var SystemOneConfidenceSchema = z.number().min(0).max(1);
|
|
291
|
+
var SystemOneProbabilitiesSchema = z.object({}).catchall(z.number().min(0).max(1));
|
|
292
|
+
|
|
293
|
+
// src/generated/models/SystemOneChoiceAnswer.schema.ts
|
|
294
|
+
var SystemOneChoiceAnswerSchema = z.object({
|
|
295
|
+
type: z.enum(["choice"]),
|
|
296
|
+
choice: z.string(),
|
|
297
|
+
probabilities: SystemOneProbabilitiesSchema,
|
|
298
|
+
confidence: SystemOneConfidenceSchema
|
|
299
|
+
});
|
|
300
|
+
var SystemOneContentSchema = z.union([
|
|
301
|
+
z.string().regex(new RegExp("\\S")),
|
|
302
|
+
z.object({}).catchall(z.unknown()),
|
|
303
|
+
z.array(z.unknown())
|
|
304
|
+
]);
|
|
305
|
+
|
|
306
|
+
// src/generated/models/SystemOneChoiceQuestion.schema.ts
|
|
307
|
+
var SystemOneChoiceQuestionSchema = z.object({
|
|
308
|
+
type: z.enum(["choice"]),
|
|
309
|
+
instructions: SystemOneContentSchema,
|
|
310
|
+
criteria: z.object({}).catchall(z.union([z.string(), z.null()])).refine((v) => Object.keys(v).length >= 2, { message: "must have at least 2 properties" }).refine((v) => Object.keys(v).length <= 26, { message: "must have at most 26 properties" }).refine((v) => Object.keys(v).every((k) => new RegExp("\\S").test(k)), {
|
|
311
|
+
message: 'property names must match pattern "\\S"'
|
|
312
|
+
})
|
|
313
|
+
});
|
|
314
|
+
var SystemOneNoulAnswerSchema = z.object({
|
|
315
|
+
type: z.enum(["noul"]),
|
|
316
|
+
noul: z.number().min(0).max(1)
|
|
317
|
+
});
|
|
318
|
+
var SystemOneNoulQuestionSchema = z.object({
|
|
319
|
+
type: z.enum(["noul"]),
|
|
320
|
+
instructions: SystemOneContentSchema,
|
|
321
|
+
criteria: z.object({
|
|
322
|
+
false: z.string().optional(),
|
|
323
|
+
true: z.string().optional()
|
|
324
|
+
}).optional()
|
|
325
|
+
});
|
|
326
|
+
var SystemOneScoreQuestionSchema = z.object({
|
|
327
|
+
type: z.enum(["score"]),
|
|
328
|
+
instructions: SystemOneContentSchema,
|
|
329
|
+
criteria: z.array(z.string()).min(2).max(26)
|
|
330
|
+
});
|
|
331
|
+
|
|
332
|
+
// src/generated/models/SystemOneRequest.schema.ts
|
|
333
|
+
var SystemOneRequestSchema = z.object({
|
|
334
|
+
model: z.string().regex(new RegExp("\\S")),
|
|
335
|
+
state: SystemOneContentSchema,
|
|
336
|
+
images: z.array(z.string()).optional(),
|
|
337
|
+
questions: z.object({}).catchall(
|
|
338
|
+
z.union([
|
|
339
|
+
SystemOneChoiceQuestionSchema,
|
|
340
|
+
SystemOneNoulQuestionSchema,
|
|
341
|
+
SystemOneScoreQuestionSchema
|
|
342
|
+
])
|
|
343
|
+
).refine((v) => Object.keys(v).length >= 1, { message: "must have at least 1 properties" }).refine((v) => Object.keys(v).length <= 64, { message: "must have at most 64 properties" }).refine((v) => Object.keys(v).every((k) => new RegExp("\\S").test(k)), {
|
|
344
|
+
message: 'property names must match pattern "\\S"'
|
|
345
|
+
}),
|
|
346
|
+
keep_alive: z.union([z.string(), z.number()]).optional()
|
|
347
|
+
});
|
|
348
|
+
var SystemOneScoreAnswerSchema = z.object({
|
|
349
|
+
type: z.enum(["score"]),
|
|
350
|
+
score: z.number().min(0).max(25),
|
|
351
|
+
legend: z.object({}).catchall(z.string()),
|
|
352
|
+
probabilities: SystemOneProbabilitiesSchema,
|
|
353
|
+
confidence: SystemOneConfidenceSchema
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
// src/generated/models/SystemOneResponse.schema.ts
|
|
357
|
+
var SystemOneResponseSchema = z.object({
|
|
358
|
+
model: z.string(),
|
|
359
|
+
answers: z.object({}).catchall(
|
|
360
|
+
z.union([SystemOneChoiceAnswerSchema, SystemOneNoulAnswerSchema, SystemOneScoreAnswerSchema])
|
|
361
|
+
),
|
|
362
|
+
usage: z.object({
|
|
363
|
+
input_tokens: z.number().min(0),
|
|
364
|
+
output_tokens: z.number().min(0)
|
|
365
|
+
})
|
|
366
|
+
});
|
|
367
|
+
var UsageMetricsSchema = z.object({
|
|
368
|
+
request_count: z.number().min(0),
|
|
369
|
+
usage_usd: z.number().optional(),
|
|
370
|
+
input_tokens: z.number().optional(),
|
|
371
|
+
cached_input_tokens: z.number().optional(),
|
|
372
|
+
output_tokens: z.number().optional()
|
|
373
|
+
});
|
|
374
|
+
|
|
375
|
+
// src/generated/models/UsageBucket.schema.ts
|
|
376
|
+
var UsageBucketSchema = z.intersection(
|
|
377
|
+
UsageMetricsSchema,
|
|
378
|
+
z.object({
|
|
379
|
+
from: z.string(),
|
|
380
|
+
until: z.string(),
|
|
381
|
+
partial: z.boolean().optional()
|
|
382
|
+
})
|
|
383
|
+
);
|
|
384
|
+
var UsageResponseSchema = z.object({
|
|
385
|
+
range: z.enum(["24h", "7d", "30d"]),
|
|
386
|
+
scope: z.enum(["self", "team"]),
|
|
387
|
+
granularity: z.enum(["hour", "day"]),
|
|
388
|
+
from: z.string(),
|
|
389
|
+
until: z.string(),
|
|
390
|
+
totals: UsageMetricsSchema,
|
|
391
|
+
buckets: z.array(UsageBucketSchema)
|
|
392
|
+
});
|
|
263
393
|
var VersionResponseSchema = z.object({
|
|
264
394
|
version: z.string().optional()
|
|
265
395
|
});
|
|
@@ -273,7 +403,7 @@ var WebFetchResponseSchema = z.object({
|
|
|
273
403
|
});
|
|
274
404
|
var WebSearchRequestSchema = z.object({
|
|
275
405
|
query: z.string(),
|
|
276
|
-
max_results: z.number().optional()
|
|
406
|
+
max_results: z.number().min(1).max(10).optional()
|
|
277
407
|
});
|
|
278
408
|
var WebSearchResultSchema = z.object({
|
|
279
409
|
title: z.string().optional(),
|
|
@@ -286,6 +416,6 @@ var WebSearchResponseSchema = z.object({
|
|
|
286
416
|
results: z.array(WebSearchResultSchema).optional()
|
|
287
417
|
});
|
|
288
418
|
|
|
289
|
-
export { ChatMessageSchema, ChatRequestSchema, ChatResponseSchema, ChatStreamEventSchema, CopyRequestSchema, CreateRequestSchema, DeleteRequestSchema, EmbedRequestSchema, EmbedResponseSchema, ErrorResponseSchema, GenerateRequestSchema, GenerateResponseSchema, GenerateStreamEventSchema, ListResponseSchema, LogprobSchema, ModelOptionsSchema, ModelSummarySchema, PsResponseSchema, PsSchema, PullRequestSchema, PushRequestSchema, ShowRequestSchema, ShowResponseSchema, StatusEventSchema, StatusResponseSchema, ThinkValueSchema, ThinkingSchema, TokenLogprobSchema, ToolCallSchema, ToolDefinitionSchema, VersionResponseSchema, WebFetchRequestSchema, WebFetchResponseSchema, WebSearchRequestSchema, WebSearchResponseSchema, WebSearchResultSchema };
|
|
419
|
+
export { BalanceResponseSchema, ChatMessageSchema, ChatRequestSchema, ChatResponseSchema, ChatStreamEventSchema, CopyRequestSchema, CreateRequestSchema, DeleteRequestSchema, EmbedRequestSchema, EmbedResponseSchema, ErrorResponseSchema, GenerateRequestSchema, GenerateResponseSchema, GenerateStreamEventSchema, IncludedBalanceSchema, LegacyBalanceLimitSchema, LegacyIncludedBalanceSchema, ListResponseSchema, LogprobSchema, ModelOptionsSchema, ModelSummarySchema, PsResponseSchema, PsSchema, PullRequestSchema, PushRequestSchema, ShowRequestSchema, ShowResponseSchema, StatusEventSchema, StatusResponseSchema, SystemOneChoiceAnswerSchema, SystemOneChoiceQuestionSchema, SystemOneConfidenceSchema, SystemOneContentSchema, SystemOneNoulAnswerSchema, SystemOneNoulQuestionSchema, SystemOneProbabilitiesSchema, SystemOneRequestSchema, SystemOneResponseSchema, SystemOneScoreAnswerSchema, SystemOneScoreQuestionSchema, ThinkValueSchema, ThinkingSchema, TokenLogprobSchema, ToolCallSchema, ToolDefinitionSchema, UsageBucketSchema, UsageMetricsSchema, UsageResponseSchema, VersionResponseSchema, WebFetchRequestSchema, WebFetchResponseSchema, WebSearchRequestSchema, WebSearchResponseSchema, WebSearchResultSchema };
|
|
290
420
|
//# sourceMappingURL=generated-models-schemas.js.map
|
|
291
421
|
//# sourceMappingURL=generated-models-schemas.js.map
|