settings.hpp 676 B

12345678910111213141516171819202122
  1. #pragma once
  2. #include <nlohmann/json.hpp>
  3. #include <string>
  4. #include <vector>
  5. namespace svapi {
  6. /// Global service settings — no api_key field (keys live in KeyStore).
  7. struct Settings {
  8. std::string openaiApiBase = "https://api.openai.com";
  9. std::string openaiApiKey;
  10. std::string defaultEmbeddingModel = "text-embedding-3-small";
  11. std::vector<std::string> corsOrigins = {"*"};
  12. uint32_t sessionTtlMinutes = 720;
  13. bool webuiEnabled = true;
  14. std::string defaultProject = "default";
  15. static Settings fromJson(const nlohmann::json& j);
  16. nlohmann::json toJson() const;
  17. };
  18. } // namespace svapi