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

Response format for OpenAiAudioTranscriptionOptions is ignored #2073

Open
NerminKarapandzic opened this issue Jan 15, 2025 · 0 comments
Open

Comments

@NerminKarapandzic
Copy link
Contributor

Please do a quick search on GitHub issues first, there might be already a duplicate issue for the one you are about to create.
If the bug is trivial, just go ahead and create the issue. Otherwise, please take a few moments and fill in the following sections:

Bug description
Response format for OpenAiAudioTranscriptionOptions is being ignored. For example, using VERBOSE_JSON and GranularityType.WORD will return simple text response.

Environment
Using spring-ai version 1.0.0-SNAPSHOT
Java version 21

Steps to reproduce
AudioTranscriptionOptions options = OpenAiAudioTranscriptionOptions.builder()
.responseFormat(TranscriptResponseFormat.VERBOSE_JSON)
.granularityType(GranularityType.WORD)
.build();

  AudioTranscriptionPrompt transcriptionRequest = new AudioTranscriptionPrompt(audioResource, options);
  AudioTranscriptionResponse response = openAiAudioTranscriptionModel.call(transcriptionRequest);

Inspect the response

Expected behavior
Response should respect the granularity and response format options.

Minimal Complete Reproducible example
Please provide a failing test or a minimal complete verifiable example that reproduces the issue.
Bug reports that are reproducible will take priority in resolution over reports that are not reproducible.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant