1"""GCS file input with Gemini.
2
3Pass files directly from Google Cloud Storage (gs://) without downloading.
4Supports files up to 2GB. Requires Vertex AI authentication.
5"""
6
7from kern.agent import Agent
8from kern.media import File
9from kern.models.google import Gemini
10
11agent = Agent(
12 model=Gemini(
13 id="gemini-2.0-flash",
14 vertexai=True,
15 ),
16 markdown=True,
17)
18
19agent.print_response(
20 "Summarize this document and extract key insights.",
21 files=[
22 File(
23 url="gs://cloud-samples-data/generative-ai/pdf/2312.11805v3.pdf",
24 mime_type="application/pdf",
25 )
26 ],
27)