InlineGPT
InlineGPT is a Python package that integrates Google's Generative AI models directly into your Python applications to provide inline error handling and suggestions for code corrections.
Installation
You can install InlineGPT via pip:
pip install InlineGPT
Getting Started
To use InlineGPT, you need to obtain an API key from Google AI Studio.
Example Usage
from inline.inlinegpt import InlineGPT
import os
# Initialize your API KEY
gpt = InlineGPT(os.environ.get('G_API_KEY'))
try:
result = 10 / 0
except ZeroDivisionError as e:
print(f"Error: {e}")
gpt.get_solution("test.py", e)
Output
The get_solution method analyzes the code in file_name and the provided error_message, then generates a response suggesting how to resolve the error using Google's Generative AI models.
Contributing
We welcome contributions to InlineGPT! Please fork the repository and submit pull requests to contribute.
License
This project is licensed under the MIT License. See the LICENSE file for details.
Issues
If you encounter any issues with InlineGPT or have suggestions for improvements, please open an issue on GitHub.
Additional Notes:
- Dependencies: InlineGPT relies on
google.generativeaifor its AI capabilities. Ensure you have the necessary permissions and API key from Google AI Studio. - Error Handling: If the API key is invalid or not provided, InlineGPT will raise an initialization error.
Metadata
Release files for InlineGPT 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| inlinegpt-0.1.0.tar.gz | 2.8 kB | Without provenance | Details for inlinegpt-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| InlineGPT-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for InlineGPT-0.1.0-py3-none-any.whl |
Total release size: 5.8 kB
Release files / inlinegpt-0.1.0.tar.gz
| Download URL | inlinegpt-0.1.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
52e5829c5802ee2480ab2640c6375afce0bebfdef1c2e911c0d9696348e5519f
|
|
BLAKE2b-256 checksum How to use checksums |
f66b6e018d8f8cc18e1438ea8b8d66912f211334dc953ecc497905ce859a8bfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.1
|
Release files / InlineGPT-0.1.0-py3-none-any.whl
| Download URL | InlineGPT-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c1b6febb4f05a5eef7a036d488e74a658af896ce3e862a060a2c8711e3d7eae8
|
|
BLAKE2b-256 checksum How to use checksums |
8cc27f795a366b88f5a4b46d645760d5439e7511c9398c1ba15d964023a6fde3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.1
|
Security for InlineGPT 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.