-
Notifications
You must be signed in to change notification settings - Fork 0
Home
meta-legend edited this page Jul 4, 2026
·
5 revisions
A simple, modern C++ library for REST API requests and LLM chat (local via Ollama, or cloud providers), built on libcurl.
#include "networkml.h"
ML::Requests req;
ML::Response r = req.get("https://api.example.com/data");
if (r.ok()) std::cout << r.status << "\n" << r.body;
ML::Chat chat(Provider::Ollama, "llama3.2:1b");
std::cout << chat.ask("Explain RAII in one sentence.");- Getting Started: requirements, building with CMake + vcpkg, prebuilt binaries
-
Requests: the HTTP client (verbs,
Response, auth, downloads, uploads, retries) - Chat: the LLM client (providers, streaming, reasoning, history)
ML::Filemoved to File ML in v2.1.
- HTTP verbs
get/post/put/patch/del/head, each returning a richResponse(status, body, response headers) - Auth helpers, URL encoding, file download/upload, and opt-in retries with backoff
-
Chatacross Ollama, Groq, OpenRouter, DeepSeek, OpenAI, Anthropic behind one API - Token streaming, reasoning-token support, conversation memory, save/load history
- Built on statically-linked libcurl (HTTPS via Schannel on Windows), C++17