// Route: POST /google/enterprise/ground (check grounding) #include "google/enterprise/cases.hpp" using namespace molo::example::test; int main() { const std::string gc = "projects/p1/locations/global/groundingConfigs/default_grounding_config"; const std::string facts = "[{\"factText\":\"The sky is blue.\"}]"; const std::string good = "{\"grounding_config\":\"" + gc + "\",\"answer\":\"Blue.\",\"facts\":" + facts + "}"; check_enterprise_post_route("/google/enterprise/ground", good, "{\"grounding_config\":\"" + gc + "\",\"answer\":\"Blue.\",\"facts\":\"nope\"}", "facts not an array"); check_enterprise_dry_run("/google/enterprise/ground", good, "groundingConfigs/default_grounding_config:check"); return finish("google/enterprise/ground"); }