GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — python-docs-samples/genai at master · aman-ebay/python-docs-samples

Expand file tree

/

genai

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

genai

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
batch_prediction
batch_prediction
 
 
bounding_box
bounding_box
 
 
content_cache
content_cache
 
 
controlled_generation
controlled_generation
 
 
count_tokens
count_tokens
 
 
embeddings
embeddings
 
 
express_mode
express_mode
 
 
image_generation
image_generation
 
 
live
live
 
 
model_optimizer
model_optimizer
 
 
provisioned_throughput
provisioned_throughput
 
 
safety
safety
 
 
template_folder
template_folder
 
 
text_generation
text_generation
 
 
thinking
thinking
 
 
tools
tools
 
 
tuning
tuning
 
 
video_generation
video_generation
 
 
README.md
README.md
 
 

README.md

Outline

Generative AI Samples on Google Cloud

This directory contains Python code samples demonstrating how to use Google Cloud's Generative AI capabilities on Vertex AI. These samples accompany the Google Cloud Generative AI documentation and provide practical examples of various features and use cases.

Getting Started

To run these samples, we recommend using either Google Cloud Shell, Cloud Code IDE, or Google Colab. You'll need a Google Cloud Project and appropriate credentials.

Prerequisites:

  • Google Cloud Project: Create or select a project in the Google Cloud Console.
  • Authentication: Ensure you've authenticated with your Google Cloud account. See the authentication documentation for details.
  • Enable the Vertex AI API: Enable the API in your project through the Cloud Console.

Sample Categories

The samples are organized into the following categories:

Batch Prediction

Demonstrates how to use batch prediction with Generative AI models. This allows efficient processing of large datasets. See the Batch Prediction documentation for more details.

Bounding Box

Demonstrates how to use Bounding Box with Generative AI models. This allows for object detection and localization within images and video. see the Bounding Box documentation for more details.

Content Cache

Illustrates how to create, update, use, and delete content caches. Caches store frequently used content to improve performance and reduce costs. See the Content Cache documentation for more information.

Controlled Generation

Provides examples of how to control various aspects of the generated content, such as length, format, safety attributes, and more. This allows for tailoring the output to specific requirements and constraints. See the Controlled Generation documentation for details.

Count Tokens

Shows how to estimate token usage for inputs and outputs of Generative AI models. Understanding token consumption is crucial for managing costs and optimizing performance. See the Token Counting documentation for more details.

Express Mode

Demonstrates how to use Express Mode for simpler and faster interactions with Generative AI models using an API key. This mode is ideal for quick prototyping and experimentation. See the Express Mode documentation for details.

Image Generation

Demonstrates how to generate image and edit images using Generative AI models. Check Image Generation with Gemini Flash and Imagen on Vertex AI for details.

Live API

Provides examples of using the Generative AI Live API. This allows for real-time interactions and dynamic content generation.

Model Optimizer

Provides examples of using the Generative AI Model Optimizer. Vertex AI Model Optimizer is a dynamic endpoint designed to simplify model selection by automatically applying the Gemini model which best meets your needs.

Provisioned Throughput

Provides examples demonstrating how to use Provisioned Throughput with Generative AI models. This feature provides a fixed-cost monthly subscription or weekly service that reserves throughput for supported generative AI models on Vertex AI. See the Provisioned Throughput for details.

Safety

Provides examples demonstrating how to configure and apply safety settings to Generative AI models. This includes techniques for content filtering and moderation to ensure responsible AI usage. See the Safety documentation for details.

Text Generation

Provides examples of generating text using various input modalities (text, images, audio, video) and features like asynchronous generation, chat, and text streaming. See theText Generation documentation for details.

Tools

Showcases how to use tools like function calling, code execution, and grounding with Google Search to enhance Generative AI interactions. See the Tools documentation for more information.

Video Generation

Provides examples of generating videos using text & images input modalities. See the Video Generation documentation for details.

Contributing

Contributions are welcome! See the Contributing Guide.

Getting Help

For questions, feedback, or bug reports, please use the issues page.

Disclaimer

This repository is not an officially supported Google product. The code is provided for demonstrative purposes only.

You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.