sgns::neoswarm::api::ApiServer¶
Orchestrates the full inference pipeline. More...
#include <api_server.hpp>
Public Classes¶
| Name | |
|---|---|
| struct | Config |
Public Functions¶
| Name | |
|---|---|
| ApiServer(Config cfg) | |
| ~ApiServer() | |
| outcome::result< void > | Initialize() Initialise all subsystems. |
| outcome::result< InferenceResponse > | Process(const Task & task) Process a single inference request (all modes). |
| outcome::result< void > | Serve() Start the gRPC server (blocks until Stop() is called). |
| void | Stop() Stop the server and release all resources. |
| bool | IsRunning() const |
| bool | IsSuperGeniusConnected() const |
| bool | IsSuperGeniusNetworkEnabled() const |
Detailed Description¶
Orchestrates the full inference pipeline.
Mode 1 (SingleNode): API → Router → Core LLM → Response Mode 2 (Specialist): API → Router → Core → Specialist → Response Mode 3 (Swarm): API → Router → Broadcast → [Nodes] → Consensus → Grokipedia Validation → Response
Public Functions Documentation¶
function ApiServer¶
function ~ApiServer¶
function Initialize¶
Initialise all subsystems.
Return: outcome::success or the first error encountered.
function Process¶
Process a single inference request (all modes).
Parameters:
- task Incoming task.
Return: InferenceResponse or InferenceFailed.
function Serve¶
Start the gRPC server (blocks until Stop() is called).
Return: outcome::success or NetworkError.
function Stop¶
Stop the server and release all resources.
function IsRunning¶
Return: True if the server is currently running.
function IsSuperGeniusConnected¶
Return: True if connected to SuperGenius network.
function IsSuperGeniusNetworkEnabled¶
Return: True if SuperGenius network mode was enabled in config.
Updated on 2026-07-25 at 22:56:56 +0000