Agents 0.0.2
Edge AI Agents SDK
Loading...
Searching...
No Matches
config_loader.h
1
10#pragma once
11
12#include <string>
13#include <unordered_map>
14
15namespace agents {
16
25public:
30
35 explicit ConfigLoader(const std::string& customPath);
36
43 std::string get(const std::string& key, const std::string& defaultValue = "") const;
44
50 bool has(const std::string& key) const;
51
57
58private:
59 std::string envFilePath;
60 std::unordered_map<std::string, std::string> config;
61
62 void loadEnvFile();
63 std::string findEnvFile();
64};
65
66} // namespace agents
std::string get(const std::string &key, const std::string &defaultValue="") const
Get a configuration value.
static ConfigLoader & getInstance()
Get the singleton instance of ConfigLoader.
bool has(const std::string &key) const
Check if a key exists in the configuration.
ConfigLoader(const std::string &customPath)
Construct a ConfigLoader with a custom .env file path.
ConfigLoader()
Construct a ConfigLoader with default .env file locations.
Framework Namespace.
Definition agent.h:18