davsclaus commented on PR #31038:
URL: https://github.com/apache/camel/pull/31038#issuecomment-7227244554

   @gansheer a follow-up idea, not a blocker for this PR: 
[CAMEL-27736](https://issues.apache.org/jira/browse/CAMEL-27736) (linked to 
CAMEL-27544).
   
   Today `CamelContentRetriever` can only be used from Java, and so can the 
`RetrievalAugmentor` in `AgentConfiguration`, so YAML, XML and Kaoto users 
cannot use RAG from routes. The ticket sketches the `ai-tool` pattern for 
retrieval:
   
   - an `ai-retriever:orders?tags=support&description=...` consumer registers 
the route as a source, with the retriever's settings (`timeout`, `onError`, 
`maxResults`, ...) as endpoint options;
   - `langchain4j-agent` gets a `retrieverTags` option, like `tags` for tools, 
and builds the augmentor, the query router and the content injector itself.
   
   This class would be the engine underneath. Two things would change: it would 
call the consumer route through an invoker (as `AiToolExecutor` does) instead 
of an endpoint URI, and the bounded execution would move into a 
framework-neutral module, so that `camel-openai` can use the same sources too.
   
   Could you have a look at whether that fits the API you have in mind? If the 
constructor should change (an invoker next to `endpointUri`), it is cheaper 
now, while the class is new in 4.24. Otherwise it is fine as a follow-up, and 
this PR can merge as it is.
   
   _Claude Code on behalf of davsclaus_
   


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