Skip to content

bug: Additional properties name are not respected for TranscriptionCreateParams #559

@philippart-s

Description

@philippart-s

Hi,

Related to #544 and 220503e.

When adding an additional body properties with TranscriptionCreateParams the name of the properties is changed to propName[propName] in the request.

For example this code:

TranscriptionCreateParams createParams = TranscriptionCreateParams.builder()
            .file(path)
            .model(System.getenv("OVH_AI_ENDPOINTS_WHISPER_MODEL_NAME"))
            .putAdditionalBodyProperty("myProp", JsonValue.from(true))
            .responseFormat(AudioResponseFormat.VERBOSE_JSON)
            .build();

    TranscriptionVerbose transcription =
            client.audio().transcriptions().create(createParams).asVerbose();

Generate the HTTP param:

Content-Disposition: form-data; name="myProp[myProp]"
Content-Type: text/plain; charset=UTF-8

true

It should be:

Content-Disposition: form-data; name="myProp"
Content-Type: text/plain; charset=UTF-8

true

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions