Skip to content

Network ML v2.0.0

Latest

Choose a tag to compare

@meta-legend meta-legend released this 05 Jun 07:43

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 curl subprocess or temp files.
  • Modern verbs get / post / put / patch / del / head returning a rich Response (status, body, response headers).
  • Inline request bodies, multiple request headers, and per-request timeouts.
  • download (stream to disk), multipart upload, and opt-in retries with backoff.
  • ML::Auth helpers (bearer / basic / apiKey) and ML::Url percent-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)

  • Chat constructor is now Chat(Provider, model, apiKey, host) (provider first).
  • Requests::get now takes optional headers + timeout and returns a Response; the old single-argument form is replaced.
  • Several File methods changed or were expanded.
  • Chat::stream returns 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.