ArafatKhan2198 opened a new pull request, #10524:
URL: https://github.com/apache/ozone/pull/10524

   ## What changes were proposed in this pull request?
   This PR refactors the Recon chatbot so it fetches cluster data by calling 
Recon methods in-process, instead of making HTTP requests back to the same 
Recon server.
   
   Previously, the chatbot ran inside the Recon JVM but still used the Recon 
REST API to answer questions. That added unnecessary overhead: URL 
construction, HTTP handling, and response parsing for data Recon already 
exposes in Java.
   
   This change introduces a direct query path (`ReconQueryExecutor`, 
`ReconEndpointRouter`, and related helpers) that maps LLM-selected tools to the 
corresponding Recon logic. LangChain4j native tool-calling is used end to end 
for tool selection and execution. The old HTTP-based tool executor and 
OpenAPI-driven prompt resources are removed in favor of a simpler tool 
semantics model.
   
   Existing safety behavior is preserved: only allowlisted tools can run, query 
limits are enforced, and scoped queries (for example, bucket-scoped key 
listing) still apply. The public Recon REST API used by the UI is unchanged.
   ## What is the link to the Apache JIRA
   https://issues.apache.org/jira/browse/HDDS-15570
   
   ## How was this patch tested?
   - Unit tests added/updated for the chatbot agent, LLM routing, and direct 
Recon query path (`TestReconQueryExecutor`, `TestReconEndpointRouter`, 
`TestReconApiAllowlist`, `TestLlmRouting`, and related agent/LLM tests)
   - Existing chatbot tests updated to reflect the new direct-call flow


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to