Update: the ML::File filesystem utilities are no longer part of Network ML. They now live in the separate File ML library (https://github.com/meta-legend/file-ml-library) as the same ML::File class. Depend on file-ml and include fileml.h.
A major release that rebuilds the library on in-process libcurl and adds a full LLM chat client. This is a major version because the public API has breaking changes (see below).
Highlights
HTTP client (ML::Requests)
- All transport now runs in-process via statically-linked libcurl (HTTPS via Schannel on Windows). No more
curlsubprocess or temp files. - Modern verbs
get/post/put/patch/del/headreturning a richResponse(status, body, response headers). - Inline request bodies, multiple request headers, and per-request timeouts.
download(stream to disk), multipartupload, and opt-inretrieswith backoff.ML::Authhelpers (bearer / basic / apiKey) andML::Urlpercent-encoding.
LLM chat (ML::Chat)
- One API across Ollama, Groq, OpenRouter, DeepSeek, OpenAI, Anthropic.
- Token streaming, reasoning-token support, conversation memory, system prompts, temperature / max-tokens.
- Save / load conversation history to JSON.
File utilities
The ML::File filesystem utilities moved to the separate File ML library (https://github.com/meta-legend/file-ml-library). The class is unchanged.
Build and packaging
- C++17, CMake + vcpkg, with install/export so consumers can
find_package(NetworkML). - Windows prebuilt binaries are self-contained (libcurl + zlib merged in, system libs auto-link): you link only
networkml.lib.
Breaking changes (from 1.x)
Chatconstructor is nowChat(Provider, model, apiKey, host)(provider first).Requests::getnow takes optional headers + timeout and returns aResponse; the old single-argument form is replaced.- Several
Filemethods changed or were expanded. Chat::streamreturns the HTTP status (long) instead of void.
Install
- Prebuilt Windows x64 (MSVC): download the attached zip and link
networkml.lib. - Everything else: build from source with CMake. See the wiki.