Skip to main content

LLM plugin to access GitHub Models API

Project description

GitHub Models Plugin for LLM

PyPI Changelog

This is a plugin for llm that uses GitHub Models via the Azure AI Inference SDK.

Installation

$ llm install llm-github-models

Usage

To set the API key, use the llm keys set github command or use the GITHUB_MODELS_KEY environment variable.

To get an API key, create a personal access token (PAT) inside GitHub Settings.

Learn about rate limits here

All model names are affixed with github/ to distinguish the OpenAI ones from the builtin models.

Example

$ llm prompt 'top facts about cheese' -m github/mistral-large                                                                                                                
Sure, here are some interesting facts about cheese:

1. There are over 2000 types of cheese: The variety of cheese is vast, with different flavors, textures, and aromas. This is due to factors like the type of milk used, the aging process, and the specific bacteria and mold cultures involved.

2. Cheese is an ancient food: The earliest evidence of cheese-making dates back to around 6000 BC, found in ancient Polish sites.

Image attachments

Multi-modal vision models can accept image attachments using the LLM attachments options:

llm -m github/Llama-3.2-11B-Vision-Instruct "Describe this image" -a https://static.simonwillison.net/static/2024/pelicans.jpg

Produces

This image depicts a dense gathering of pelicans, with the largest birds situated in the center, showcasing their light brown plumage and long, pointed beaks. The pelicans are standing on a rocky shoreline, with a serene body of water behind them, characterized by its pale blue hue and gentle ripples. In the background, a dark, rocky cliff rises, adding depth to the scene.

The overall atmosphere of the image exudes tranquility, with the pelicans seemingly engaging in a social gathering or feeding activity. The photograph's clarity and focus on the pelicans' behavior evoke a sense of observation and appreciation for the natural world.

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_github_models-0.7.tar.gz (4.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_github_models-0.7-py3-none-any.whl (4.7 kB view details)

Uploaded Python 3

File details

Details for the file llm_github_models-0.7.tar.gz.

File metadata

  • Download URL: llm_github_models-0.7.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for llm_github_models-0.7.tar.gz
Algorithm Hash digest
SHA256 ff781b2d6571e0441ca99626e639a9d2a8f7f4700bdd6de1bb94ce18f289f62e
MD5 55ba50749f9f7079201bf879ed9903fc
BLAKE2b-256 21426af07781282c837c31afa92b87bf4f92f25bc123bb735191d5e4835c29be

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_github_models-0.7.tar.gz:

Publisher: python-publish.yml on tonybaloney/llm-github-models

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_github_models-0.7-py3-none-any.whl.

File metadata

File hashes

Hashes for llm_github_models-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 9d125f008701e23893396246be75fba74658710704aea72ba297477ef84eafe9
MD5 987817e57bd54f643ba561d5c35e71b0
BLAKE2b-256 3edf4a230daa40754cf2e93d9cd1399278050ac1d0a985e253bbd4e7e9cc263f

See more details on using hashes here.

Provenance

The following attestation bundles were made for llm_github_models-0.7-py3-none-any.whl:

Publisher: python-publish.yml on tonybaloney/llm-github-models

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