ForestHub SDK 0.1.0
C++14 LLM SDK for PC and embedded platforms
Loading...
Searching...
No Matches
retriever.hpp
Go to the documentation of this file.
1// SPDX-License-Identifier: AGPL-3.0-only
2// Copyright (c) 2026 ForestHub. All rights reserved.
3// For commercial licensing, visit https://github.com/ForestHubAI/fh-sdk
4
5#ifndef FORESTHUB_RAG_REMOTE_RETRIEVER_HPP
6#define FORESTHUB_RAG_REMOTE_RETRIEVER_HPP
7
10
11#include <memory>
12#include <string>
13
17
18namespace foresthub {
19namespace rag {
20namespace remote {
21
26class RemoteRetriever : public Retriever {
27public:
30 RemoteRetriever(const config::ProviderConfig& cfg, std::shared_ptr<core::HttpClient> http_client);
31
32 std::shared_ptr<QueryResponse> Query(const QueryRequest& req) override;
33
34private:
35 std::shared_ptr<core::HttpClient> http_;
36 std::string api_key_;
37 std::string base_url_;
38 core::HttpClient::Headers cached_headers_;
39};
40
41} // namespace remote
42} // namespace rag
43} // namespace foresthub
44
45#endif // FORESTHUB_RAG_REMOTE_RETRIEVER_HPP
Abstract interface for document retrieval.
Definition retriever.hpp:21
std::shared_ptr< QueryResponse > Query(const QueryRequest &req) override
Query for similar document chunks.
RemoteRetriever(const config::ProviderConfig &cfg, std::shared_ptr< core::HttpClient > http_client)
Client and provider configuration types.
Abstract HTTP client interface and response type.
HTTP-based RAG retriever implementation.
Retrieval-augmented generation: retriever interface and query types.
Top-level namespace for the ForestHub SDK.
Abstract Retriever interface for document retrieval.
Shared configuration for any remote LLM provider.
Definition config.hpp:24
Request parameters for a RAG similarity query.
Definition types.hpp:18