MCPcopy Create free account
hub / github.com/FastFlowLM/FastFlowLM / trim_gemma4e_tool_value

Function trim_gemma4e_tool_value

src/common/AutoModel/modeling_gemma4e.cpp:13–21  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11
12namespace {
13std::string trim_gemma4e_tool_value(std::string value) {
14 size_t start = value.find_first_not_of(" \t\r\n");
15 if (start == std::string::npos) {
16 return "";
17 }
18
19 size_t end = value.find_last_not_of(" \t\r\n");
20 return value.substr(start, end - start + 1);
21}
22
23// --- Gemma4e tool-args parser -------------------------------------------------
24// The model emits relaxed JSON for tool arguments:

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected