#include "vendors/audio/cartesia/client.h" #include "llm/config.h" namespace molo::audio::cartesia { llm::ApiClientConfig CartesiaEndpoints::config() { llm::ApiClientConfig c; c.vendor = kVendor; c.base_url = kBase; c.key_env = kKeyEnv; c.auth = llm::AuthStyle::kBearer; c.default_headers["Cartesia-Version"] = kVersion; return c; } std::shared_ptr CartesiaEndpoints::from_env() { auto hosts = std::make_shared(); hosts->add("api", HostFactory::from_env(config())); return hosts; } std::shared_ptr CartesiaEndpoints::with(AudioHost host) { auto hosts = std::make_shared(); hosts->add("api", std::move(host)); return hosts; } std::string CartesiaEndpoints::key() { return llm::Config::get(kKeyEnv); } AudioSocket::Headers CartesiaEndpoints::ws_headers(const std::string& key) { return {{"Authorization", "Bearer " + key}, {"Cartesia-Version", kVersion}}; } } // namespace molo::audio::cartesia