assemblyai 4.5.0 → 4.6.1

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.
@@ -596,12 +596,7 @@ export type LemurActionItemsParams = LemurBaseParams & {
596
596
  * }
597
597
  * ```
598
598
  */
599
- export type LemurActionItemsResponse = LemurBaseResponse & {
600
- /**
601
- * The response generated by LeMUR
602
- */
603
- response: string;
604
- };
599
+ export type LemurActionItemsResponse = LemurStringResponse;
605
600
 
606
601
  /**
607
602
  * @example
@@ -632,7 +627,6 @@ export type LemurBaseParams = {
632
627
  >;
633
628
  /**
634
629
  * The model that is used for the final prompt after compression is performed.
635
- * Defaults to "default".
636
630
  *
637
631
  * @defaultValue "default
638
632
  */
@@ -687,10 +681,16 @@ export type LemurBaseResponse = {
687
681
  *
688
682
  */
689
683
  export type LemurModel =
684
+ | "anthropic/claude-3-5-sonnet"
685
+ | "anthropic/claude-3-opus"
686
+ | "anthropic/claude-3-haiku"
687
+ | "anthropic/claude-3-sonnet"
688
+ | "anthropic/claude-2-1"
689
+ | "anthropic/claude-2"
690
690
  | "default"
691
+ | "anthropic/claude-instant-1-2"
691
692
  | "basic"
692
- | "assemblyai/mistral-7b"
693
- | "anthropic/claude-2-1";
693
+ | "assemblyai/mistral-7b";
694
694
 
695
695
  /**
696
696
  * @example
@@ -815,11 +815,27 @@ export type LemurQuestionAnswerResponse = LemurBaseResponse & {
815
815
  response: LemurQuestionAnswer[];
816
816
  };
817
817
 
818
- export type LemurResponse =
819
- | LemurTaskResponse
820
- | LemurSummaryResponse
821
- | LemurQuestionAnswerResponse
822
- | LemurActionItemsResponse;
818
+ export type LemurResponse = LemurStringResponse | LemurQuestionAnswerResponse;
819
+
820
+ /**
821
+ * @example
822
+ * ```js
823
+ * {
824
+ * "request_id": "5e1b27c2-691f-4414-8bc5-f14678442f9e",
825
+ * "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",
826
+ * "usage": {
827
+ * "input_tokens": 27,
828
+ * "output_tokens": 3
829
+ * }
830
+ * }
831
+ * ```
832
+ */
833
+ export type LemurStringResponse = {
834
+ /**
835
+ * The response generated by LeMUR.
836
+ */
837
+ response: string;
838
+ } & LemurBaseResponse;
823
839
 
824
840
  /**
825
841
  * @example
@@ -855,12 +871,7 @@ export type LemurSummaryParams = LemurBaseParams & {
855
871
  * }
856
872
  * ```
857
873
  */
858
- export type LemurSummaryResponse = LemurBaseResponse & {
859
- /**
860
- * The response generated by LeMUR
861
- */
862
- response: string;
863
- };
874
+ export type LemurSummaryResponse = LemurStringResponse;
864
875
 
865
876
  /**
866
877
  * @example
@@ -897,12 +908,7 @@ export type LemurTaskParams = {
897
908
  * }
898
909
  * ```
899
910
  */
900
- export type LemurTaskResponse = {
901
- /**
902
- * The response generated by LeMUR.
903
- */
904
- response: string;
905
- } & LemurBaseResponse;
911
+ export type LemurTaskResponse = LemurStringResponse;
906
912
 
907
913
  /**
908
914
  * The usage numbers for the LeMUR request
@@ -1168,6 +1174,11 @@ export type RealtimeTemporaryTokenResponse = {
1168
1174
  token: string;
1169
1175
  };
1170
1176
 
1177
+ /**
1178
+ * The notification when the redacted audio is ready.
1179
+ */
1180
+ export type RedactedAudioNotification = RedactedAudioResponse;
1181
+
1171
1182
  /**
1172
1183
  * @example
1173
1184
  * ```js
@@ -1369,7 +1380,7 @@ export type SeverityScoreSummary = {
1369
1380
  /**
1370
1381
  * The speech model to use for the transcription.
1371
1382
  */
1372
- export type SpeechModel = "best" | "nano" | "conformer-2";
1383
+ export type SpeechModel = "best" | "nano";
1373
1384
 
1374
1385
  /**
1375
1386
  * The replacement logic for detected PII, can be "entity_name" or "hash". See {@link https://www.assemblyai.com/docs/models/pii-redaction | PII redaction } for more details.
@@ -2506,15 +2517,17 @@ export type Transcript = {
2506
2517
  */
2507
2518
  webhook_auth: boolean;
2508
2519
  /**
2509
- * The header name which should be sent back with webhook calls
2520
+ * The header name to be sent with the transcript completed or failed webhook requests
2510
2521
  */
2511
2522
  webhook_auth_header_name?: string | null;
2512
2523
  /**
2513
- * The status code we received from your server when delivering your webhook, if a webhook URL was provided
2524
+ * The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided
2514
2525
  */
2515
2526
  webhook_status_code?: number | null;
2516
2527
  /**
2517
- * The URL to which we send webhooks upon transcription completion
2528
+ * The URL to which we send webhook requests.
2529
+ * We sends two different types of webhook requests.
2530
+ * One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
2518
2531
  */
2519
2532
  webhook_url?: string | null;
2520
2533
  /**
@@ -2931,17 +2944,17 @@ export type TranscriptOptionalParams = {
2931
2944
  */
2932
2945
  topics?: string[];
2933
2946
  /**
2934
- * The header name which should be sent back with webhook calls
2947
+ * The header name to be sent with the transcript completed or failed webhook requests
2935
2948
  * @defaultValue null
2936
2949
  */
2937
2950
  webhook_auth_header_name?: string | null;
2938
2951
  /**
2939
- * Specify a header name and value to send back with a webhook call for added security
2952
+ * The header value to send back with the transcript completed or failed webhook requests for added security
2940
2953
  * @defaultValue null
2941
2954
  */
2942
2955
  webhook_auth_header_value?: string | null;
2943
2956
  /**
2944
- * The URL to which AssemblyAI send webhooks upon transcription completion
2957
+ * The URL to which we send webhook requests. We sends two different types of webhook requests. One request when a transcript is completed or failed, and one request when the redacted audio is ready if redact_pii_audio is enabled.
2945
2958
  */
2946
2959
  webhook_url?: string;
2947
2960
  /**
@@ -3292,6 +3305,13 @@ export type TranscriptUtterance = {
3292
3305
  words: TranscriptWord[];
3293
3306
  };
3294
3307
 
3308
+ /**
3309
+ * The notifications sent to the webhook URL.
3310
+ */
3311
+ export type TranscriptWebhookNotification =
3312
+ | TranscriptReadyNotification
3313
+ | RedactedAudioNotification;
3314
+
3295
3315
  /**
3296
3316
  * @example
3297
3317
  * ```js