Skip to content

Latest commit

 

History

History

Gemini with Vertex AI and LangChain (Python)

Note

This is the Python code for Gemini in Java with Vertex AI and LangChain4j codelab geared towards Python developers to discover Gemini Large Language Model by Google using LangChain framework.

Prerequisites

Before running the samples, it's a good idea to create a Python virtual environment and activate it:

python -m venv .venv
source .venv/bin/activate

Install the dependencies:

pip install -r requirements.txt

You also need to have a Google Cloud account and project ready and set up two environment variables:

export PROJECT_ID=YOUR_PROJECT_ID
export LOCATION=us-central1

Samples

These are the list of samples for different use cases:


This is not an official Google product.