|
NeuralPlus 0.2.0
A small C++17 SDK for AI clients, sessions, tools, and tracing
|
The provider examples use the production OpenAIClient, AnthropicClient, GeminiClient, or OpenAICompatibleClient and the normal libcurl transport. They do not replace HTTP with MockHttpTransport.
The generated NeuralPlus documentation site has an Examples section containing syntax-highlighted source generated directly from the checked-in files below. The repository remains the single source of truth.
| Example | OpenAI | Anthropic | Gemini | OpenAI-compatible |
|---|---|---|---|---|
| Chatbot | source | source | source | source |
| Custom model/config | source | source | source | source |
| Multimodal | source | source | source | source |
The credential-free session example demonstrates sessions, tools, state, and tracing without contacting a provider.
Build them with:
Run any example with --help to see all options. Prefer environment variables for credentials:
The --api-key option is convenient for temporary local use, but an environment variable or process secret store is safer because command-line arguments may be visible to other local processes. Never commit a key or .env file.
Endpoint overrides must use HTTPS. Plain HTTP is accepted only for localhost, 127.0.0.1, or [::1], which keeps local compatible servers convenient without sending credentials or prompt content over a cleartext network.
Each chatbot supports an interactive conversation, an optional system instruction, a model override, and a one-shot --prompt.
The first three read their standard provider environment variables when --api-key is absent. The compatible example permits an unauthenticated local endpoint or --api-key-env NAME for a server-specific variable.
These programs show how to use a model ID that is not in the convenience catalog, set provider options, and override a provider endpoint:
Inspect the source before copying its example provider options. A field accepted by one model may be rejected by another.
The multimodal examples accept only forms mapped by the corresponding NeuralPlus adapter:
| Program | Demonstrated inputs |
|---|---|
neuralplus_openai_multimodal | Image and file |
neuralplus_anthropic_multimodal | Image and PDF |
neuralplus_gemini_multimodal | Image, audio, video, PDF, or another inline file |
neuralplus_openai_compatible_multimodal | Image, MP3/WAV audio, and file when the target server supports them |
Examples:
These small examples inline local bytes so the C++ data flow is visible. Provider upload APIs are preferable for large media and repeated use. Check current size, format, and model constraints in the OpenAI file-input guide, Anthropic PDF guide, and Gemini video guide.
CI compiles every example against the real provider client and production transport. It invokes each provider example only with --help, which exits before credential resolution or network access. This confirms the public API and command-line path on every primary platform without storing provider keys, spending provider credits, or making a mocked example look production-ready.
Protocol behavior is covered separately by deterministic unit tests that inject MockHttpTransport. Live provider calls are an explicit local integration step because public-repository pull requests must not receive repository secrets.
The same CI run validates the complete Doxygen site on pull requests. After a successful push to main, GitHub Pages publishes the validated output, including this guide, the API reference, and all example source pages.