OpenAnima 0.2.0
Middleware for conversational NPCs that interact with the player, the world and each other
Loading...
Searching...
No Matches
Namespaces | Classes | Functions
OpenAnima Namespace Reference

Root of the library. More...

Namespaces

namespace  Core
 The agent and the vocabulary of a conversation.
 
namespace  Http
 The boundary with the network.
 
namespace  Provider
 Inference backends and their settings.
 

Classes

class  ConfigError
 Configuration taken from the environment is missing or malformed. More...
 
class  OpenAnimaError
 Base class of every error raised by the library. More...
 
class  ParseError
 The provider answered with a body that is not a usable completion payload. More...
 
class  ProviderError
 The provider answered with a non-success status or with an error payload. More...
 
class  TransportError
 The request never reached the provider: DNS, TLS, refused connection or timeout. More...
 

Functions

Core::NPCBrain makeNpc (Provider::RestProviderConfig config)
 
Core::NPCBrain makeNpc (Provider::RestProviderConfig config, std::shared_ptr< Http::HttpTransport > transport)
 

Detailed Description

Root of the library.

Holds the error taxonomy, which is the one thing every package raises and every caller catches.

Function Documentation

◆ makeNpc() [1/2]

Core::NPCBrain OpenAnima::makeNpc ( Provider::RestProviderConfig  config)

Builds an NPC with an explicit configuration on the default transport.

Parameters
configEndpoint, model and generation settings.
Returns
An NPC ready to ask.
Exceptions
ConfigErrorwhen a numeric setting falls outside its accepted range.

◆ makeNpc() [2/2]

Core::NPCBrain OpenAnima::makeNpc ( Provider::RestProviderConfig  config,
std::shared_ptr< Http::HttpTransport >  transport 
)

Builds an NPC on an explicit transport. This is the escape hatch: tests, local backends and any custom HTTP boundary go through here instead of the default stack.

Parameters
configEndpoint, model and generation settings.
transportHTTP boundary used for every call.
Returns
An NPC ready to ask.