|
OpenAnima 0.2.0
Middleware for conversational NPCs that interact with the player, the world and each other
|
#include <RestProviderConfig.h>
Public Member Functions | |
| void | validate () const |
| std::string | chatCompletionsUrl () const |
Settings of a chat-completions provider.
The values come from the code that builds the provider. The library never reads the environment: where a setting lives is a decision of the host application, and a library that reaches for the process environment cannot be embedded twice in one process with two different configurations.
The base URL points at the API root, with or without a trailing slash: "http://localhost:11434/v1" for a local Ollama server, "https://api.openai.com/v1" for a hosted service. Anything speaking the same contract works unchanged.
| std::string OpenAnima::Provider::RestProviderConfig::chatCompletionsUrl | ( | ) | const |
| void OpenAnima::Provider::RestProviderConfig::validate | ( | ) | const |
Checks that the settings can be used. A missing base URL or model is a broken precondition; a number out of its range is something the host can report and correct.
| ConfigError | when a numeric setting falls outside its accepted range. |