1080-row Discovery-derived call table, validating Caller, typed facades, demo under /google/enterprise, Discovery checker, live read checks. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
16 lines
821 B
C++
16 lines
821 B
C++
// 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");
|
|
}
|