davsclaus opened a new pull request, #30940:
URL: https://github.com/apache/camel/pull/30940

   # Description
   
   Part of [CAMEL-23832](https://issues.apache.org/jira/browse/CAMEL-23832). 
The umbrella ticket stays open.
   
   ## Summary
   
   This PR rewrites the component description and the texts of all 11 endpoint 
options of `langchain4j-web-search`. The
   component has no headers. The old component description was only 
"LangChain4j Web Search Engine" and the `searchId`
   text was "The id". Most option texts repeated the option name ("The 
startPage is the start page number...").
   
   The new texts say:
   
   - that LangChain4j defaults `startPage` to 1 and `safeSearch` to true when 
they are not set,
   - when the body is a single result and when it is a List (a `maxResults` of 
1, or of the `webSearchRequest` when that is
     set), and that the body is null when there is no result,
   - that `webSearchRequest` replaces the message body and all the other search 
options,
   - that `webSearchEngine` is autowired from the registry and the producer 
fails to start without one,
   - that the Tavily engine ignores `language`, `geoLocation`, `startPage`, 
`startIndex`, `safeSearch` and
     `additionalParams` (it only sends the search terms and `maxResults`).
   
   Sources: the Camel producer and configuration, and the bytecode of 
LangChain4j `langchain4j-core` 1.24.0
   (`WebSearchRequest`) and of `langchain4j-web-search-engine-tavily` / 
`langchain4j-web-search-engine-google-custom`
   1.24.0-beta34.
   
   ### Found, not changed
   
   - `LangChain4jWebSearchComponent` has a `configuration` field with 
`@Metadata`, but no setter. So the component has no
     component options of its own: the search options and `webSearchEngine` can 
be set only per endpoint, not with
     `camel.component.langchain4j-web-search.*`.
   - `maxResults` and `resultType` are marked `required = true`, but both have 
a default value (1 and `CONTENT`), so a user
     never has to set them.
   
   ## Tests
   
   - There is no new test, as only description text changes.
   - A script compared the component JSON with the parent commit: only 
`description` fields changed (12 texts: the
     component description and 11 options).
   
   # Target
   
   - [x] I checked that the commit is targeting the correct branch (Camel 4 
uses the `main` branch)
   
   # Tracking
   
   - [x] If this is a large change, bug fix, or code improvement, I checked 
there is a [JIRA issue](https://issues.apache.org/jira/browse/CAMEL) filed for 
the change (usually before you start working on it).
   
   # Apache Camel coding standards and style
   
   - [x] I checked that each commit in the pull request has a meaningful 
subject line and body.
   - [x] I ran the formatter and built the module, then regenerated the catalog 
copy, `dsl/camel-endpointdsl` and `dsl/camel-componentdsl`, and committed all 
generated changes.
   
   # AI-assisted contributions
   
   - [x] If this PR includes AI-generated code, commits have proper 
co-authorship attribution (e.g., `Co-authored-by` trailers) and the PR 
description identifies the AI tool used.
   
   _Claude Code on behalf of davsclaus_
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)
   


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