NeoGraph 0.10.0
A C++17 Graph Agent Engine Library — LangGraph for C++
Loading...
Searching...
No Matches
provider.h File Reference

Abstract LLM provider interface. More...

#include <neograph/api.h>
#include <neograph/types.h>
#include <asio/awaitable.hpp>
#include <functional>
#include <memory>
#include <stdexcept>
#include <string>
Include dependency graph for provider.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  neograph::CompletionParams
 Parameters for an LLM completion request. More...
 
class  neograph::Provider
 Abstract base class for LLM providers. More...
 
class  neograph::RateLimitError
 Thrown by a Provider when an upstream API returned HTTP 429 (rate limit exceeded). More...
 

Typedefs

using neograph::StreamCallback = std::function< void(const std::string &chunk)>
 Callback invoked per token during streaming completion.
 

Detailed Description

Abstract LLM provider interface.

Defines the Provider base class that all LLM backends must implement. Supports both synchronous and streaming completions.

Definition in file provider.h.

Typedef Documentation

◆ StreamCallback

using neograph::StreamCallback = typedef std::function<void(const std::string& chunk)>

Callback invoked per token during streaming completion.

Parameters
chunkThe token or text chunk received from the LLM.

Definition at line 52 of file provider.h.