oscerd commented on PR #28969:
URL: https://github.com/apache/camel/pull/28969#issuecomment-6588563872

   Thanks Claus. On the empty body: yes, I think it is worth it, so I did it. 
With the prompt header set, an empty or blank `String` and an empty `byte[]` 
are no longer treated as media (`isEmptyMedia` in `GoogleVertexAIProducer`), so 
a leftover empty body gives a prompt-only request, as it did before this PR. An 
empty stream or file is still read as media, since knowing it is empty means 
reading it. Tests: `anEmptyTextBodyWithThePromptHeaderIsNotSent` and 
`anEmptyByteArrayBodyWithThePromptHeaderIsNotSent`. The doc, the body types and 
the upgrade-guide entry say so.
   
   On `Path`: right, a `Path` body was already read as media (through the 
`Path` to `byte[]` type converter), only its MIME type was not guessed. 
`mimeTypeOfFile` now takes the name from `getFileName()`; test 
`aPathBodyIsSentWithTheMimeTypeOfItsName`.
   
   On the YAML example: the file consumer example now uses `expression: 
constant: expression: ...`. I left the older examples on that page as they are.
   
   _Claude Code on behalf of Andrea Cosentino (oscerd)_
   


-- 
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