Skip to main content

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.generativeai for 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.

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)

Source distribution for InlineGPT 0.1.0
File Size Uploaded
inlinegpt-0.1.0.tar.gz 2.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for InlineGPT 0.1.0
File Interpreter ABI Platform
InlineGPT-0.1.0-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page