gnodet commented on PR #22086:
URL: https://github.com/apache/camel/pull/22086#issuecomment-4087956272

   @jamesnetherton You're absolutely right — I was wrong about the encoding 
format being the root cause. The `openai-java` SDK handles base64→float 
conversion via `EmbeddingValue.asFloats()`, so the default encoding format is 
irrelevant to the ClassCastException.
   
   The real issue was:
   1. The Ollama test container doesn't provide an embedding model by default 
(`embeddingModelName()` returns `null`)
   2. This causes the producer to set an exception on the exchange
   3. The tests never checked `result.getException()` and tried to cast the 
body directly, leading to a misleading `ClassCastException`
   
   I've reworked the PR to:
   - Revert the encoding format default back to `base64`
   - Add `Assumptions.assumeTrue` to skip tests when no embedding model is 
available
   - Add exception assertions after each `template.request()` call
   
   Thanks for catching this!


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to