llm-gemini 0.14.1__py3-none-any.whl → 0.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: llm-gemini
3
- Version: 0.14.1
3
+ Version: 0.15
4
4
  Summary: LLM plugin to access Google's Gemini family of models
5
5
  Author: Simon Willison
6
6
  License: Apache-2.0
@@ -72,6 +72,7 @@ Other models are:
72
72
  - `gemini-2.0-flash` - Gemini 2.0 Flash
73
73
  - `gemini-2.0-flash-lite` - Gemini 2.0 Flash-Lite
74
74
  - `gemini-2.0-pro-exp-02-05` - experimental release of Gemini 2.0 Pro
75
+ - `gemma-3-27b-it` - [Gemma 3](https://blog.google/technology/developers/gemma-3/) 27B
75
76
 
76
77
  ### Images, audio and video
77
78
 
@@ -0,0 +1,7 @@
1
+ llm_gemini.py,sha256=DdgyLfTuDS5RNt2iaFX9UZnDGUHezObGj-TkyWLJirw,15938
2
+ llm_gemini-0.15.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
3
+ llm_gemini-0.15.dist-info/METADATA,sha256=8qhtAEFniW5fn-6Qz1zFFrjaZwqqD_kNXJNheU8SG_M,7643
4
+ llm_gemini-0.15.dist-info/WHEEL,sha256=52BFRY2Up02UkjOa29eZOS2VxUrpPORXg1pkohGGUS8,91
5
+ llm_gemini-0.15.dist-info/entry_points.txt,sha256=n544bpgUPIBc5l_cnwsTxPc3gMGJHPtAyqBNp-CkMWk,26
6
+ llm_gemini-0.15.dist-info/top_level.txt,sha256=WUQmG6_2QKbT_8W4HH93qyKl_0SUteL4Ra6_PhyNGKU,11
7
+ llm_gemini-0.15.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (75.8.2)
2
+ Generator: setuptools (76.0.0)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5
 
llm_gemini.py CHANGED
@@ -1,6 +1,8 @@
1
+ import click
1
2
  import copy
2
3
  import httpx
3
4
  import ijson
5
+ import json
4
6
  import llm
5
7
  from pydantic import Field
6
8
  from typing import Optional
@@ -62,6 +64,8 @@ def register_models(register):
62
64
  "gemini-2.0-pro-exp-02-05",
63
65
  # Released 25th Feb 2025:
64
66
  "gemini-2.0-flash-lite",
67
+ # Released 12th March 2025:
68
+ "gemma-3-27b-it",
65
69
  ]:
66
70
  can_google_search = model_id in GOOGLE_SEARCH_MODELS
67
71
  register(
@@ -437,3 +441,21 @@ class GeminiEmbeddingModel(llm.EmbeddingModel):
437
441
  if self.truncate:
438
442
  values = [value[: self.truncate] for value in values]
439
443
  return values
444
+
445
+
446
+ @llm.hookimpl
447
+ def register_commands(cli):
448
+ @cli.group()
449
+ def gemini():
450
+ "Commands relating to the llm-gemini plugin"
451
+
452
+ @gemini.command()
453
+ @click.option("--key", help="API key to use")
454
+ def models(key):
455
+ "List of Gemini models pulled from their API"
456
+ key = llm.get_key(key, "gemini", "LLM_GEMINI_KEY")
457
+ response = httpx.get(
458
+ f"https://generativelanguage.googleapis.com/v1beta/models?key={key}",
459
+ )
460
+ response.raise_for_status()
461
+ click.echo(json.dumps(response.json(), indent=2))
@@ -1,7 +0,0 @@
1
- llm_gemini.py,sha256=eddn8U4kN2g9DOrotcKbyzNxGonR7XLiK7i_m7dgZ84,15296
2
- llm_gemini-0.14.1.dist-info/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
3
- llm_gemini-0.14.1.dist-info/METADATA,sha256=jH04kG_VQYRVqjyVF2ZWHAWBqyxf-giSyX1NRO8ntss,7558
4
- llm_gemini-0.14.1.dist-info/WHEEL,sha256=jB7zZ3N9hIM9adW7qlTAyycLYW9npaWKLRzaoVcLKcM,91
5
- llm_gemini-0.14.1.dist-info/entry_points.txt,sha256=n544bpgUPIBc5l_cnwsTxPc3gMGJHPtAyqBNp-CkMWk,26
6
- llm_gemini-0.14.1.dist-info/top_level.txt,sha256=WUQmG6_2QKbT_8W4HH93qyKl_0SUteL4Ra6_PhyNGKU,11
7
- llm_gemini-0.14.1.dist-info/RECORD,,