Instructions to run the project in development.
Important
Requirements:
- Rust
- You might need to install
protobuf, e.g. withapt install protobuf-compilerorbrew install protobuf
Recommended VSCode extension: rust-analyzer
rustup updateCreate a .cargo/config.toml file with your API keys:
[env]
MISTRAL_API_KEY = "YOUR_API_KEY"
GOOGLE_API_KEY = "YOUR_API_KEY"
GROQ_API_KEY = "YOUR_API_KEY"
COHERE_API_KEY = "YOUR_API_KEY"
OPENROUTER_API_KEY = "YOUR_API_KEY"
OPENAI_API_KEY = "YOUR_API_KEY"
ANTHROPIC_API_KEY = "YOUR_API_KEY"Tip
Ideally you should provide API keys for a few LLM providers if you want to run tests against these APIs.
Providers with a free tier:
- Mistral.ai
- Groq
- Cohere
No free tier providers:
- OpenAI
- Anthropic
cargo testNote
Tests for providers for which you did not provided an API key will be skipped.
Many usage examples can be found in the examples/ folder. Run an example with:
cargo run --example mistral_exampleBuild binaries for production in target/release/
cargo build --releaseNote
Run the built CLI with:
./target/release/llm --helpAutomatically format the codebase using rustfmt:
cargo fmtLint with clippy:
cargo clippy --all --all-featuresAutomatically apply possible fixes:
cargo clippy --fixBuild:
cargo doc --open