Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Gemini 2.x extravaganza for Zucchini

Gemini 2.x extravaganza for Zucchini

This is a number of demos I've done for GDG Cloud Zurich on 24apr25.

- Gemini 2.0: what you can do
- Gemini 2.5: what you can do
- adk: what it is and demo

Avatar for Riccardo Carlesso

Riccardo Carlesso

April 25, 2025
Tweet

More Decks by Riccardo Carlesso

Other Decks in Programming

Transcript

  1. extravaganza for 🥒 Zucchini Zuri, 24 April 2025 Riccardo Carlesso

    Developer Advocate Let’s delve in some Gemini 2.0 and 2.5 serious stuff.
  2. 🐦 @SREccardo www.linkedin.com/in/riccardocarlesso/ https://www.linkedin.com/in/riccardocarlesso/ Former sysadmin, Ruby [on Rails] developer,

    network admin. 11-years Googler, passionate about Reliability, SRE, DevOps, Maths, yellow, 🎹 piano, triathlons 󰖱🏃󰚬, caipirinhas and Amarone. As a Developer🥑Advocate for Google Cloud, I preach SRE, DevOps, the Google Way of doing things to various audiences. About me
  3. Enterprise Vertex AI Studio Google Cloud APIs cloud.google.com/vertex-ai Consumers Gemini

    gemini.google.com Developers Google AI Studio Google APIs aistudio.google.com ai.google.dev/gemini-api
  4. Using environment variables Gemini Developer API on Google AI Studio

    export GOOGLE_API_KEY='your-api-key' Gemini Developer API on Vertex AI export GOOGLE_GENAI_USE_VERTEXAI=true export GOOGLE_CLOUD_PROJECT='your-project-id' export GOOGLE_CLOUD_LOCATION='us-central1' client = genai.Client() Common client initialization
  5. Google Search Tool Ground model responses in Google Search results

    For more accurate, up-to-date, and relevant responses
  6. Why grounding? Ask an LLM: ⚛Explain Einstein’s Relativity 🪐How many

    moons does Saturn have? ⌚What time is it today? 🌤What is the weather like in Zurich?
  7. Google Search Tool google_search_tool = Tool(google_search=GoogleSearch()) response = client.models.generate_content( model="gemini-2.0-flash-001",

    contents="How’s the weather like today in Zurich ?", config=GenerateContentConfig(tools=[google_search_tool]) )
  8. Rio de Janeiro Demo3 Demo3: In Vertex AI Studio, show

    this prompt without and with Google Search grounding and also show the code: Whats the weather like today in Zurich? Use Celsius and JSON format
  9. Automatic Function Calling Submit a Python function for automatic function

    calling (instead of submitting an OpenAPI specification of the function)
  10. Automatic Function Calling def get_current_weather(location: str) -> str: """Example method.

    Returns the current weather. Args: location: The city and state, e.g. San Francisco, CA """ weather_map: dict[str, str] = { "Barcelona": "sunny", "Paris": "foggy", "Milan": "raining", "Rome": "hot", "London, UK": "rainy and dark", } return weather_map.get(location, "unknown")
  11. Automatic Function Calling response = client.models.generate_content( model="gemini-2.0-flash-001", contents="What is the

    weather like in Zurich?", config=GenerateContentConfig( tools=[get_current_weather], temperature=0))
  12. • Multimodality – model can see, hear, speak • Low-latency

    – for real-time interaction • Memory – model remembers the session • Tools – Function calling, code execution, and Google search Multimodal Live API–key capabilities
  13. Rio de Janeiro Dem Demo6: First, show that Live API

    is available in Google AI Studio. Then, show 1-2 of these starter apps: cd ~/git/pvt-gemini20
  14. https://www.youtube.com/shorts/sA Ah4aI7ZA8 Veo: text to video “Shrek and Fiona are

    doing an Ironman in Japan: Shrek is cycling in a trisuite while Fiona is getting out of the water right now. The camera fades out, then the view goes to above. On a distance, donkey is taking pictures of the green couple, on top of his big red dragon.“
  15. Veo: text+image to video “Person becomes Shrek in front of

    Milan Duomo square, then eats a panettone”
  16. Veo: text+image to video “This code enters a rocket ship

    and flies to the colorful clouds of Google Cloud!
  17. Veo: text+image to video “This code enters a rocket ship

    and flies to the colorful clouds of Google Cloud!
  18. Make me a captivating endless runner game. Key instructions on

    the screen. p5js scene, no HTML. I like pixelated red dragons and dungeon-like backgrounds. Oh wow this is amazing! Now please change the code in two ways: When you start you can choose among 4 named characters: a red dragon ("Ale"), a giraffe ("Seby"), a puffin ("Papino") or a waffle ("waffle"). Less pixelated than it is now please. with SPACE you have single/double jump - as it is with letter "f/F" you spit fire on obstacles and destroy them with a mini explosion effect. This gives you five points
  19. Rio de Janeiro Dem Demo8: go to gemini.google.com => paste

    this: Make me a captivating endless runner game. Key instructions on the screen. p5js scene, no HTML. I like pixelated red dragons , ogres, gelatinous cubes, goblins. zombies and dungeon-like backgrounds. Try on both 2.5flash and 2.5pro then https://editor.p5js.org/
  20. Friends will be friends.. sometimes My friend Paolo: “I love

    it for my daughters, can you add Lithuanian and Dutch?” Riccardo: “no way! No time for that” Paolo: “Ok, I’ll try myself! Don’t give me the prompt!” …
  21. Thank you! Riccardo Carlesso Developer Advocate at Google @palladius Ricc.rocks

    http://linkedin.com/in/riccardo-carlesso https://speakerdeck.com/palladius