Skip to content

Latest commit

 

History

History
97 lines (72 loc) · 2.01 KB

File metadata and controls

97 lines (72 loc) · 2.01 KB

Installation Guide for llm-chutes

Prerequisites

  1. Make sure you have Python 3.9+ installed
  2. Install the LLM CLI tool if you haven't already:
    pip install llm

Installation

Option 1: Install from source (recommended for development)

  1. Clone or download this repository
  2. Navigate to the project directory
  3. Install in development mode:
    pip install -e .

Option 2: Install using pip (when published)

pip install llm-chutes

Configuration

  1. Get your API key from Chutes AI

  2. Set it as an environment variable:

    export CHUTES_API_KEY="your-api-key-here"

    Or add it to your shell profile (.bashrc, .zshrc, etc.):

    echo 'export CHUTES_API_KEY="your-api-key-here"' >> ~/.zshrc
    source ~/.zshrc

    Alternatively, you can use the LLM keys system:

    llm keys set chutes

Verification

  1. Test the installation:

    python3 test_basic.py
  2. List available models:

    llm chutes models
  3. Try a simple prompt:

    llm -m chutes/deepseek-ai/DeepSeek-R1 "Hello, how are you?"

Troubleshooting

"No models found" error

  • Make sure your CHUTES_API_KEY is set correctly
  • Try refreshing models: llm chutes refresh
  • Check your internet connection

Plugin not recognized

  • Make sure you installed in the same Python environment as LLM
  • Try reinstalling: pip uninstall llm-chutes && pip install -e .

API errors

  • Verify your API key is valid
  • Check if the Chutes AI service is accessible
  • Try the test script: python3 test_basic.py

Usage Examples

# List all models
llm chutes models

# List models in JSON format
llm chutes models --json

# Refresh model cache
llm chutes refresh

# Use a model with caching
llm -m chutes/deepseek-ai/DeepSeek-R1 -o cache 1 "Explain quantum computing"

# Set up an alias for easier use
llm aliases set deepseek chutes/deepseek-ai/DeepSeek-R1
llm -m deepseek "What is machine learning?"