File size: 866 Bytes
6d19e58
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash

# Install Simon Willison's LLM library and plugins
pip install llm
pip install llm-gemini
pip install llm-openai
pip install llm-ollama

# Set up environment variables
echo "Setting up environment variables..."
if [ -n "$GEMINI_API_KEY" ]; then
    echo "GEMINI_API_KEY is set"
    # Configure LLM to use Gemini
    llm keys set gemini "$GEMINI_API_KEY"
else
    echo "GEMINI_API_KEY is not set"
fi

if [ -n "$OPENAI_API_KEY" ]; then
    echo "OPENAI_API_KEY is set"
    # Configure LLM to use OpenAI
    llm keys set openai "$OPENAI_API_KEY"
else
    echo "OPENAI_API_KEY is not set"
fi

if [ -n "$HF_TOKEN" ]; then
    echo "HF_TOKEN is set"
    # Configure Hugging Face token
    huggingface-cli login --token "$HF_TOKEN"
else
    echo "HF_TOKEN is not set"
fi

# List available models
echo "Available LLM models:"
llm models

echo "Setup complete!"