Skip to content

DataForScience/GeminiAI

Repository files navigation

GitHub Twitter @data4sci GitHub top language GitHub repo size GitHub last commit

Graphs For Science Data Science Briefing

Gemini API with VertexAI for Developers

Code and slides to accompany the online series of webinars: https://www.oreilly.com/live-events/gemini-api-with-vertexai-for-developers/0642572299484/ by Data For Science.

This webinar provides attendees with an excellent opportunity to explore Google's cutting-edge Generative AI capabilities, specifically focusing on the Gemini API within the Vertex AI framework on Google Cloud Platform. As AI development accelerates, understanding and implementing multimodal generative models have become essential for creating innovative and intelligent applications. The session will provide participants with the knowledge and hands-on skills to leverage generative AI across various modalities, including text generation for content creation and natural language processing, image synthesis for design and visual communication, video creation for automated production and immersive experiences, and audio generation for advancements in voice assistants and sound design.

The content is designed to provide developers with the necessary skills and knowledge to integrate powerful AI features into their projects. Whether building new applications or enhancing existing ones, the insights gained will enable the creation of more dynamic, interactive, and intelligent user experiences. By mastering the Gemini API within Vertex AI and the broader GCP ecosystem, developers will be positioned to harness the latest developments by one of the forefront leaders in this growing field.

Course Structure

1. Gemini API and Vertex AI Fundamentals

  • Generative AI
  • Introduction to Gemini API
  • Overview of Vertex AI

2. Gemini API for Text Generation

  • Prompt Engineering for Text Models
  • Text Generation with Gemini API
  • Text Models for Information Extraction

3. Multimodal Applications with Gemini API

  • Exploring Gemini's Image and Video Understanding Capabilities
  • Hands-on: Image Captioning and Visual Question Answering
  • Integrating Multimodal Inputs for Advanced Applications
  • Real-world Use Cases for Multimodal Generative AI

4. Vertex AI and Deployment Strategies

  • Advanced MLOps Practices with Vertex AI
  • Model Monitoring and Explainability on Vertex AI
  • Deploying Gemini-powered Applications
  • Scaling and Optimization for Production Environments

5. End-to-End Generative AI Solutions

  • Designing and Architecting Generative AI Systems
  • Best Practices for Security and Data Privacy

Setup

1) Install dependencies (recommended: uv)

  1. Install uv (if needed):
curl -LsSf https://astral.sh/uv/install.sh | sh
  1. Create an environment and install dependencies:
git clone https://github.com/DataForScience/GeminiAI.git
cd GeminiAI
uv venv
source .venv/bin/activate  # Windows: .venv\Scripts\activate
uv sync

2) Add API keys

You'll need accounts with the following services:

Service Used in Where to get it
Google AI Studio Modules 1, 3, 4, 5 aistudio.google.com
Google Cloud Modules 1, 4 console.cloud.google.com (free tier available)

Once you have your keys, set the following environment variables (or add them to a .env file):

GEMINI_API_KEY=...
GCP_PROJECT=your-gcp-project-id

3) Launch notebooks

jupyter notebook

Repository Structure

GeminiAI/
├── 1. Gemini Fundamentals.ipynb                 # Module 1: Gemini API basics
├── 2. Text Generation.ipynb                     # Module 2: Text generation
├── 3. Multimodal.ipynb                          # Module 3: Multimodal inputs
├── 4. Deployment.ipynb                          # Module 4: Deployment
├── 5. E2E Solutions.ipynb                       # Module 5: End-to-end solutions
├── slides/                                      # Slides
│   └── GeminiAI.pdf
├── data/                                        # Logos, author image, and sample assets
├── d4sci.mplstyle                               # Custom matplotlib style
├── pyproject.toml                               # Dependency manifest (for `uv sync`)
└── .env                                         # API keys (create this file; do not commit)

Suggested learning path

  • Start with Module 1 and run the notebooks in order (1 → 5).
  • If you only want the deck, open slides/GeminiAI.pdf.
File Topic
1. Gemini Fundamentals.ipynb Gemini API and Vertex AI Fundamentals
2. Text Generation.ipynb Gemini API for Text Generation
3. Multimodal.ipynb Multimodal Applications with Gemini API
4. Deployment.ipynb Vertex AI and Deployment Strategies
5. E2E Solutions.ipynb End-to-End Generative AI Solutions

Estimated API Costs

Running through all notebooks end-to-end costs roughly $1–3 in API calls, depending on how much you re-run cells.


Questions?

Reach out at info@data4sci.com or open an issue if something isn't working.

Author

Bruno Gonçalves

Bruno Gonçalves

Data For Science, Inc.

Web: www.data4sci.com
Twitter/X: @bgoncalves
LinkedIn: @bmtgoncalves
Email: info@data4sci.com
Schedule a Call: https://data4sci.com/call

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages