Skip to content

[JS] Mismatch Type for 'file' Property #2007

@minhanh-phan

Description

@minhanh-phan

The DPG generation for the latest Whisper feature of @azure/openai is having mismatch type between "string" and "bytes". The type of the file property for transcription interface is string. This cause a build error because the type in the parameter is Uint8Array in all the getAudioTranscriptions here.

An example of the function signature is here

export function _getAudioTranscriptionSimpleJsonSend(
  context: Client,
  file: Uint8Array,
  deploymentId: string,
  options: GetAudioTranscriptionSimpleJsonOptions = { requestOptions: {} }

But the type definition is string here

export interface AudioTranscriptionOptionsSimpleJson {
  /** The audio file object to transcribe. */
  file: string;

Expectation: We expected the type of the file is Uint8Array. The definition in the TypeSpec file is bytes here.

Reproduce:

  • Use the latest commit for the TypeSpec file d33d47dc85ef1f2c29c3dd278ded3650df9e49d7

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions