Skip to content

Commit 1288778

Browse files
feat: add warning metadata and summarisation result to response type (#152)
* feat: add warning metadata and summarisation result to response type * Update src/types/metadata.ts --------- Co-authored-by: Sandra Rodgers <[email protected]>
1 parent 880e943 commit 1288778

File tree

3 files changed

+13
-0
lines changed

3 files changed

+13
-0
lines changed

src/types/metadata.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { Warning } from "./warning";
2+
13
export type Metadata = {
24
request_id: string;
35
transaction_key: string;
@@ -12,5 +14,6 @@ export type Metadata = {
1214
arch: string;
1315
};
1416
};
17+
warnings?: Array<Warning>;
1518
models: Array<string>;
1619
};

src/types/prerecordedTranscriptionResponse.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ export class PrerecordedTranscriptionResponse {
1313
channels: Array<Channel>;
1414
utterances?: Array<Utterance>;
1515
summary?: {
16+
result: "success" | "failure";
1617
short: string;
1718
};
1819
};

src/types/warning.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export type Warning = {
2+
parameter: string;
3+
type:
4+
| "unsupported_language"
5+
| "unsupported_model"
6+
| "unsupported_encoding"
7+
| "deprecated";
8+
message: string;
9+
};

0 commit comments

Comments
 (0)