Croway commented on PR #20362:
URL: https://github.com/apache/camel/pull/20362#issuecomment-3643098444

   @davsclaus I'll use the doInit for the initialization (though, the factory 
need the exchange therefore I'll leave it in the process).
   
   Regarding the autowiring, the 
`endpoint.getCamelContext().getRegistry().lookupByNameAndType(endpoint.getAgentId(),
 Agent.class)` is just a fallback strategy, the actual `agent` parameter is 
already autowired and work as expected.
   
   I've added it in case of multiple agents configured, this way, if you are 
lazy enough like me, it will be enough
   `langchain4j-agent:ollama` and `langchain4j-agent:openai`


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