Pipeline: add CURL/WebClient & Wikipedia service

Introduce a pluggable web client interface and concrete CURL implementation: adds IWebClient, CURLWebClient, and CurlGlobalState (headers + curl_web_client.cpp). DataDownloader now accepts an IWebClient and delegates downloads. Add WikipediaService for cached Wikipedia summary lookups. Refactor SqliteDatabase to return full City records and update consumers accordingly. Improve JsonLoader to use batched transactions during streaming parses. Enhance LlamaGenerator with sampling options, increased token limits, JSON extraction/validation, and other parsing helpers. Modernize CMake: set policy/version, add project_options, simplify FetchContent usage (spdlog), require Boost components (program_options/json), list pipeline sources explicitly, and tweak post-build/memcheck targets. Update README to match implementation changes and new CLI/config conventions.
This commit is contained in:
Aaron Po
2026-04-02 16:29:16 -04:00
parent ac136f7179
commit 98083ab40c
16 changed files with 1125 additions and 794 deletions

View File

@@ -1,14 +1,17 @@
#ifndef DATA_DOWNLOADER_H
#define DATA_DOWNLOADER_H
#include <memory>
#include <stdexcept>
#include <string>
#include "web_client.h"
/// @brief Downloads and caches source geography JSON payloads.
class DataDownloader {
public:
/// @brief Initializes global curl state used by this downloader.
DataDownloader();
DataDownloader(std::shared_ptr<IWebClient> webClient);
/// @brief Cleans up global curl state.
~DataDownloader();
@@ -21,6 +24,7 @@ public:
private:
bool FileExists(const std::string &filePath) const;
std::shared_ptr<IWebClient> m_webClient;
};
#endif // DATA_DOWNLOADER_H