gnodet-bot commented on code in PR #31134:
URL: https://github.com/apache/camel/pull/31134#discussion_r4741589408


##########
components/camel-ai/camel-langchain4j-ingest/src/main/java/org/apache/camel/component/langchain4j/ingest/LangChain4jIngestConfiguration.java:
##########
@@ -35,48 +35,58 @@
 @UriParams
 public class LangChain4jIngestConfiguration implements Cloneable {
 
-    @UriParam(description = "The EmbeddingStore to write segments to. When not 
set, the single bean of that type"
-                            + " in the registry is used; zero or several beans 
fail the endpoint start with an"
-                            + " error naming this option.")
+    @UriParam(description = "The LangChain4j EmbeddingStore that the 
embeddings and their segments are added to. When"
+                            + " not set, the single bean of that type in the 
registry is used; zero or several beans"
+                            + " fail the start of the route with an error 
naming this option.")
     @Metadata(autowired = true)
     private EmbeddingStore<TextSegment> embeddingStore;
 
-    @UriParam(description = "The EmbeddingModel to embed segments with. When 
not set, the single bean of that type"
-                            + " in the registry is used; zero or several beans 
fail the endpoint start with an"
-                            + " error naming this option.")
+    @UriParam(description = "The LangChain4j EmbeddingModel that embeds the 
segments, or with modality=media the whole"
+                            + " body. When not set, the single bean of that 
type in the registry is used; zero or"
+                            + " several beans fail the start of the route with 
an error naming this option.")
     @Metadata(autowired = true)
     private EmbeddingModel embeddingModel;
 
-    @UriParam(description = "Maximum size of one segment, in characters.", 
defaultValue = "500")
+    @UriParam(description = "Maximum size of one segment, in characters, for 
the default recursive DocumentSplitter of"
+                            + " LangChain4j, which splits by paragraphs, then 
lines, sentences and words until the"
+                            + " parts fit. Must be greater than 
maxOverlapSize. Not used when documentSplitter is set"
+                            + " or with modality=media.",
+              defaultValue = "500")
     private int maxSegmentSize = 500;
 
-    @UriParam(description = "How much of the previous segment each segment 
repeats, in characters. Overlap keeps a"
-                            + " sentence split across a boundary retrievable 
from either side.",
+    @UriParam(description = "Maximum size, in characters, of the end of a 
segment that the next segment repeats, for"
+                            + " the default recursive DocumentSplitter. 
LangChain4j repeats only whole sentences, as many"
+                            + " of the last ones as fit, so a last sentence 
longer than this gives no overlap; 0 turns"

Review Comment:
   💬 **Nit (doc clarity):** This sentence chains three clauses and runs 32 
words:
   
   > `"LangChain4j repeats only whole sentences, as many of the last ones as 
fit, so a last sentence longer than this gives no overlap"`
   
   Consider splitting into two:
   
   ```suggestion
       @UriParam(description = "Maximum size, in characters, of the end of a 
segment that the next segment repeats, for"
                               + " the default recursive DocumentSplitter. 
LangChain4j repeats only whole sentences: as"
                               + " many of the last ones as fit. A sentence 
longer than this value gives no overlap; 0"
                               + " turns the overlap off. Must be smaller than 
maxSegmentSize. Not used when documentSplitter is"
                               + " set or with modality=media.",
   ```



##########
components/camel-google/camel-google-storage/src/main/java/org/apache/camel/component/google/storage/GoogleCloudStorageConstants.java:
##########
@@ -21,80 +21,111 @@
 
 public final class GoogleCloudStorageConstants {
 
-    @Metadata(label = "producer", description = "The operation to perform.",
+    @Metadata(label = "producer", description = "The operation to perform. It 
takes precedence over the operation option.",
               javaType = 
"org.apache.camel.component.google.storage.GoogleCloudStorageOperations")
     public static final String OPERATION = "CamelGoogleCloudStorageOperation";
     @Metadata(label = "consumer", description = "The name of the bucket the 
object was consumed from",
               javaType = "String")
     public static final String BUCKET_NAME = 
"CamelGoogleCloudStorageBucketName";
-    @Metadata(description = "The object Name which will be used for the 
current operation",
+    @Metadata(description = "The name of the object. The consumer and 
getObject set it. The producer takes the object of the"
+                            + " operation or of the upload from it when the 
objectName option is not set.",
               javaType = "String")
     public static final String OBJECT_NAME = 
"CamelGoogleCloudStorageObjectName";
-    @Metadata(label = "producer", description = "The prefix to be used in List 
Objects operation",
+    @Metadata(label = "producer",
+              description = "Lists only the objects whose name starts with 
this prefix, for the listObjects operation.",
               javaType = "String")
     public static final String PREFIX_NAME = 
"CamelGoogleCloudStoragePrefixName";
-    @Metadata(label = "producer", description = "The object Destination Name 
which will be used for the current operation",
+    @Metadata(label = "producer", description = "The name of the copy, for the 
copyObject operation, which requires it.",
               javaType = "String")
     public static final String DESTINATION_OBJECT_NAME = 
"CamelGoogleCloudStorageDestinationObjectName";
-    @Metadata(label = "producer", description = "The bucket Destination Name 
which will be used for the current operation",
+    @Metadata(label = "producer",
+              description = "The bucket to copy the object to, for the 
copyObject operation, which requires it. The bucket is"
+                            + " created when it does not exist and 
autoCreateBucket is enabled.",
               javaType = "String")
     public static final String DESTINATION_BUCKET_NAME = 
"CamelGoogleCloudStorageDestinationBucketName";
-    @Metadata(label = "producer", description = "The time in millisecond the 
download link will be valid.", javaType = "Long",
+    @Metadata(label = "producer",
+              description = "How long, in milliseconds, the URL of the 
createDownloadLink operation is valid. The"
+                            + " operation signs a V2 URL to GET the object, so 
the credentials must be"
+                            + " able to sign, as service account credentials 
can.",
+              javaType = "Long",
               defaultValue = "300000")
     public static final String DOWNLOAD_LINK_EXPIRATION_TIME = 
"CamelGoogleCloudStorageDownloadLinkExpirationTime";
-    @Metadata(description = "The content length of this object.", javaType = 
"Long")
+    @Metadata(description = "The size of the object in bytes, set by the 
consumer and getObject. On upload, the value, or the"
+                            + " length of the body when it is not set, is 
stored in the custom metadata of the object under"
+                            + " the key Content-Length.",
+              javaType = "Long")
     public static final String CONTENT_LENGTH = 
"CamelGoogleCloudStorageContentLength";
-    @Metadata(description = "The content type of this object.", javaType = 
"String")
+    @Metadata(description = "The content type of the object, set by the 
consumer and getObject. On upload, it sets the"
+                            + " content type of the object.",
+              javaType = "String")
     public static final String CONTENT_TYPE = 
"CamelGoogleCloudStorageContentType";
-    @Metadata(description = "The Cache-Control metadata can specify two 
different aspects of how data is served from Cloud Storage: "
-                            +
-                            "whether the data can be cached and whether the 
data can be transformed",
+    @Metadata(description = "The Cache-Control metadata of the object, which 
says whether and how long its content may be"
+                            + " cached when it is served. Set by the consumer 
and getObject. On upload, it sets the"
+                            + " Cache-Control of the object.",
               javaType = "String")
     public static final String CACHE_CONTROL = 
"CamelGoogleCloudStorageCacheControl";
-    @Metadata(description = "The content disposition of this object.", 
javaType = "String")
+    @Metadata(description = "The Content-Disposition metadata of the object, 
set by the consumer and getObject. On upload, it"
+                            + " sets the Content-Disposition of the object.",
+              javaType = "String")
     public static final String CONTENT_DISPOSITION = 
"CamelGoogleCloudStorageContentDisposition";
-    @Metadata(description = "The content encoding of this object.", javaType = 
"String")
+    @Metadata(description = "The Content-Encoding metadata of the object, such 
as gzip, set by the consumer and getObject."
+                            + " On upload, it sets the Content-Encoding of the 
object.",
+              javaType = "String")
     public static final String CONTENT_ENCODING = 
"CamelGoogleCloudStorageContentEncoding";
-    @Metadata(description = "The md5 checksum of this object.", javaType = 
"String")
+    @Metadata(description = "The MD5 hash of the content of the object. The 
consumer and getObject set it as a hexadecimal"
+                            + " string. On upload, it sets the MD5 hash of the 
object, which the library expects base64"

Review Comment:
   💬 **Nit (doc clarity):** The description correctly notes that the consumer 
sets the MD5 as hex but upload expects base64. It may help to explicitly warn 
users not to round-trip the value, since passing the consumed hex string to 
upload would cause a silent checksum failure. Consider appending: `"The formats 
differ — do not pass the consumed value directly to an upload."`



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