llm-gemini  by simonw

LLM plugin for accessing Google's Gemini models

created 1 year ago
365 stars

Top 78.2% on sourcepulse

GitHubView on GitHub
Project Summary

This plugin provides access to Google's Gemini family of large language models through the llm CLI tool. It enables users to interact with various Gemini models, leverage their multi-modal capabilities, and utilize features like code execution and Google Search grounding.

How It Works

The plugin integrates with the llm command-line interface, allowing users to specify Gemini models via the -m flag. It handles API key management and configuration, supporting both direct key setting and environment variables. The plugin facilitates multi-modal inputs (images, audio, video) by accepting file paths or URLs as arguments. Advanced features like JSON output formatting, code execution, and Google Search grounding are enabled through specific command-line options.

Quick Start & Requirements

  • Install via llm install llm-gemini.
  • Requires an API key for Google's Gemini models.
  • API key can be set via llm keys set gemini <key> or the LLM_GEMINI_KEY environment variable.
  • Supports various Gemini models, including gemini-2.0-flash, gemini-2.5-flash-preview-04-17, and embedding models.
  • Documentation: https://github.com/simonw/llm-gemini

Highlighted Details

  • Supports multi-modal inputs (images, audio, video).
  • Enables code execution within a secure sandbox.
  • Integrates Google Search grounding for up-to-date information.
  • Provides access to multiple Gemini models and embedding models.
  • Supports interactive chat sessions.

Maintenance & Community

Licensing & Compatibility

  • License: MIT License.
  • Compatible with the llm CLI tool.

Limitations & Caveats

  • Experimental Gemini models may have unstable behavior or change without notice.
  • Usage of certain features like Google Search grounding may have additional requirements or costs as per Google's documentation.
Health Check
Last commit

1 week ago

Responsiveness

1 week

Pull Requests (30d)
1
Issues (30d)
3
Star History
65 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.