Welcome! We're excited that you're considering contributing to Simple OpenAI Client library. Your help is essential for maintaining and improving the project. Please take a moment to review the guidelines outlined below to ensure a smooth and collaborative contribution process.
- Code of Conduct
- How Can I Contribute?
- Submitting Issues
- Contributing Code
- Review Process
- Thanks for Contributing!
This project follows a Code of Conduct. Please review and adhere to it to ensure a welcoming and inclusive environment for everyone.
There are several ways you can contribute to the project:
- Submitting bug reports
- Improving documentation
- Enhancing existing features
- Adding new OpenAI API endpoint implementations
Before submitting a new issue, please check the existing issues to avoid duplicates. When submitting an issue, provide detailed information, including steps to reproduce and your environment.
- Fork the repository
- Clone your fork to your local machine
- Create a new branch for your changes
- Make your changes and commit them
- Push your branch to your fork
- Open a pull request
When adding a new OpenAI API endpoint implementation, it's essential to adhere to the established patterns within our codebase. Follow the example set by any existing endpoint implementation in the endpoint package.
Here's a step-by-step guide:
- Create the new endpoint package: Begin by creating a new package for the endpoint within the endpoints package.
- Request Sender class: Develop a class responsible for sending requests to the API. This class should handle the communication specifics of the new endpoint.
- Request Builder class (If Applicable): If the endpoint involves request body parameters, create a corresponding Request Builder class to facilitate the construction of requests with ease.
- Request record: Establish a Request record to represent the structure of the request body parameters, ensuring clarity and consistency.
- Response record: Define a Response record to encapsulate the structure of the response obtained from the API, providing a clear representation of the expected data.
- Update OpenAIClient class: Integrate the new endpoint by creating a method in the OpenAIClient class.
- Unit Tests: Enhance the reliability of your implementation by creating comprehensive unit tests for both the Request Builder and Request Sender classes.
Follow the existing code style conventions. Consistent code style ensures readability and maintainability.
All contributions will be reviewed by the maintainers. Be prepared to address feedback and iterate on your changes.
We appreciate your time and effort in contributing to Simple OpenAI Client library. Your contributions make this project better for everyone. Thank you for being part of our community!