MCPcopy Create free account
hub / github.com/MotrixLab/ViMoGen / call_gemini

Function call_gemini

motion_gating/apply_quality_gate.py:187–205  ·  view source on GitHub ↗
(client, video_path: Path, prompt: str, fps: int = 5)

Source from the content-addressed store, hash-verified

185
186
187def call_gemini(client, video_path: Path, prompt: str, fps: int = 5) -> Dict[str, Any]:
188 with open(video_path, "rb") as f:
189 video_bytes = f.read()
190 response = client.models.generate_content(
191 model="gemini-2.5-flash",
192 contents=types.Content(
193 role="user",
194 parts=[
195 types.Part(
196 inline_data=types.Blob(data=video_bytes, mime_type="video/mp4"),
197 video_metadata=types.VideoMetadata(fps=fps)
198 ),
199 types.Part(text=prompt),
200 ],
201 ),
202 )
203 raw_text = response.text.strip() if response.text else ""
204 analysis, matches = interpret_vlm_output(raw_text)
205 return {"analysis": analysis, "matches": matches, "raw": raw_text}
206
207def run_alignment_checks(
208 entries: List[Dict[str, Any]],

Callers

nothing calls this directly

Calls 1

interpret_vlm_outputFunction · 0.90

Tested by

no test coverage detected