Skip to main content

Plugin for LLM adding support for Google Cloud Vertex AI

Project description

llm-vertex

Plugin for LLM adding support for Google Cloud Vertex AI.

Please note that this plugin is for Vertex AI specifically, not Google AI Studio.

For Gemini support using AI Studio, please see llm-gemini instead.

Supported models:

  • gemini-2.5-flash
  • gemini-2.5-pro
  • gemini-2.0-flash-lite
  • gemini-2.0-flash
  • gemini-1.5-pro
  • gemini-1.5-flash

Installation

See Installing Plugins for detailed instructions.

Method 1: Use llm

llm install llm-vertex

Method 2: Use pip

pip install llm-vertex

Use

First, authenticate using gcloud:

gcloud auth application-default login

Export two environment variables for the GCP Project and location you want to use:

export VERTEX_PROJECT_ID=gcp-project-id VERTEX_LOCATION=us-east1

Run llm and specify one of the provided models:

 llm -m vertex-gemini-1.5-pro-preview-0409 "What's one clever name for a pet pelican?"
"Gulliver" would be a clever name for a pet pelican, referencing both its large gullet and its potential for long journeys! 🦜

Development

Create and activate a virtual environment:

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

Install the package in development mode with test dependencies:

pip install -e '.[dev]'

Run the tests:

python -m pytest

The tests use mocking to avoid requiring actual Google Cloud credentials during development, but do not really test actual functionality outside of making sure the plugin is installed and can be used.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_vertex_fork-0.2.3.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_vertex_fork-0.2.3-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file llm_vertex_fork-0.2.3.tar.gz.

File metadata

  • Download URL: llm_vertex_fork-0.2.3.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for llm_vertex_fork-0.2.3.tar.gz
Algorithm Hash digest
SHA256 2fe6e894fff46b96f298a210e12411c3a8e6651914960046364949e6a3af603a
MD5 988bce45bca3cbac2704ec1f420037f2
BLAKE2b-256 0e302543b6ebc9a6a7f8dd4059496b7b1a98f7948aee58c31525bea1ae856e98

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_vertex_fork-0.2.3.tar.gz:

Publisher: publish.yml on avoidik/llm-vertex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file llm_vertex_fork-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_vertex_fork-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0c20be99d360289abeac8d6baaa6a8bc2be29f36e09df3ebc04dba72477cc45d
MD5 41aaf7bf72edb00d9c8c8d5fdde671a6
BLAKE2b-256 372cdddc4932a77eae9dc766927f3339592a9337984f97ce200e1118f9b68edb

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_vertex_fork-0.2.3-py3-none-any.whl:

Publisher: publish.yml on avoidik/llm-vertex

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page