Skip to content
Draft
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
1 change: 1 addition & 0 deletions js/ai/src/generate/response.ts
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ export class GenerateResponse<O = unknown> implements ModelResponseData {
custom: (this.custom as { toJSON?: () => any }).toJSON?.() || this.custom,
request: this.request,
operation: this.operation,
raw: this.raw,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure what's the best way to do this... the custom field already contains the same data as raw... duplicating that data is not ideal.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@pavelgj I had to end up doing this because there was no way of getting segment/word level transcriptions.

these weren't present inside custom and so had to rely on pulling out raw like this to get the {segments, words, text} from oai whisper api

};
if (!out.finishMessage) delete out.finishMessage;
if (!out.request) delete out.request;
Expand Down