2026-10-24 04:05:41 +02:00
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
// A Google service is a name plus a base URL (host and version prefix).
|
|
|
|
|
// New Google APIs are one constant here and one Service subclass.
|
|
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
|
|
namespace molo::google {
|
|
|
|
|
|
|
|
|
|
struct ServiceEndpoint {
|
|
|
|
|
std::string name;
|
|
|
|
|
std::string base_url; // No trailing slash.
|
2026-10-24 04:29:48 +02:00
|
|
|
// Express-mode endpoints accept only an API key: never send OAuth there.
|
|
|
|
|
bool prefer_key = false;
|
2026-10-24 04:05:41 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
namespace endpoints {
|
|
|
|
|
ServiceEndpoint text_to_speech();
|
|
|
|
|
ServiceEndpoint speech_to_text();
|
|
|
|
|
ServiceEndpoint generative();
|
|
|
|
|
// Gemini through Vertex AI (express-mode API keys start with "AQ.").
|
|
|
|
|
ServiceEndpoint vertex_generative();
|
|
|
|
|
// Every endpoint this build knows, for status pages.
|
|
|
|
|
std::vector<ServiceEndpoint> catalog();
|
|
|
|
|
} // namespace endpoints
|
|
|
|
|
|
|
|
|
|
} // namespace molo::google
|