-
Notifications
You must be signed in to change notification settings - Fork 19
Expand file tree
/
Copy pathopenapi.generated.ts
More file actions
4083 lines (3988 loc) · 112 KB
/
openapi.generated.ts
File metadata and controls
4083 lines (3988 loc) · 112 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// this file is generated by typescript/scripts/generate-types.ts
/* tslint:disable */
/* eslint-disable */
import { LiteralUnion } from "./helpers";
/** OneOf type helpers */
type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
type XOR<T, U> = T | U extends object
? (Without<T, U> & U) | (Without<U, T> & T)
: T | U;
type OneOf<T extends any[]> = T extends [infer Only]
? Only
: T extends [infer A, infer B, ...infer Rest]
? OneOf<[XOR<A, B>, ...Rest]>
: never;
/* eslint-enable */
/**
* Either success, or unavailable in the rare case that the model failed
*/
export type AudioIntelligenceModelStatus = "success" | "unavailable";
/**
* @example
* ```js
* {
* "count": 1,
* "rank": 0.08,
* "text": "air quality alerts",
* "timestamps": [
* {
* "start": 3978,
* "end": 5114
* }
* ]
* }
* ```
*/
export type AutoHighlightResult = {
/**
* The total number of times the key phrase appears in the audio file
*/
count: number;
/**
* The total relevancy to the overall audio file of this key phrase - a greater number means more relevant
*/
rank: number;
/**
* The text itself of the key phrase
*/
text: string;
/**
* The timestamp of the of the key phrase
*/
timestamps: Timestamp[];
};
/**
* An array of results for the Key Phrases model, if it is enabled.
* See {@link https://www.assemblyai.com/docs/models/key-phrases | Key phrases } for more information.
*
* @example
* ```js
* {
* "status": "success",
* "results": [
* {
* "count": 1,
* "rank": 0.08,
* "text": "air quality alerts",
* "timestamps": [
* {
* "start": 3978,
* "end": 5114
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.08,
* "text": "wide ranging air quality consequences",
* "timestamps": [
* {
* "start": 235388,
* "end": 238694
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.07,
* "text": "more wildfires",
* "timestamps": [
* {
* "start": 230972,
* "end": 232354
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.07,
* "text": "air pollution",
* "timestamps": [
* {
* "start": 156004,
* "end": 156910
* }
* ]
* },
* {
* "count": 3,
* "rank": 0.07,
* "text": "weather systems",
* "timestamps": [
* {
* "start": 47344,
* "end": 47958
* },
* {
* "start": 205268,
* "end": 205818
* },
* {
* "start": 211588,
* "end": 213434
* }
* ]
* },
* {
* "count": 2,
* "rank": 0.06,
* "text": "high levels",
* "timestamps": [
* {
* "start": 121128,
* "end": 121646
* },
* {
* "start": 155412,
* "end": 155866
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.06,
* "text": "health conditions",
* "timestamps": [
* {
* "start": 152138,
* "end": 152666
* }
* ]
* },
* {
* "count": 2,
* "rank": 0.06,
* "text": "Peter de Carlo",
* "timestamps": [
* {
* "start": 18948,
* "end": 19930
* },
* {
* "start": 268298,
* "end": 269194
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.06,
* "text": "New York City",
* "timestamps": [
* {
* "start": 125768,
* "end": 126274
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.05,
* "text": "respiratory conditions",
* "timestamps": [
* {
* "start": 152964,
* "end": 153786
* }
* ]
* },
* {
* "count": 3,
* "rank": 0.05,
* "text": "New York",
* "timestamps": [
* {
* "start": 125768,
* "end": 126034
* },
* {
* "start": 171448,
* "end": 171938
* },
* {
* "start": 176008,
* "end": 176322
* }
* ]
* },
* {
* "count": 3,
* "rank": 0.05,
* "text": "climate change",
* "timestamps": [
* {
* "start": 229548,
* "end": 230230
* },
* {
* "start": 244576,
* "end": 245162
* },
* {
* "start": 263348,
* "end": 263950
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.05,
* "text": "Johns Hopkins University Varsity",
* "timestamps": [
* {
* "start": 23972,
* "end": 25490
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.05,
* "text": "heart conditions",
* "timestamps": [
* {
* "start": 153988,
* "end": 154506
* }
* ]
* },
* {
* "count": 1,
* "rank": 0.05,
* "text": "air quality warnings",
* "timestamps": [
* {
* "start": 12308,
* "end": 13434
* }
* ]
* }
* ]
* }
* ```
*/
export type AutoHighlightsResult = {
/**
* A temporally-sequential array of Key Phrases
*/
results: AutoHighlightResult[];
/**
* The status of the Key Phrases model. Either success, or unavailable in the rare case that the model failed.
*/
status: AudioIntelligenceModelStatus;
};
/**
* Chapter of the audio file
* @example
* ```js
* {
* "summary": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. In some places, the air quality warnings include the warning to stay inside.",
* "gist": "Smoggy air quality alerts across US",
* "headline": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts across US",
* "start": 250,
* "end": 28840
* }
* ```
*/
export type Chapter = {
/**
* The starting time, in milliseconds, for the chapter
*/
end: number;
/**
* An ultra-short summary (just a few words) of the content spoken in the chapter
*/
gist: string;
/**
* A single sentence summary of the content spoken during the chapter
*/
headline: string;
/**
* The starting time, in milliseconds, for the chapter
*/
start: number;
/**
* A one paragraph summary of the content spoken during the chapter
*/
summary: string;
};
/**
* @example
* ```js
* {
* "label": "disasters",
* "confidence": 0.8142836093902588,
* "severity": 0.4093044400215149
* }
* ```
*/
export type ContentSafetyLabel = {
/**
* The confidence score for the topic being discussed, from 0 to 1
*/
confidence: number;
/**
* The label of the sensitive topic
*/
label: string;
/**
* How severely the topic is discussed in the section, from 0 to 1
*/
severity: number;
};
/**
* @example
* ```js
* {
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
* "labels": [
* {
* "label": "disasters",
* "confidence": 0.8142836093902588,
* "severity": 0.4093044400215149
* }
* ],
* "sentences_idx_start": 0,
* "sentences_idx_end": 5,
* "timestamp": {
* "start": 250,
* "end": 28840
* }
* }
* ```
*/
export type ContentSafetyLabelResult = {
/**
* An array of safety labels, one per sensitive topic that was detected in the section
*/
labels: ContentSafetyLabel[];
/**
* The sentence index at which the section ends
*/
sentences_idx_end: number;
/**
* The sentence index at which the section begins
*/
sentences_idx_start: number;
/**
* The transcript of the section flagged by the Content Moderation model
*/
text: string;
/**
* Timestamp information for the section
*/
timestamp: Timestamp;
};
/**
* An array of results for the Content Moderation model, if it is enabled.
* See {@link https://www.assemblyai.com/docs/models/content-moderation | Content moderation } for more information.
*
* @example
* ```js
* {
* "status": "success",
* "results": [
* {
* "text": "Smoke from hundreds of wildfires in Canada is triggering air quality alerts throughout the US. Skylines from Maine to Maryland to Minnesota are gray and smoggy. And in some places, the air quality warnings include the warning to stay inside. We wanted to better understand what's happening here and why, so we called Peter de Carlo, an associate professor in the Department of Environmental Health and Engineering at Johns Hopkins University Varsity. Good morning, professor. Good morning.",
* "labels": [
* {
* "label": "disasters",
* "confidence": 0.8142836093902588,
* "severity": 0.4093044400215149
* }
* ],
* "sentences_idx_start": 0,
* "sentences_idx_end": 5,
* "timestamp": {
* "start": 250,
* "end": 28840
* }
* }
* ],
* "summary": {
* "disasters": 0.9940800441842205,
* "health_issues": 0.9216489289040967
* },
* "severity_score_summary": {
* "disasters": {
* "low": 0.5733263024656846,
* "medium": 0.42667369753431533,
* "high": 0
* },
* "health_issues": {
* "low": 0.22863814977924785,
* "medium": 0.45014154926938227,
* "high": 0.32122030095136983
* }
* }
* }
* ```
*/
export type ContentSafetyLabelsResult = {
/**
* An array of results for the Content Moderation model
*/
results: ContentSafetyLabelResult[];
/**
* A summary of the Content Moderation severity results for the entire audio file
*/
severity_score_summary: {
[key: string]: SeverityScoreSummary;
};
/**
* The status of the Content Moderation model. Either success, or unavailable in the rare case that the model failed.
*/
status: AudioIntelligenceModelStatus;
/**
* A summary of the Content Moderation confidence results for the entire audio file
*/
summary: {
[key: string]: number;
};
};
/**
* @example
* ```js
* {
* "expires_in": 480
* }
* ```
*/
export type CreateRealtimeTemporaryTokenParams = {
/**
* The amount of time until the token expires in seconds
*/
expires_in: number;
};
/**
* A detected entity
* @example
* ```js
* {
* "entity_type": "location",
* "text": "Canada",
* "start": 2548,
* "end": 3130
* }
* ```
*/
export type Entity = {
/**
* The ending time, in milliseconds, for the detected entity in the audio file
*/
end: number;
/**
* The type of entity for the detected entity
*/
entity_type: EntityType;
/**
* The starting time, in milliseconds, at which the detected entity appears in the audio file
*/
start: number;
/**
* The text for the detected entity
*/
text: string;
};
/**
* The type of entity for the detected entity
*/
export type EntityType =
| "account_number"
| "banking_information"
| "blood_type"
| "credit_card_cvv"
| "credit_card_expiration"
| "credit_card_number"
| "date"
| "date_interval"
| "date_of_birth"
| "drivers_license"
| "drug"
| "duration"
| "email_address"
| "event"
| "filename"
| "gender_sexuality"
| "healthcare_number"
| "injury"
| "ip_address"
| "language"
| "location"
| "marital_status"
| "medical_condition"
| "medical_process"
| "money_amount"
| "nationality"
| "number_sequence"
| "occupation"
| "organization"
| "passport_number"
| "password"
| "person_age"
| "person_name"
| "phone_number"
| "physical_attribute"
| "political_affiliation"
| "religion"
| "statistics"
| "time"
| "url"
| "us_social_security_number"
| "username"
| "vehicle_id"
| "zodiac_sign";
/**
* @example
* ```js
* {
* "error": "format_text must be a Boolean"
* }
* ```
*/
export type Error = {
/**
* Error message
*/
error: string;
status?: "error";
[key: string]: unknown;
};
/**
* @example
* ```js
* {
* "transcript_ids": [
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
* ],
* "context": "This is an interview about wildfires.",
* "answer_format": "Bullet Points",
* "final_model": "anthropic/claude-3-5-sonnet",
* "temperature": 0,
* "max_output_size": 3000
* }
* ```
*/
export type LemurActionItemsParams = LemurBaseParams & {
/**
* How you want the action items to be returned. This can be any text.
* Defaults to "Bullet Points".
*
* @defaultValue "Bullet Points
*/
answer_format?: string;
};
/**
* @example
* ```js
* {
* "request_id": "5"e1b27c2-691f-4414-8bc5-f14678442f9e",
* "response": "Here are some potential action items based on the transcript:\n\n- Monitor air quality levels in affected areas and issue warnings as needed.\n\n- Advise vulnerable populations like children, the elderly, and those with respiratory conditions to limit time outdoors.\n\n- Have schools cancel outdoor activities when air quality is poor.\n\n- Educate the public on health impacts of smoke inhalation and precautions to take.\n\n- Track progression of smoke plumes using weather and air quality monitoring systems.\n\n- Coordinate cross-regionally to manage smoke exposure as air masses shift.\n\n- Plan for likely increase in such events due to climate change. Expand monitoring and forecasting capabilities.\n\n- Conduct research to better understand health impacts of wildfire smoke and mitigation strategies.\n\n- Develop strategies to prevent and manage wildfires to limit air quality impacts.\n",
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurActionItemsResponse = LemurStringResponse;
/**
* @example
* ```js
* {
* "transcript_ids": [
* "85f9b381-e90c-46ed-beca-7d76245d375e",
* "7c3acd18-df4d-4432-88f5-1e89f8827eea"
* ],
* "context": "This is an interview about wildfires.",
* "final_model": "anthropic/claude-3-5-sonnet",
* "temperature": 0,
* "max_output_size": 3000
* }
* ```
*/
export type LemurBaseParams = {
/**
* Context to provide the model. This can be a string or a free-form JSON value.
*/
context?: OneOf<
[
string,
{
[key: string]: unknown;
},
]
>;
/**
* The model that is used for the final prompt after compression is performed.
*
* @defaultValue "default
*/
final_model?: LiteralUnion<LemurModel, string>;
/**
* Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000".
* Use either transcript_ids or input_text as input into LeMUR.
*/
input_text?: string;
/**
* Max output size in tokens, up to 4000
* @defaultValue 2000
*/
max_output_size?: number;
/**
* The temperature to use for the model.
* Higher values result in answers that are more creative, lower values are more conservative.
* Can be any value between 0.0 and 1.0 inclusive.
*
* @defaultValue 0
*/
temperature?: number;
/**
* A list of completed transcripts with text. Up to a maximum of 100 files or 100 hours, whichever is lower.
* Use either transcript_ids or input_text as input into LeMUR.
*/
transcript_ids?: string[];
};
/**
* @example
* ```js
* {
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurRequestDetails = {
/**
* The endpoint used for the leMUR request
*/
request_endpoint: string;
/**
* The temperature to use for the model.
* Higher values result in answers that are more creative, lower values are more conservative.
* Can be any value between 0.0 and 1.0 inclusive.
*
* @defaultValue 0
*/
temperature: number;
/**
* The model that was used for the final prompt after compression is performed.
*
* @defaultValue "default"
*/
final_model: LiteralUnion<LemurModel, string>;
/**
* Max output size in tokens, up to 4000
* @defaultValue 2000
*/
max_output_size: number;
/**
* The date when the request was created
*/
created_at: Date;
/**
* A list of completed transcripts with text.
* Use either transcript_ids or input_text as input into LeMUR.
*/
transcript_ids?: string[];
/**
* Custom formatted transcript data. Maximum size is the context limit of the selected model, which defaults to 100000".
* Use either transcript_ids or input_text as input into LeMUR.
*/
input_text?: string;
/**
* A list of questions asked in the request
* Each question can have its own context and answer format.
*/
questions?: LemurQuestion[];
/**
* The prompt used for the model.
*/
prompt?: string;
/**
* Context provided to the model. This can be a string or a free-form JSON value.
*/
context?: OneOf<
[
string,
{
[key: string]: unknown;
},
]
>;
/**
* The format to use for the model's answers.
*/
answer_format?: string;
};
export type LemurBaseResponse = {
/**
* The ID of the LeMUR request
*/
request_id: string;
/**
* The usage numbers for the LeMUR request
*/
usage: LemurUsage;
request?: LemurRequestDetails;
};
/**
* The model that is used for the final prompt after compression is performed.
*
*/
export type LemurModel =
| "anthropic/claude-opus-4-20250514"
| "anthropic/claude-sonnet-4-20250514"
| "anthropic/claude-3-7-sonnet-20250219"
| "anthropic/claude-3-5-sonnet"
| "anthropic/claude-3-opus"
| "anthropic/claude-3-5-haiku-20241022"
| "anthropic/claude-3-haiku"
| "anthropic/claude-3-sonnet"
| "anthropic/claude-2-1"
| "anthropic/claude-2"
| "default"
| "assemblyai/mistral-7b";
/**
* @example
* ```js
* {
* "question": "Where are there wildfires?",
* "answer_format": "List of countries in ISO 3166-1 alpha-2 format"
* }
* ```
*/
export type LemurQuestion = {
/**
* How you want the answer to be returned. This can be any text. Can't be used with answer_options. Examples: "short sentence", "bullet points"
*/
answer_format?: string;
/**
* What discrete options to return. Useful for precise responses. Can't be used with answer_format. Example: ["Yes", "No"]
*/
answer_options?: string[];
/**
* Any context about the transcripts you wish to provide. This can be a string or any object.
*/
context?: OneOf<
[
string,
{
[key: string]: unknown;
},
]
>;
/**
* The question you wish to ask. For more complex questions use default model.
*/
question: string;
};
/**
* An answer generated by LeMUR and its question
* @example
* ```js
* {
* "answer": "CA, US",
* "question": "Where are there wildfires?"
* }
* ```
*/
export type LemurQuestionAnswer = {
/**
* The answer generated by LeMUR
*/
answer: string;
/**
* The question for LeMUR to answer
*/
question: string;
};
/**
* @example
* ```js
* {
* "transcript_ids": [
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
* ],
* "context": "This is an interview about wildfires.",
* "questions": [
* {
* "question": "Where are there wildfires?",
* "answer_format": "List of countries in ISO 3166-1 alpha-2 format",
* "answer_options": [
* "US",
* "CA"
* ]
* },
* {
* "question": "Is global warming affecting wildfires?",
* "answer_options": [
* "yes",
* "no"
* ]
* }
* ],
* "final_model": "anthropic/claude-3-5-sonnet",
* "temperature": 0,
* "max_output_size": 3000
* }
* ```
*/
export type LemurQuestionAnswerParams = LemurBaseParams & {
/**
* A list of questions to ask
*/
questions: LemurQuestion[];
};
/**
* @example
* ```js
* {
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
* "response": [
* {
* "answer": "CA, US",
* "question": "Where are there wildfires?"
* },
* {
* "answer": "yes",
* "question": "Is global warming affecting wildfires?"
* }
* ],
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurQuestionAnswerResponse = LemurBaseResponse & {
/**
* The answers generated by LeMUR and their questions
*/
response: LemurQuestionAnswer[];
};
export type LemurResponse = LemurStringResponse | LemurQuestionAnswerResponse;
/**
* @example
* ```js
* {
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
* "response": "Based on the transcript, the following locations were mentioned as being affected by wildfire smoke from Canada:\n\n- Maine\n- Maryland\n- Minnesota\n- Mid Atlantic region\n- Northeast region\n- New York City\n- Baltimore\n",
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurStringResponse = {
/**
* The response generated by LeMUR.
*/
response: string;
} & LemurBaseResponse;
/**
* @example
* ```js
* {
* "transcript_ids": [
* "47b95ba5-8889-44d8-bc80-5de38306e582"
* ],
* "context": "This is an interview about wildfires.",
* "final_model": "anthropic/claude-3-5-sonnet",
* "temperature": 0,
* "max_output_size": 3000
* }
* ```
*/
export type LemurSummaryParams = LemurBaseParams & {
/**
* How you want the summary to be returned. This can be any text. Examples: "TLDR", "bullet points"
*/
answer_format?: string;
};
/**
* @example
* ```js
* {
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
* "response": "- Wildfires in Canada are sending smoke and air pollution across parts of the US, triggering air quality alerts from Maine to Minnesota. Concentrations of particulate matter have exceeded safety levels.\n\n- Weather systems are channeling the smoke through Pennsylvania into the Mid-Atlantic and Northeast regions. New York City has canceled outdoor activities to keep children and vulnerable groups indoors.\n\n- Very small particulate matter can enter the lungs and impact respiratory, cardiovascular and neurological health. Young children, the elderly and those with preexisting conditions are most at risk.\n\n- The conditions causing the poor air quality could get worse or shift to different areas in coming days depending on weather patterns. More wildfires may also contribute to higher concentrations.\n\n- Climate change is leading to longer and more severe fire seasons. Events of smoke traveling long distances and affecting air quality over wide areas will likely become more common in the future.\"\n",
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurSummaryResponse = LemurStringResponse;
/**
* @example
* ```js
* {
* "transcript_ids": [
* "64nygnr62k-405c-4ae8-8a6b-d90b40ff3cce"
* ],
* "prompt": "List all the locations affected by wildfires.",
* "context": "This is an interview about wildfires.",
* "final_model": "anthropic/claude-3-5-sonnet",
* "temperature": 0,
* "max_output_size": 3000
* }
* ```
*/
export type LemurTaskParams = {
/**
* Your text to prompt the model to produce a desired output, including any context you want to pass into the model.
*/
prompt: string;
} & LemurBaseParams;
/**
* @example
* ```js
* {
* "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
* "response": "Based on the transcript, the following locations were mentioned as being affected by wildfire smoke from Canada:\n\n- Maine\n- Maryland\n- Minnesota\n- Mid Atlantic region\n- Northeast region\n- New York City\n- Baltimore\n",
* "usage": {
* "input_tokens": 27,
* "output_tokens": 3
* }
* }
* ```
*/
export type LemurTaskResponse = LemurStringResponse;
/**
* The usage numbers for the LeMUR request
*/
export type LemurUsage = {
/**
* The number of input tokens used by the model
*/
input_tokens: number;
/**
* The number of output tokens generated by the model
*/
output_tokens: number;
};