ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
foresthub::rag::remote::RemoteRetriever Class Reference

Retriever implementation that queries the ForestHub backend via HTTP. More...

#include <retriever.hpp>

Inheritance diagram for foresthub::rag::remote::RemoteRetriever:
foresthub::rag::Retriever

Public Member Functions

 RemoteRetriever (const config::ProviderConfig &cfg, std::shared_ptr< core::HttpClient > http_client)
std::shared_ptr< QueryResponseQuery (const QueryRequest &req) override
 Query for similar document chunks.

Detailed Description

Retriever implementation that queries the ForestHub backend via HTTP.

Sends POST requests to /rag/query with Device-Key authentication. Reuses the same HttpClient and ProviderConfig as ForestHub LLM providers.

Constructor & Destructor Documentation

◆ RemoteRetriever()

foresthub::rag::remote::RemoteRetriever::RemoteRetriever ( const config::ProviderConfig & cfg,
std::shared_ptr< core::HttpClient > http_client )
Parameters
cfgProvider config (api_key used as Device-Key, base_url as backend URL).
http_clientShared HTTP client for network requests.

Member Function Documentation

◆ Query()

std::shared_ptr< QueryResponse > foresthub::rag::remote::RemoteRetriever::Query ( const QueryRequest & req)
overridevirtual

Query for similar document chunks.

Parameters
reqQuery parameters (collection, query text, result count).
Returns
Query response with matching chunks, or nullptr on error.

Implements foresthub::rag::Retriever.


The documentation for this class was generated from the following file: