MCPcopy Create free account
hub / github.com/Sophomoresty/gemini-web2api / _usage

Function _usage

gemini_web2api/server.py:17–20  ·  view source on GitHub ↗
(prompt: str, text: str)

Source from the content-addressed store, hash-verified

15
16
17def _usage(prompt: str, text: str) -> dict:
18 p = len(prompt) // 4
19 c = len(text or "") // 4
20 return {"prompt_tokens": p, "completion_tokens": c, "total_tokens": p + c}
21
22
23def _upload_images(images: list) -> list:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected