Claus Ibsen created CAMEL-27878:
-----------------------------------
Summary: camel-openai: audioKnownSpeakerReferences splits data
URLs at their comma, the batch producer does not resolve a jsonSchema resource
Key: CAMEL-27878
URL: https://issues.apache.org/jira/browse/CAMEL-27878
Project: Camel
Issue Type: Bug
Components: camel-openai
Reporter: Claus Ibsen
Fix For: 4.25.0
Found while improving the option descriptions of camel-openai for CAMEL-23832
(pull request https://github.com/apache/camel/pull/31149).
These are separate problems of the component; the descriptions change only
documents the current behavior.
h4. 1. audioKnownSpeakerReferences cannot work
{{OpenAIAudioTranscriptionProducer.buildParams}} splits the option with
OpenAIAudioSupport.parseCommaSeparatedValues, but the API expects data URLs
(data:audio/wav;base64,...), which contain a comma, so every sample is cut in
two.
Proposed change: split only on a comma followed by "data:" (or take a List),
and add a test.
h4. 2. The batch producer does not resolve a jsonSchema resource
OpenAIProducer and OpenAIResponsesProducer resolve jsonSchema=resource:... in
doStart, {{OpenAIBatchProducer}} does not, so it fails with "Invalid JSON
schema content".
Proposed change: resolve it in OpenAIBatchProducer.doStart the same way.
_Claude Code on behalf of davsclaus_
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)