Skip to main content

LLM plugin to access Google's Gemini family of models

Project description

llm-gemini

PyPI Changelog Tests License

API access to Google's Gemini models

Installation

Install this plugin in the same environment as LLM.

llm install llm-gemini

Usage

Configure the model by setting a key called "gemini" to your API key:

llm keys set gemini
<paste key here>

Now run the model using -m gemini-pro, for example:

llm -m gemini-pro "A joke about a pelican and a walrus"

Why did the pelican get mad at the walrus?

Because he called him a hippo-crit.

To chat interactively with the model, run llm chat:

llm chat -m gemini-pro

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd llm-gemini
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

llm install -e '.[test]'

To run the tests:

pytest

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-gemini-0.1a0.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

llm_gemini-0.1a0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file llm-gemini-0.1a0.tar.gz.

File metadata

  • Download URL: llm-gemini-0.1a0.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for llm-gemini-0.1a0.tar.gz
Algorithm Hash digest
SHA256 a697541eaadb13731ffded448b0fa22e204716e316556b1da02d08dc5f36f634
MD5 c2675582386013d26985eeb2c729e967
BLAKE2b-256 3f8bb65e1300492dddd0287a60077239ef3080749ac3945ee63dfd565a00e53d

See more details on using hashes here.

File details

Details for the file llm_gemini-0.1a0-py3-none-any.whl.

File metadata

  • Download URL: llm_gemini-0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for llm_gemini-0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 79b5dba829cc5b69318b68ee50f17d26f785ec2f16aff7d114f4b816a654ad90
MD5 eb43378b450b39dd63308c93e9bebb23
BLAKE2b-256 c53692cb4e5979175a27f34aec28f204b16ac7493bbd6d9784f90d7ab39e7716

See more details on using hashes here.

Supported by

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