MCPcopy
hub / github.com/Sophomoresty/gemini-web2api / _call_gemini

Method _call_gemini

gemini_web2api.py:514–520  ·  view source on GitHub ↗
(self, prompt, model_id, think_mode, tools)

Source from the content-addressed store, hash-verified

512 return model_name, cfg["mode"], (think_override if think_override is not None else cfg["think"]), None
513
514 def _call_gemini(self, prompt, model_id, think_mode, tools):
515 raw = gemini_stream_generate(prompt, model_id, think_mode)
516 text = extract_response_text(raw)
517 tool_calls = None
518 if tools and text:
519 text, tool_calls = parse_tool_calls(text)
520 return text or "", tool_calls
521
522 def handle_chat(self, body: bytes):
523 req = json.loads(body)

Callers 3

handle_chatMethod · 0.95
handle_responsesMethod · 0.95

Calls 3

gemini_stream_generateFunction · 0.85
extract_response_textFunction · 0.70
parse_tool_callsFunction · 0.70

Tested by

no test coverage detected