Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Sync from internal repo (2024/07/10) #63

Merged
merged 1 commit into from
Jul 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
# Changelog

## [4.5.1]
## [4.6.0]

- Add more TSDoc comments for `RealtimeService` documentation
- Add new LeMUR models
- Add `TranscriptWebhookNotification` which is a union of `TranscriptReadyNotification` or `RedactedAudioNotification`
- Add `RedactedAudioNotification` which represents the body of the PII redacted audio webhook notification.

## [4.5.0]

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "assemblyai",
"version": "4.5.0",
"version": "4.6.0",
"description": "The AssemblyAI JavaScript SDK provides an easy-to-use interface for interacting with the AssemblyAI API, which supports async and real-time transcription, as well as the latest LeMUR models.",
"engines": {
"node": ">=18"
Expand Down
37 changes: 28 additions & 9 deletions src/types/openapi.generated.ts
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,6 @@ export type LemurBaseParams = {
>;
/**
* The model that is used for the final prompt after compression is performed.
* Defaults to "default".
*
* @defaultValue "default
*/
Expand Down Expand Up @@ -687,10 +686,16 @@ export type LemurBaseResponse = {
*
*/
export type LemurModel =
| "anthropic/claude-3-5-sonnet"
| "anthropic/claude-3-opus"
| "anthropic/claude-3-haiku"
| "anthropic/claude-3-sonnet"
| "anthropic/claude-2-1"
| "anthropic/claude-2"
| "default"
| "anthropic/claude-instant-1-2"
| "basic"
| "assemblyai/mistral-7b"
| "anthropic/claude-2-1";
| "assemblyai/mistral-7b";

/**
* @example
Expand Down Expand Up @@ -1168,6 +1173,11 @@ export type RealtimeTemporaryTokenResponse = {
token: string;
};

/**
* The notification when the redacted audio is ready.
*/
export type RedactedAudioNotification = RedactedAudioResponse;

/**
* @example
* ```js
Expand Down Expand Up @@ -2506,15 +2516,17 @@ export type Transcript = {
*/
webhook_auth: boolean;
/**
* The header name which should be sent back with webhook calls
* The header name to be sent with the transcript completed or failed webhook requests
*/
webhook_auth_header_name?: string | null;
/**
* The status code we received from your server when delivering your webhook, if a webhook URL was provided
* The status code we received from your server when delivering the transcript completed or failed webhook request, if a webhook URL was provided
*/
webhook_status_code?: number | null;
/**
* The URL to which we send webhooks upon transcription completion
* 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.
*/
webhook_url?: string | null;
/**
Expand Down Expand Up @@ -2931,17 +2943,17 @@ export type TranscriptOptionalParams = {
*/
topics?: string[];
/**
* The header name which should be sent back with webhook calls
* The header name to be sent with the transcript completed or failed webhook requests
* @defaultValue null
*/
webhook_auth_header_name?: string | null;
/**
* Specify a header name and value to send back with a webhook call for added security
* The header value to send back with the transcript completed or failed webhook requests for added security
* @defaultValue null
*/
webhook_auth_header_value?: string | null;
/**
* The URL to which AssemblyAI send webhooks upon transcription completion
* 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.
*/
webhook_url?: string;
/**
Expand Down Expand Up @@ -3292,6 +3304,13 @@ export type TranscriptUtterance = {
words: TranscriptWord[];
};

/**
* The notifications sent to the webhook URL.
*/
export type TranscriptWebhookNotification =
| TranscriptReadyNotification
| RedactedAudioNotification;

/**
* @example
* ```js
Expand Down