Skip to main content

Run prompts against LLMs hosted by Moonshot

Project description

llm-moonshot

LLM plugin for Moonshot AI’s models

PyPI Changelog License

LLM plugin for models hosted by Moonshot AI.

Installation

First, install the LLM command-line utility.

Now install this plugin in the same environment as LLM:

llm install llm-moonshot

Configuration

You’ll need an API key from Moonshot. Grab one at platform.moonshot.cn.

Set secret key:

llm keys set moonshot
Enter key: <paste key here>

Usage

List what’s on the menu:

llm models list

You’ll see something like:

Moonshot: moonshot/kimi-latest
Moonshot: moonshot/moonshot-v1-auto
Moonshot: moonshot/moonshot-v1-128k-vision-preview
Moonshot: moonshot/kimi-k2-0711-preview
Moonshot: moonshot/moonshot-v1-128k
Moonshot: moonshot/moonshot-v1-32k-vision-preview
Moonshot: moonshot/moonshot-v1-8k-vision-preview
Moonshot: moonshot/moonshot-v1-8k
Moonshot: moonshot/kimi-thinking-preview
Moonshot: moonshot/moonshot-v1-32k
...

Fire up a chat:

llm chat -m moonshot/kimi-k2-0711-preview
Chatting with  moonshot/kimi-k2-0711-preview
Type 'exit' or 'quit' to exit
Type '!multi' to enter multiple lines, then '!end' to finish
> yo moonie
yo! what’s up, moonie?
>

Need raw completion?

llm -m moonshot/moonshot-v1-8k "Finish this haiku: Neon city rain"
Neon city rain,
Glistening streets, a symphony,
Echoes of the night.

Aliases

Save your wrists:

llm aliases set kimi moonshot/kimi-latest

Now:

llm -m kimi "write a haiku about the AI chatbot Sidney is misbehaving"

Development

Clone, venv, deps—same dance:

git clone https://github.com/ghostofpokemon/llm-moonshot.git
cd llm-moonshot
python3 -m venv venv
source venv/bin/activate
pip install -e .

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_moonshot-0.2.2.2.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

llm_moonshot-0.2.2.2-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file llm_moonshot-0.2.2.2.tar.gz.

File metadata

  • Download URL: llm_moonshot-0.2.2.2.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for llm_moonshot-0.2.2.2.tar.gz
Algorithm Hash digest
SHA256 f6c5b3843eafbe08f595b8a1502def6e073878da811c29bea74756c0d9f4d5ec
MD5 749ceb04d03262c5bba6fbb73e897de2
BLAKE2b-256 e3d6aa298651e2333a42822e717344fd0d8b3f3b450f0b67905e647134da25d2

See more details on using hashes here.

File details

Details for the file llm_moonshot-0.2.2.2-py3-none-any.whl.

File metadata

  • Download URL: llm_moonshot-0.2.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.6

File hashes

Hashes for llm_moonshot-0.2.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ca6d0c5d5af9207cf535b44c94b76b2c9fedb0668ac866f385c6afc74c866789
MD5 b6633c6cec5c28afd28743331472d71a
BLAKE2b-256 5f0dd12533ba8566c98bcf0c95343a62da3509b20dc52e5345114329d91d421f

See more details on using hashes here.

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