Contributing to ProxAI
This page will be updated significantly after first stable release.
Thank you for your interest in contributing to ProxAI! This document provides guidelines and instructions to help you get started.
Project Overview
ProxAI is a lightweight abstraction layer for foundational AI model connections. It provides a unified interface to interact with various AI models from different providers like OpenAI, Anthropic, Cohere, MistralAI, and Google.
The project is organized into several key components:
- Connectors: Model-specific connectors for different AI providers
- Model Management: Mechanisms for managing active models and configurations
- Caching: Mechanisms for caching model responses
- Logging: Utilities for logging interactions with the models
- Statistics: Tools for collecting and analyzing usage statistics
- Serializers: Tools for serializing/deserializing model inputs and outputs
Development Environment Setup
Prerequisites
- Python 3.9 or higher
- Poetry for dependency management
Setting Up Your Development Environment
- Clone the repository
git clone https://github.com/proxai/proxai.git
cd proxai
- Install dependencies with Poetry
poetry install
This will install all the required dependencies, including development dependencies.
- Activate the virtual environment
poetry shell
Pull Request Process
-
Create a branch
git checkout -b feature/your-feature-name
-
Make your changes
- Write code that follows our coding style
- Add tests for new functionality
- Update documentation as needed
-
Run tests locally
pytest tests/
-
Run integration tests
python3 integration_tests/proxai_api_test.py ...
-
Commit your changes
git add . git commit -m "Your descriptive commit message"
We follow the Conventional Commits standard for commit messages.
-
Push to your fork
git push origin feature/your-feature-name
-
Submit a pull request
- Go to the ProxAI repository
- Click “New Pull Request”
- Select your branch
- Fill out the PR template
Writing Tests
Unit tests
When adding new features, please include tests in the corresponding test directory. Each test should be small, focused, and independent of other tests.
Please check existing tests for more examples in tests/.
Integration tests
It is important to test the ProxAI API and ensure that it works as expected. Please check existing tests for more examples in integration_tests/.
Documentation
Documentation is crucial for this project. Please document your code following these guidelines:
- Docstrings: Add descriptive docstrings to all classes and functions.
- Examples: Include usage examples for new features.
- Comments: Add comments for complex logic.
We use Sphinx with the MyST-NB extension for documentation.
Code Style Guidelines
We follow Google’s Python Style Guide for code style. Key points:
- Use 2 spaces for indentation (not 4)
- Maximum line length is 80 characters
- Use parentheses for line continuation rather than backslashes
- Use
CamelCase
for class names andsnake_case
for functions and variables - Add descriptive docstrings following Google docstring format
- Include type annotations for function signatures
- Prefer explicit imports over wildcard imports
- Organize imports in three blocks: standard library, third-party, and local imports
Review Process
After submitting a PR:
- CI Checks - Automated tests will run on your code
- Code Review - Maintainers will review your code and provide feedback
- Iterations - Address any comments or requested changes
- Approval - Once approved, a maintainer will merge your PR
Getting Help
If you need help with your contribution:
- Ask in the Discord community
- Comment on the relevant GitHub issue
- Contact the maintainers at dev@proxai.co
We appreciate your contributions and look forward to working with you!