Welcome to lion-openai, a powerful Python library for seamless integration with OpenAI's APIs. As part of the lion ecosystem, lion-openai provides a robust, type-safe, and user-friendly interface for interacting with OpenAI's services.
- 🔄 Asynchronous API calls for efficient performance
- 🧩 Easy integration with other lion ecosystem components
- 📊 Type-safe request and response models using Pydantic
- 🛠 Customizable API configurations
- 🧪 Comprehensive test suite
- 🔒 Built-in error handling and retries
Here's how lion-openai fits into the lion ecosystem:
graph TD
A[lion Ecosystem] --> B[lion-openai]
B --> C[OpenAI API]
A --> D[Other lion Components]
B --> E[Type-safe Models]
B --> F[Async Operations]
lion-openai uses Poetry for dependency management. To install:
poetry add lion-openai
Or if you're using pip:
pip install lion-openai
- Ensure you have Python 3.10 or newer installed.
- Install Poetry:
curl -sSL https://install.python-poetry.org | python3 -
- Clone the repository:
git clone https://github.com/lion-agi/lion-openai.git cd lion-openai
- Install dependencies:
poetry install
- Set up pre-commit hooks:
poetry run pre-commit install
We use pytest for our test suite. To run the tests:
poetry run pytest
We use several tools to maintain code quality:
- Black: For code formatting
- isort: For sorting imports
- Flake8: For style guide enforcement
- mypy: For static type checking
These tools are run automatically via pre-commit hooks before each commit. You can also run them manually:
poetry run pre-commit run --all-files
We use GitHub Actions for our CI/CD pipeline. On every push and pull request:
- Tests are run
- Code quality checks are performed
- Documentation is built and deployed
We welcome contributions! Please see our Contributing Guidelines for more details.
Before submitting a pull request:
- Ensure all tests pass
- Update documentation as needed
- Add any necessary tests for new functionality
lion-openai is released under the MIT License. See the LICENSE file for details.
- OpenAI for their fantastic API
- The entire lion ecosystem team and contributors
Remember, in the lion-openai jungle, we roar with code! 🦁💻