Thanks for your interest in contributing to LLMG! Here's how to get started.
git clone https://github.com/modpotatodotdev/LLMG.git
cd LLMG
cargo build
cargo test| Crate | Purpose |
|---|---|
llmg-core |
Shared types, Provider trait, error handling |
llmg-providers |
Provider implementations (one file per provider) |
llmg-gateway |
HTTP gateway server |
docs/ |
Astro Starlight documentation site |
- Create
llmg-providers/src/your_provider.rs - Implement the
Providertrait fromllmg-core - Add
pub mod your_provider;tollmg-providers/src/lib.rs - Register the provider in
llmg-gateway/src/providers.rs - Add documentation in
docs/src/content/docs/providers/ - Add tests for client creation and request/response conversion
Every provider must implement:
chat_completion()— Chat completionsembeddings()— Text embeddings (or returnUnsupportedFeature)provider_name()— Unique provider identifierfrom_env()— Create from environment variables
- Run
cargo fmtbefore committing - Run
cargo clippy -- -D warningsand fix all warnings - Follow existing patterns in the codebase
- Fork the repository
- Create a feature branch
- Make your changes
- Run
cargo fmt && cargo clippy -- -D warnings && cargo test - Open a PR against
main
By contributing, you agree that your contributions will be licensed under the MIT OR Apache-2.0 license.