@retab/node 1.0.99 → 1.0.114

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/types.d.ts CHANGED
@@ -244,12 +244,14 @@ export declare const ZDocumentExtractRequest: z.ZodObject<{
244
244
  id: string;
245
245
  }[] | null | undefined;
246
246
  }>>, "many">>>;
247
+ bust_cache: z.ZodDefault<z.ZodBoolean>;
247
248
  }, "strip", z.ZodTypeAny, {
248
249
  metadata: Record<string, string>;
249
250
  model: string;
250
251
  image_resolution_dpi: number;
251
252
  n_consensus: number;
252
253
  json_schema: Record<string, any>;
254
+ bust_cache: boolean;
253
255
  chunking_keys?: Record<string, string> | null | undefined;
254
256
  extraction_id?: string | null | undefined;
255
257
  document?: any;
@@ -300,6 +302,7 @@ export declare const ZDocumentExtractRequest: z.ZodObject<{
300
302
  n_consensus?: number | undefined;
301
303
  chunking_keys?: Record<string, string> | null | undefined;
302
304
  extraction_id?: string | null | undefined;
305
+ bust_cache?: boolean | undefined;
303
306
  additional_messages?: {
304
307
  role: "user" | "system" | "assistant" | "developer" | "tool";
305
308
  content?: string | ({
@@ -337,6 +340,859 @@ export declare const ZDocumentExtractRequest: z.ZodObject<{
337
340
  }[] | null | undefined;
338
341
  }>;
339
342
  export type DocumentExtractRequest = z.input<typeof ZDocumentExtractRequest>;
343
+ export declare const ZRetabParsedChatCompletion: z.ZodEffects<z.ZodLazy<z.ZodObject<{
344
+ id: z.ZodString;
345
+ created: z.ZodNumber;
346
+ model: z.ZodString;
347
+ object: z.ZodLiteral<"chat.completion">;
348
+ service_tier: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"auto">, z.ZodLiteral<"default">, z.ZodLiteral<"flex">, z.ZodLiteral<"scale">, z.ZodLiteral<"priority">]>>>;
349
+ system_fingerprint: z.ZodOptional<z.ZodNullable<z.ZodString>>;
350
+ } & {
351
+ choices: z.ZodArray<z.ZodLazy<z.ZodObject<{
352
+ index: z.ZodNumber;
353
+ logprobs: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
354
+ content: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodLazy<z.ZodObject<{
355
+ token: z.ZodString;
356
+ bytes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
357
+ logprob: z.ZodNumber;
358
+ top_logprobs: z.ZodArray<z.ZodLazy<z.ZodObject<{
359
+ token: z.ZodString;
360
+ bytes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
361
+ logprob: z.ZodNumber;
362
+ }, "strip", z.ZodTypeAny, {
363
+ token: string;
364
+ logprob: number;
365
+ bytes?: number[] | null | undefined;
366
+ }, {
367
+ token: string;
368
+ logprob: number;
369
+ bytes?: number[] | null | undefined;
370
+ }>>, "many">;
371
+ }, "strip", z.ZodTypeAny, {
372
+ token: string;
373
+ logprob: number;
374
+ top_logprobs: {
375
+ token: string;
376
+ logprob: number;
377
+ bytes?: number[] | null | undefined;
378
+ }[];
379
+ bytes?: number[] | null | undefined;
380
+ }, {
381
+ token: string;
382
+ logprob: number;
383
+ top_logprobs: {
384
+ token: string;
385
+ logprob: number;
386
+ bytes?: number[] | null | undefined;
387
+ }[];
388
+ bytes?: number[] | null | undefined;
389
+ }>>, "many">>>;
390
+ refusal: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodLazy<z.ZodObject<{
391
+ token: z.ZodString;
392
+ bytes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
393
+ logprob: z.ZodNumber;
394
+ top_logprobs: z.ZodArray<z.ZodLazy<z.ZodObject<{
395
+ token: z.ZodString;
396
+ bytes: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodNumber, "many">>>;
397
+ logprob: z.ZodNumber;
398
+ }, "strip", z.ZodTypeAny, {
399
+ token: string;
400
+ logprob: number;
401
+ bytes?: number[] | null | undefined;
402
+ }, {
403
+ token: string;
404
+ logprob: number;
405
+ bytes?: number[] | null | undefined;
406
+ }>>, "many">;
407
+ }, "strip", z.ZodTypeAny, {
408
+ token: string;
409
+ logprob: number;
410
+ top_logprobs: {
411
+ token: string;
412
+ logprob: number;
413
+ bytes?: number[] | null | undefined;
414
+ }[];
415
+ bytes?: number[] | null | undefined;
416
+ }, {
417
+ token: string;
418
+ logprob: number;
419
+ top_logprobs: {
420
+ token: string;
421
+ logprob: number;
422
+ bytes?: number[] | null | undefined;
423
+ }[];
424
+ bytes?: number[] | null | undefined;
425
+ }>>, "many">>>;
426
+ }, "strip", z.ZodTypeAny, {
427
+ content?: {
428
+ token: string;
429
+ logprob: number;
430
+ top_logprobs: {
431
+ token: string;
432
+ logprob: number;
433
+ bytes?: number[] | null | undefined;
434
+ }[];
435
+ bytes?: number[] | null | undefined;
436
+ }[] | null | undefined;
437
+ refusal?: {
438
+ token: string;
439
+ logprob: number;
440
+ top_logprobs: {
441
+ token: string;
442
+ logprob: number;
443
+ bytes?: number[] | null | undefined;
444
+ }[];
445
+ bytes?: number[] | null | undefined;
446
+ }[] | null | undefined;
447
+ }, {
448
+ content?: {
449
+ token: string;
450
+ logprob: number;
451
+ top_logprobs: {
452
+ token: string;
453
+ logprob: number;
454
+ bytes?: number[] | null | undefined;
455
+ }[];
456
+ bytes?: number[] | null | undefined;
457
+ }[] | null | undefined;
458
+ refusal?: {
459
+ token: string;
460
+ logprob: number;
461
+ top_logprobs: {
462
+ token: string;
463
+ logprob: number;
464
+ bytes?: number[] | null | undefined;
465
+ }[];
466
+ bytes?: number[] | null | undefined;
467
+ }[] | null | undefined;
468
+ }>>>>;
469
+ message: z.ZodLazy<z.ZodObject<{
470
+ content: z.ZodOptional<z.ZodNullable<z.ZodString>>;
471
+ refusal: z.ZodOptional<z.ZodNullable<z.ZodString>>;
472
+ role: z.ZodLiteral<"assistant">;
473
+ annotations: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodLazy<z.ZodObject<{
474
+ type: z.ZodLiteral<"url_citation">;
475
+ url_citation: z.ZodLazy<z.ZodObject<{
476
+ end_index: z.ZodNumber;
477
+ start_index: z.ZodNumber;
478
+ title: z.ZodString;
479
+ url: z.ZodString;
480
+ }, "strip", z.ZodTypeAny, {
481
+ url: string;
482
+ title: string;
483
+ end_index: number;
484
+ start_index: number;
485
+ }, {
486
+ url: string;
487
+ title: string;
488
+ end_index: number;
489
+ start_index: number;
490
+ }>>;
491
+ }, "strip", z.ZodTypeAny, {
492
+ type: "url_citation";
493
+ url_citation: {
494
+ url: string;
495
+ title: string;
496
+ end_index: number;
497
+ start_index: number;
498
+ };
499
+ }, {
500
+ type: "url_citation";
501
+ url_citation: {
502
+ url: string;
503
+ title: string;
504
+ end_index: number;
505
+ start_index: number;
506
+ };
507
+ }>>, "many">>>;
508
+ audio: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
509
+ id: z.ZodString;
510
+ data: z.ZodString;
511
+ expires_at: z.ZodNumber;
512
+ transcript: z.ZodString;
513
+ }, "strip", z.ZodTypeAny, {
514
+ id: string;
515
+ data: string;
516
+ expires_at: number;
517
+ transcript: string;
518
+ }, {
519
+ id: string;
520
+ data: string;
521
+ expires_at: number;
522
+ transcript: string;
523
+ }>>>>;
524
+ function_call: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
525
+ arguments: z.ZodString;
526
+ name: z.ZodString;
527
+ }, "strip", z.ZodTypeAny, {
528
+ arguments: string;
529
+ name: string;
530
+ }, {
531
+ arguments: string;
532
+ name: string;
533
+ }>>>>;
534
+ } & {
535
+ tool_calls: z.ZodOptional<z.ZodNullable<z.ZodArray<z.ZodLazy<z.ZodObject<{
536
+ id: z.ZodString;
537
+ type: z.ZodLiteral<"function">;
538
+ } & {
539
+ function: z.ZodLazy<z.ZodObject<{
540
+ arguments: z.ZodString;
541
+ name: z.ZodString;
542
+ } & {
543
+ parsed_arguments: z.ZodOptional<z.ZodNullable<z.ZodObject<{}, "passthrough", z.ZodTypeAny, z.objectOutputType<{}, z.ZodTypeAny, "passthrough">, z.objectInputType<{}, z.ZodTypeAny, "passthrough">>>>;
544
+ }, "strip", z.ZodTypeAny, {
545
+ arguments: string;
546
+ name: string;
547
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
548
+ }, {
549
+ arguments: string;
550
+ name: string;
551
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
552
+ }>>;
553
+ }, "strip", z.ZodTypeAny, {
554
+ function: {
555
+ arguments: string;
556
+ name: string;
557
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
558
+ };
559
+ type: "function";
560
+ id: string;
561
+ }, {
562
+ function: {
563
+ arguments: string;
564
+ name: string;
565
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
566
+ };
567
+ type: "function";
568
+ id: string;
569
+ }>>, "many">>>;
570
+ parsed: z.ZodOptional<z.ZodNullable<z.ZodAny>>;
571
+ }, "strip", z.ZodTypeAny, {
572
+ role: "assistant";
573
+ content?: string | null | undefined;
574
+ tool_calls?: {
575
+ function: {
576
+ arguments: string;
577
+ name: string;
578
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
579
+ };
580
+ type: "function";
581
+ id: string;
582
+ }[] | null | undefined;
583
+ function_call?: {
584
+ arguments: string;
585
+ name: string;
586
+ } | null | undefined;
587
+ refusal?: string | null | undefined;
588
+ annotations?: {
589
+ type: "url_citation";
590
+ url_citation: {
591
+ url: string;
592
+ title: string;
593
+ end_index: number;
594
+ start_index: number;
595
+ };
596
+ }[] | null | undefined;
597
+ audio?: {
598
+ id: string;
599
+ data: string;
600
+ expires_at: number;
601
+ transcript: string;
602
+ } | null | undefined;
603
+ parsed?: any;
604
+ }, {
605
+ role: "assistant";
606
+ content?: string | null | undefined;
607
+ tool_calls?: {
608
+ function: {
609
+ arguments: string;
610
+ name: string;
611
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
612
+ };
613
+ type: "function";
614
+ id: string;
615
+ }[] | null | undefined;
616
+ function_call?: {
617
+ arguments: string;
618
+ name: string;
619
+ } | null | undefined;
620
+ refusal?: string | null | undefined;
621
+ annotations?: {
622
+ type: "url_citation";
623
+ url_citation: {
624
+ url: string;
625
+ title: string;
626
+ end_index: number;
627
+ start_index: number;
628
+ };
629
+ }[] | null | undefined;
630
+ audio?: {
631
+ id: string;
632
+ data: string;
633
+ expires_at: number;
634
+ transcript: string;
635
+ } | null | undefined;
636
+ parsed?: any;
637
+ }>>;
638
+ } & {
639
+ finish_reason: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLiteral<"stop">, z.ZodLiteral<"length">, z.ZodLiteral<"tool_calls">, z.ZodLiteral<"content_filter">, z.ZodLiteral<"function_call">]>>>;
640
+ key_mapping: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodOptional<z.ZodNullable<z.ZodString>>>>>;
641
+ }, "strip", z.ZodTypeAny, {
642
+ message: {
643
+ role: "assistant";
644
+ content?: string | null | undefined;
645
+ tool_calls?: {
646
+ function: {
647
+ arguments: string;
648
+ name: string;
649
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
650
+ };
651
+ type: "function";
652
+ id: string;
653
+ }[] | null | undefined;
654
+ function_call?: {
655
+ arguments: string;
656
+ name: string;
657
+ } | null | undefined;
658
+ refusal?: string | null | undefined;
659
+ annotations?: {
660
+ type: "url_citation";
661
+ url_citation: {
662
+ url: string;
663
+ title: string;
664
+ end_index: number;
665
+ start_index: number;
666
+ };
667
+ }[] | null | undefined;
668
+ audio?: {
669
+ id: string;
670
+ data: string;
671
+ expires_at: number;
672
+ transcript: string;
673
+ } | null | undefined;
674
+ parsed?: any;
675
+ };
676
+ index: number;
677
+ logprobs?: {
678
+ content?: {
679
+ token: string;
680
+ logprob: number;
681
+ top_logprobs: {
682
+ token: string;
683
+ logprob: number;
684
+ bytes?: number[] | null | undefined;
685
+ }[];
686
+ bytes?: number[] | null | undefined;
687
+ }[] | null | undefined;
688
+ refusal?: {
689
+ token: string;
690
+ logprob: number;
691
+ top_logprobs: {
692
+ token: string;
693
+ logprob: number;
694
+ bytes?: number[] | null | undefined;
695
+ }[];
696
+ bytes?: number[] | null | undefined;
697
+ }[] | null | undefined;
698
+ } | null | undefined;
699
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
700
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
701
+ }, {
702
+ message: {
703
+ role: "assistant";
704
+ content?: string | null | undefined;
705
+ tool_calls?: {
706
+ function: {
707
+ arguments: string;
708
+ name: string;
709
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
710
+ };
711
+ type: "function";
712
+ id: string;
713
+ }[] | null | undefined;
714
+ function_call?: {
715
+ arguments: string;
716
+ name: string;
717
+ } | null | undefined;
718
+ refusal?: string | null | undefined;
719
+ annotations?: {
720
+ type: "url_citation";
721
+ url_citation: {
722
+ url: string;
723
+ title: string;
724
+ end_index: number;
725
+ start_index: number;
726
+ };
727
+ }[] | null | undefined;
728
+ audio?: {
729
+ id: string;
730
+ data: string;
731
+ expires_at: number;
732
+ transcript: string;
733
+ } | null | undefined;
734
+ parsed?: any;
735
+ };
736
+ index: number;
737
+ logprobs?: {
738
+ content?: {
739
+ token: string;
740
+ logprob: number;
741
+ top_logprobs: {
742
+ token: string;
743
+ logprob: number;
744
+ bytes?: number[] | null | undefined;
745
+ }[];
746
+ bytes?: number[] | null | undefined;
747
+ }[] | null | undefined;
748
+ refusal?: {
749
+ token: string;
750
+ logprob: number;
751
+ top_logprobs: {
752
+ token: string;
753
+ logprob: number;
754
+ bytes?: number[] | null | undefined;
755
+ }[];
756
+ bytes?: number[] | null | undefined;
757
+ }[] | null | undefined;
758
+ } | null | undefined;
759
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
760
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
761
+ }>>, "many">;
762
+ usage: z.ZodOptional<z.ZodNullable<z.ZodUnion<[z.ZodLazy<z.ZodObject<{
763
+ completion_tokens: z.ZodNumber;
764
+ prompt_tokens: z.ZodNumber;
765
+ total_tokens: z.ZodNumber;
766
+ completion_tokens_details: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
767
+ accepted_prediction_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
768
+ audio_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
769
+ reasoning_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
770
+ rejected_prediction_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ accepted_prediction_tokens?: number | null | undefined;
773
+ audio_tokens?: number | null | undefined;
774
+ reasoning_tokens?: number | null | undefined;
775
+ rejected_prediction_tokens?: number | null | undefined;
776
+ }, {
777
+ accepted_prediction_tokens?: number | null | undefined;
778
+ audio_tokens?: number | null | undefined;
779
+ reasoning_tokens?: number | null | undefined;
780
+ rejected_prediction_tokens?: number | null | undefined;
781
+ }>>>>;
782
+ prompt_tokens_details: z.ZodOptional<z.ZodNullable<z.ZodLazy<z.ZodObject<{
783
+ audio_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
784
+ cached_tokens: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
785
+ }, "strip", z.ZodTypeAny, {
786
+ audio_tokens?: number | null | undefined;
787
+ cached_tokens?: number | null | undefined;
788
+ }, {
789
+ audio_tokens?: number | null | undefined;
790
+ cached_tokens?: number | null | undefined;
791
+ }>>>>;
792
+ }, "strip", z.ZodTypeAny, {
793
+ completion_tokens: number;
794
+ prompt_tokens: number;
795
+ total_tokens: number;
796
+ completion_tokens_details?: {
797
+ accepted_prediction_tokens?: number | null | undefined;
798
+ audio_tokens?: number | null | undefined;
799
+ reasoning_tokens?: number | null | undefined;
800
+ rejected_prediction_tokens?: number | null | undefined;
801
+ } | null | undefined;
802
+ prompt_tokens_details?: {
803
+ audio_tokens?: number | null | undefined;
804
+ cached_tokens?: number | null | undefined;
805
+ } | null | undefined;
806
+ }, {
807
+ completion_tokens: number;
808
+ prompt_tokens: number;
809
+ total_tokens: number;
810
+ completion_tokens_details?: {
811
+ accepted_prediction_tokens?: number | null | undefined;
812
+ audio_tokens?: number | null | undefined;
813
+ reasoning_tokens?: number | null | undefined;
814
+ rejected_prediction_tokens?: number | null | undefined;
815
+ } | null | undefined;
816
+ prompt_tokens_details?: {
817
+ audio_tokens?: number | null | undefined;
818
+ cached_tokens?: number | null | undefined;
819
+ } | null | undefined;
820
+ }>>, z.ZodLazy<z.ZodObject<{
821
+ credits: z.ZodNumber;
822
+ }, "strip", z.ZodTypeAny, {
823
+ credits: number;
824
+ }, {
825
+ credits: number;
826
+ }>>]>>>;
827
+ extraction_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
828
+ likelihoods: z.ZodOptional<z.ZodNullable<z.ZodRecord<z.ZodString, z.ZodAny>>>;
829
+ request_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
830
+ first_token_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
831
+ last_token_at: z.ZodOptional<z.ZodNullable<z.ZodString>>;
832
+ }, "strip", z.ZodTypeAny, {
833
+ object: "chat.completion";
834
+ id: string;
835
+ model: string;
836
+ choices: {
837
+ message: {
838
+ role: "assistant";
839
+ content?: string | null | undefined;
840
+ tool_calls?: {
841
+ function: {
842
+ arguments: string;
843
+ name: string;
844
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
845
+ };
846
+ type: "function";
847
+ id: string;
848
+ }[] | null | undefined;
849
+ function_call?: {
850
+ arguments: string;
851
+ name: string;
852
+ } | null | undefined;
853
+ refusal?: string | null | undefined;
854
+ annotations?: {
855
+ type: "url_citation";
856
+ url_citation: {
857
+ url: string;
858
+ title: string;
859
+ end_index: number;
860
+ start_index: number;
861
+ };
862
+ }[] | null | undefined;
863
+ audio?: {
864
+ id: string;
865
+ data: string;
866
+ expires_at: number;
867
+ transcript: string;
868
+ } | null | undefined;
869
+ parsed?: any;
870
+ };
871
+ index: number;
872
+ logprobs?: {
873
+ content?: {
874
+ token: string;
875
+ logprob: number;
876
+ top_logprobs: {
877
+ token: string;
878
+ logprob: number;
879
+ bytes?: number[] | null | undefined;
880
+ }[];
881
+ bytes?: number[] | null | undefined;
882
+ }[] | null | undefined;
883
+ refusal?: {
884
+ token: string;
885
+ logprob: number;
886
+ top_logprobs: {
887
+ token: string;
888
+ logprob: number;
889
+ bytes?: number[] | null | undefined;
890
+ }[];
891
+ bytes?: number[] | null | undefined;
892
+ }[] | null | undefined;
893
+ } | null | undefined;
894
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
895
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
896
+ }[];
897
+ created: number;
898
+ likelihoods?: Record<string, any> | null | undefined;
899
+ extraction_id?: string | null | undefined;
900
+ usage?: {
901
+ credits: number;
902
+ } | {
903
+ completion_tokens: number;
904
+ prompt_tokens: number;
905
+ total_tokens: number;
906
+ completion_tokens_details?: {
907
+ accepted_prediction_tokens?: number | null | undefined;
908
+ audio_tokens?: number | null | undefined;
909
+ reasoning_tokens?: number | null | undefined;
910
+ rejected_prediction_tokens?: number | null | undefined;
911
+ } | null | undefined;
912
+ prompt_tokens_details?: {
913
+ audio_tokens?: number | null | undefined;
914
+ cached_tokens?: number | null | undefined;
915
+ } | null | undefined;
916
+ } | null | undefined;
917
+ service_tier?: "default" | "auto" | "flex" | "scale" | "priority" | null | undefined;
918
+ system_fingerprint?: string | null | undefined;
919
+ request_at?: string | null | undefined;
920
+ first_token_at?: string | null | undefined;
921
+ last_token_at?: string | null | undefined;
922
+ }, {
923
+ object: "chat.completion";
924
+ id: string;
925
+ model: string;
926
+ choices: {
927
+ message: {
928
+ role: "assistant";
929
+ content?: string | null | undefined;
930
+ tool_calls?: {
931
+ function: {
932
+ arguments: string;
933
+ name: string;
934
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
935
+ };
936
+ type: "function";
937
+ id: string;
938
+ }[] | null | undefined;
939
+ function_call?: {
940
+ arguments: string;
941
+ name: string;
942
+ } | null | undefined;
943
+ refusal?: string | null | undefined;
944
+ annotations?: {
945
+ type: "url_citation";
946
+ url_citation: {
947
+ url: string;
948
+ title: string;
949
+ end_index: number;
950
+ start_index: number;
951
+ };
952
+ }[] | null | undefined;
953
+ audio?: {
954
+ id: string;
955
+ data: string;
956
+ expires_at: number;
957
+ transcript: string;
958
+ } | null | undefined;
959
+ parsed?: any;
960
+ };
961
+ index: number;
962
+ logprobs?: {
963
+ content?: {
964
+ token: string;
965
+ logprob: number;
966
+ top_logprobs: {
967
+ token: string;
968
+ logprob: number;
969
+ bytes?: number[] | null | undefined;
970
+ }[];
971
+ bytes?: number[] | null | undefined;
972
+ }[] | null | undefined;
973
+ refusal?: {
974
+ token: string;
975
+ logprob: number;
976
+ top_logprobs: {
977
+ token: string;
978
+ logprob: number;
979
+ bytes?: number[] | null | undefined;
980
+ }[];
981
+ bytes?: number[] | null | undefined;
982
+ }[] | null | undefined;
983
+ } | null | undefined;
984
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
985
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
986
+ }[];
987
+ created: number;
988
+ likelihoods?: Record<string, any> | null | undefined;
989
+ extraction_id?: string | null | undefined;
990
+ usage?: {
991
+ credits: number;
992
+ } | {
993
+ completion_tokens: number;
994
+ prompt_tokens: number;
995
+ total_tokens: number;
996
+ completion_tokens_details?: {
997
+ accepted_prediction_tokens?: number | null | undefined;
998
+ audio_tokens?: number | null | undefined;
999
+ reasoning_tokens?: number | null | undefined;
1000
+ rejected_prediction_tokens?: number | null | undefined;
1001
+ } | null | undefined;
1002
+ prompt_tokens_details?: {
1003
+ audio_tokens?: number | null | undefined;
1004
+ cached_tokens?: number | null | undefined;
1005
+ } | null | undefined;
1006
+ } | null | undefined;
1007
+ service_tier?: "default" | "auto" | "flex" | "scale" | "priority" | null | undefined;
1008
+ system_fingerprint?: string | null | undefined;
1009
+ request_at?: string | null | undefined;
1010
+ first_token_at?: string | null | undefined;
1011
+ last_token_at?: string | null | undefined;
1012
+ }>>, {
1013
+ data: any;
1014
+ text: string | null;
1015
+ object: "chat.completion";
1016
+ id: string;
1017
+ model: string;
1018
+ choices: {
1019
+ message: {
1020
+ role: "assistant";
1021
+ content?: string | null | undefined;
1022
+ tool_calls?: {
1023
+ function: {
1024
+ arguments: string;
1025
+ name: string;
1026
+ parsed_arguments?: z.objectOutputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1027
+ };
1028
+ type: "function";
1029
+ id: string;
1030
+ }[] | null | undefined;
1031
+ function_call?: {
1032
+ arguments: string;
1033
+ name: string;
1034
+ } | null | undefined;
1035
+ refusal?: string | null | undefined;
1036
+ annotations?: {
1037
+ type: "url_citation";
1038
+ url_citation: {
1039
+ url: string;
1040
+ title: string;
1041
+ end_index: number;
1042
+ start_index: number;
1043
+ };
1044
+ }[] | null | undefined;
1045
+ audio?: {
1046
+ id: string;
1047
+ data: string;
1048
+ expires_at: number;
1049
+ transcript: string;
1050
+ } | null | undefined;
1051
+ parsed?: any;
1052
+ };
1053
+ index: number;
1054
+ logprobs?: {
1055
+ content?: {
1056
+ token: string;
1057
+ logprob: number;
1058
+ top_logprobs: {
1059
+ token: string;
1060
+ logprob: number;
1061
+ bytes?: number[] | null | undefined;
1062
+ }[];
1063
+ bytes?: number[] | null | undefined;
1064
+ }[] | null | undefined;
1065
+ refusal?: {
1066
+ token: string;
1067
+ logprob: number;
1068
+ top_logprobs: {
1069
+ token: string;
1070
+ logprob: number;
1071
+ bytes?: number[] | null | undefined;
1072
+ }[];
1073
+ bytes?: number[] | null | undefined;
1074
+ }[] | null | undefined;
1075
+ } | null | undefined;
1076
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
1077
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
1078
+ }[];
1079
+ created: number;
1080
+ likelihoods?: Record<string, any> | null | undefined;
1081
+ extraction_id?: string | null | undefined;
1082
+ usage?: {
1083
+ credits: number;
1084
+ } | {
1085
+ completion_tokens: number;
1086
+ prompt_tokens: number;
1087
+ total_tokens: number;
1088
+ completion_tokens_details?: {
1089
+ accepted_prediction_tokens?: number | null | undefined;
1090
+ audio_tokens?: number | null | undefined;
1091
+ reasoning_tokens?: number | null | undefined;
1092
+ rejected_prediction_tokens?: number | null | undefined;
1093
+ } | null | undefined;
1094
+ prompt_tokens_details?: {
1095
+ audio_tokens?: number | null | undefined;
1096
+ cached_tokens?: number | null | undefined;
1097
+ } | null | undefined;
1098
+ } | null | undefined;
1099
+ service_tier?: "default" | "auto" | "flex" | "scale" | "priority" | null | undefined;
1100
+ system_fingerprint?: string | null | undefined;
1101
+ request_at?: string | null | undefined;
1102
+ first_token_at?: string | null | undefined;
1103
+ last_token_at?: string | null | undefined;
1104
+ }, {
1105
+ object: "chat.completion";
1106
+ id: string;
1107
+ model: string;
1108
+ choices: {
1109
+ message: {
1110
+ role: "assistant";
1111
+ content?: string | null | undefined;
1112
+ tool_calls?: {
1113
+ function: {
1114
+ arguments: string;
1115
+ name: string;
1116
+ parsed_arguments?: z.objectInputType<{}, z.ZodTypeAny, "passthrough"> | null | undefined;
1117
+ };
1118
+ type: "function";
1119
+ id: string;
1120
+ }[] | null | undefined;
1121
+ function_call?: {
1122
+ arguments: string;
1123
+ name: string;
1124
+ } | null | undefined;
1125
+ refusal?: string | null | undefined;
1126
+ annotations?: {
1127
+ type: "url_citation";
1128
+ url_citation: {
1129
+ url: string;
1130
+ title: string;
1131
+ end_index: number;
1132
+ start_index: number;
1133
+ };
1134
+ }[] | null | undefined;
1135
+ audio?: {
1136
+ id: string;
1137
+ data: string;
1138
+ expires_at: number;
1139
+ transcript: string;
1140
+ } | null | undefined;
1141
+ parsed?: any;
1142
+ };
1143
+ index: number;
1144
+ logprobs?: {
1145
+ content?: {
1146
+ token: string;
1147
+ logprob: number;
1148
+ top_logprobs: {
1149
+ token: string;
1150
+ logprob: number;
1151
+ bytes?: number[] | null | undefined;
1152
+ }[];
1153
+ bytes?: number[] | null | undefined;
1154
+ }[] | null | undefined;
1155
+ refusal?: {
1156
+ token: string;
1157
+ logprob: number;
1158
+ top_logprobs: {
1159
+ token: string;
1160
+ logprob: number;
1161
+ bytes?: number[] | null | undefined;
1162
+ }[];
1163
+ bytes?: number[] | null | undefined;
1164
+ }[] | null | undefined;
1165
+ } | null | undefined;
1166
+ finish_reason?: "length" | "tool_calls" | "function_call" | "content_filter" | "stop" | null | undefined;
1167
+ key_mapping?: Record<string, string | null | undefined> | null | undefined;
1168
+ }[];
1169
+ created: number;
1170
+ likelihoods?: Record<string, any> | null | undefined;
1171
+ extraction_id?: string | null | undefined;
1172
+ usage?: {
1173
+ credits: number;
1174
+ } | {
1175
+ completion_tokens: number;
1176
+ prompt_tokens: number;
1177
+ total_tokens: number;
1178
+ completion_tokens_details?: {
1179
+ accepted_prediction_tokens?: number | null | undefined;
1180
+ audio_tokens?: number | null | undefined;
1181
+ reasoning_tokens?: number | null | undefined;
1182
+ rejected_prediction_tokens?: number | null | undefined;
1183
+ } | null | undefined;
1184
+ prompt_tokens_details?: {
1185
+ audio_tokens?: number | null | undefined;
1186
+ cached_tokens?: number | null | undefined;
1187
+ } | null | undefined;
1188
+ } | null | undefined;
1189
+ service_tier?: "default" | "auto" | "flex" | "scale" | "priority" | null | undefined;
1190
+ system_fingerprint?: string | null | undefined;
1191
+ request_at?: string | null | undefined;
1192
+ first_token_at?: string | null | undefined;
1193
+ last_token_at?: string | null | undefined;
1194
+ }>;
1195
+ export type RetabParsedChatCompletion = z.output<typeof ZRetabParsedChatCompletion>;
340
1196
  export declare const ZParseRequest: z.ZodObject<{
341
1197
  document: z.ZodEffects<z.ZodUnion<[z.ZodString, z.ZodType<Buffer<ArrayBufferLike>, z.ZodTypeDef, Buffer<ArrayBufferLike>>, z.ZodType<Readable, z.ZodTypeDef, Readable>, z.ZodLazy<z.ZodObject<{
342
1198
  filename: z.ZodString;
@@ -354,9 +1210,11 @@ export declare const ZParseRequest: z.ZodObject<{
354
1210
  model: z.ZodDefault<z.ZodString>;
355
1211
  table_parsing_format: z.ZodDefault<z.ZodUnion<[z.ZodLiteral<"markdown">, z.ZodLiteral<"yaml">, z.ZodLiteral<"html">, z.ZodLiteral<"json">]>>;
356
1212
  image_resolution_dpi: z.ZodDefault<z.ZodNumber>;
1213
+ bust_cache: z.ZodDefault<z.ZodBoolean>;
357
1214
  }, "strip", z.ZodTypeAny, {
358
1215
  model: string;
359
1216
  image_resolution_dpi: number;
1217
+ bust_cache: boolean;
360
1218
  table_parsing_format: "json" | "markdown" | "yaml" | "html";
361
1219
  document?: any;
362
1220
  }, {
@@ -366,6 +1224,7 @@ export declare const ZParseRequest: z.ZodObject<{
366
1224
  };
367
1225
  model?: string | undefined;
368
1226
  image_resolution_dpi?: number | undefined;
1227
+ bust_cache?: boolean | undefined;
369
1228
  table_parsing_format?: "json" | "markdown" | "yaml" | "html" | undefined;
370
1229
  }>;
371
1230
  export type ParseRequest = z.input<typeof ZParseRequest>;
@@ -448,6 +1307,7 @@ export declare const ZSplitRequest: z.ZodObject<{
448
1307
  model: z.ZodDefault<z.ZodString>;
449
1308
  context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
450
1309
  n_consensus: z.ZodDefault<z.ZodNumber>;
1310
+ bust_cache: z.ZodDefault<z.ZodBoolean>;
451
1311
  }, "strip", z.ZodTypeAny, {
452
1312
  model: string;
453
1313
  n_consensus: number;
@@ -456,6 +1316,7 @@ export declare const ZSplitRequest: z.ZodObject<{
456
1316
  description: string;
457
1317
  partition_key?: string | null | undefined;
458
1318
  }[];
1319
+ bust_cache: boolean;
459
1320
  document?: any;
460
1321
  context?: string | null | undefined;
461
1322
  }, {
@@ -471,6 +1332,7 @@ export declare const ZSplitRequest: z.ZodObject<{
471
1332
  model?: string | undefined;
472
1333
  n_consensus?: number | undefined;
473
1334
  context?: string | null | undefined;
1335
+ bust_cache?: boolean | undefined;
474
1336
  }>;
475
1337
  export type SplitRequest = z.input<typeof ZSplitRequest>;
476
1338
  export declare const ZClassifyRequest: z.ZodObject<{
@@ -500,12 +1362,14 @@ export declare const ZClassifyRequest: z.ZodObject<{
500
1362
  model: z.ZodDefault<z.ZodString>;
501
1363
  first_n_pages: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
502
1364
  context: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1365
+ bust_cache: z.ZodDefault<z.ZodBoolean>;
503
1366
  }, "strip", z.ZodTypeAny, {
504
1367
  model: string;
505
1368
  categories: {
506
1369
  name: string;
507
1370
  description: string;
508
1371
  }[];
1372
+ bust_cache: boolean;
509
1373
  document?: any;
510
1374
  context?: string | null | undefined;
511
1375
  first_n_pages?: number | null | undefined;
@@ -521,6 +1385,7 @@ export declare const ZClassifyRequest: z.ZodObject<{
521
1385
  model?: string | undefined;
522
1386
  context?: string | null | undefined;
523
1387
  first_n_pages?: number | null | undefined;
1388
+ bust_cache?: boolean | undefined;
524
1389
  }>;
525
1390
  export type ClassifyRequest = z.input<typeof ZClassifyRequest>;
526
1391
  export declare const ZEditRequest: z.ZodObject<{
@@ -547,12 +1412,14 @@ export declare const ZEditRequest: z.ZodObject<{
547
1412
  model: z.ZodDefault<z.ZodString>;
548
1413
  instructions: z.ZodString;
549
1414
  template_id: z.ZodOptional<z.ZodNullable<z.ZodString>>;
1415
+ bust_cache: z.ZodDefault<z.ZodBoolean>;
550
1416
  }, "strip", z.ZodTypeAny, {
551
1417
  model: string;
552
1418
  config: {
553
1419
  color: string;
554
1420
  };
555
1421
  instructions: string;
1422
+ bust_cache: boolean;
556
1423
  document?: any;
557
1424
  template_id?: string | null | undefined;
558
1425
  }, {
@@ -566,6 +1433,7 @@ export declare const ZEditRequest: z.ZodObject<{
566
1433
  color?: string | undefined;
567
1434
  } | undefined;
568
1435
  template_id?: string | null | undefined;
1436
+ bust_cache?: boolean | undefined;
569
1437
  }>;
570
1438
  export type EditRequest = z.input<typeof ZEditRequest>;
571
1439
  export declare const ZEditResponse: z.ZodLazy<z.ZodObject<{