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/generative_ai at main · DataSolveProblems/python-docs-samples

Expand file tree

/

generative_ai

/
Copy path

Directory actions

More options

More options

Directory actions

More options

More options

Latest commit

 

History

History
History
 
 
/

generative_ai

/
Copy path

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
batch_predict
batch_predict
 
 
chat_completions
chat_completions
 
 
context_caching
context_caching
 
 
controlled_generation
controlled_generation
 
 
embeddings
embeddings
 
 
evaluation
evaluation
 
 
express_mode
express_mode
 
 
extensions
extensions
 
 
function_calling
function_calling
 
 
grounding
grounding
 
 
image
image
 
 
image_generation
image_generation
 
 
inference
inference
 
 
labels
labels
 
 
model_garden
model_garden
 
 
model_tuning
model_tuning
 
 
openai
openai
 
 
prompts
prompts
 
 
rag
rag
 
 
reasoning_engine
reasoning_engine
 
 
safety
safety
 
 
system_instructions
system_instructions
 
 
template_folder
template_folder
 
 
text_generation
text_generation
 
 
text_models
text_models
 
 
token_count
token_count
 
 
understand_audio
understand_audio
 
 
understand_docs
understand_docs
 
 
understand_video
understand_video
 
 
video
video
 
 
README.md
README.md
 
 
constraints.txt
constraints.txt
 
 

README.md

Outline

Generative AI Samples on Google Cloud

Welcome to the Python samples folder for Generative AI on Vertex AI! In this folder, you can find the Python samples used in Google Cloud Generative AI documentation.

If you are looking for colab notebook, then this link.

Getting Started

To try and run these Code samples, we have following recommend using Google Cloud IDE or Google Colab.

Note: A Google Cloud Project is a pre-requisite.

Feature folders

Browse the folders below to find the Generative AI capabilities you're interested in.

Python Samples Folder Google Cloud Product Short Description (With the help of Gemini 1.5)
Context Caching https://cloud.google.com/vertex-ai/generative-ai/docs/context-cache/context-cache-overview Code samples demonstrating how to use context caching with Vertex AI's generative models. This allows for more consistent and relevant responses across multiple interactions by storing previous conversation history.
Controlled Generation https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/control-generated-output Examples of how to control the output of generative models, such as specifying length, format, or sentiment.
Count Token https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/list-token Code demonstrating how to count tokens in text, which is crucial for managing costs and understanding model limitations.
Embeddings https://cloud.google.com/vertex-ai/generative-ai/docs/embeddings Code showing how to generate and use embeddings from text or images. Embeddings can be used for tasks like semantic search, clustering, and classification.
Extensions https://cloud.google.com/vertex-ai/generative-ai/docs/extensions/overview Demonstrations of how to use extensions with generative models, enabling them to access and process real-time information, use tools, and interact with external systems.
Function Calling https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/function-calling Examples of how to use function calling to enable generative models to execute specific actions or retrieve information from external APIs.
Grounding https://cloud.google.com/vertex-ai/generative-ai/docs/grounding/overview Code illustrating how to ground generative models with specific knowledge bases or data sources to improve the accuracy and relevance of their responses.
Image Generation https://cloud.google.com/vertex-ai/generative-ai/docs/image/overview Samples showcasing how to generate images from text prompts using models like Imagen.
Model Garden https://cloud.google.com/vertex-ai/generative-ai/docs/model-garden/explore-models Resources related to exploring and utilizing pre-trained models available in Vertex AI's Model Garden.
Model Tuning https://cloud.google.com/vertex-ai/generative-ai/docs/models/tune-models Code and guides for fine-tuning pre-trained generative models on specific datasets or for specific tasks.
RAG https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/rag-api Information and resources about Retrieval Augmented Generation (RAG), which combines information retrieval with generative models.
Reasoning Engine https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/reasoning-engine Details about the Reasoning Engine, which enables more complex reasoning and logical deduction in generative models.
Safety https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/configure-safety-attributes Examples of how to configure safety attributes and filters to mitigate risks and ensure responsible use of generative models.
System Instructions https://cloud.google.com/vertex-ai/generative-ai/docs/learn/prompts/system-instructions?hl=en Code demonstrating how to provide system instructions to guide the behavior and responses of generative models.
Text Generation https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/send-chat-prompts-gemini Samples of how to generate text using Gemini models, including chat-based interactions and creative writing.
Understand Audio https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/audio-understanding Examples of how to use generative models for audio understanding tasks, such as transcription and audio classification.
Understand Video https://cloud.google.com/vertex-ai/generative-ai/docs/multimodal/video-understanding Samples showcasing how to use generative models for video understanding tasks, such as video summarization and content analysis.

Contributing

Contributions welcome! See the Contributing Guide.

Getting help

Please use the issues page to provide suggestions, feedback or submit a bug report.

Disclaimer

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

You are visitor 01402503 — 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.