gnodet-bot commented on code in PR #30256:
URL: https://github.com/apache/camel/pull/30256#discussion_r4595857380
##########
components/camel-ibm/camel-ibm-watsonx-ai/src/main/java/org/apache/camel/component/ibm/watsonx/ai/handler/AbstractWatsonxAiHandler.java:
##########
@@ -184,6 +186,37 @@ private static List<ChatMessage> toChatMessages(List<?>
list, String source) {
return messages;
}
+ /**
+ * The body as the text an operation reads, whether it sends it to the
model or uses it as a file path or a request
+ * id: text, bytes, a stream or a file is read as it is, and so is any
other body Camel converts to its text, such
+ * as a {@code char[]} or a {@code ByteBuffer}. A Map or a POJO fails
instead, since Camel has no conversion for it
+ * other than its {@code toString()}, so the model would be asked about a
map written in Java notation, or the
+ * request would name such a map as its file (CAMEL-26521).
+ *
+ * @param what the input in the words of the operation, for the message of
a body that is not text
Review Comment:
nit: The `@param what` description "for the message of a body that is not
text" reads as if it refers to the `Message` object rather than the error
message. Since `readAsText()` is `protected static` and visible to subclasses,
slightly clearer wording:
```suggestion
* @param what what the operation reads from the body (e.g. "the
prompt"), used in the error message
```
--
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]