spring-projects / spring-projects/spring-ai
Response format for OpenAiAudioTranscriptionOptions is ignored
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.5k
- Forks
- 2.9k
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 6
Description
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at OpenAiAudioTranscriptionOptions and the audio transcription model call shown in the reproduction, then trace how responseFormat and granularityType reach the request. Reproduce the example with spring-ai 1.0.0-SNAPSHOT and Java 21; done means VERBOSE_JSON and WORD granularity are reflected in the response.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100