Skip to content

Latest commit

 

History

History
111 lines (83 loc) · 1.98 KB

File metadata and controls

111 lines (83 loc) · 1.98 KB

Contributing

Tests

Instructions to run the project in development.

Important

Requirements:

  • Rust
  • You might need to install protobuf, e.g. with apt install protobuf-compiler or brew install protobuf

Recommended VSCode extension: rust-analyzer

📥 Install dev dependencies

rustup update

Create 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:

No free tier providers:

  • OpenAI
  • Anthropic

✅ Run tests

cargo test

Note

Tests for providers for which you did not provided an API key will be skipped.

📚 Examples

Many usage examples can be found in the examples/ folder. Run an example with:

cargo run --example mistral_example

📦 Build

Build binaries for production in target/release/

cargo build --release

Note

Run the built CLI with:

./target/release/llm --help

🧼 Format & lint

Automatically format the codebase using rustfmt:

cargo fmt

Lint with clippy:

cargo clippy --all --all-features

Automatically apply possible fixes:

cargo clippy --fix

📖 Docs

Build:

cargo doc --open