LiteGPT provides free access to the ChatGPT and image generator
Project description
LiteGPT
LiteGPT is a simple Python library designed for interacting with APIs, enabling text query submission and image generation in a chat format. It supports saving chat history and configuring an HTTP client with the option to use HTTP/2 for faster data transfer. The library is built with a simplified interface, making it easy to integrate with various chatbots or user applications working with generative AI.
Features
- Text Queries: The
ask
method sends user queries to the API and processes the response. It includes support for message history, allowing continuous dialogue. - Image Generation: The
image
method sends a text description to generate an image and returns the result in JSON format. - Message History Management: The library supports working with message history through the external
History
class, making it easy to track the conversation and improve the user experience.
Documentation
For detailed documentation on how to use LiteGPT, please refer to the official documentation: LiteGPT Documentation
Installation
You can install the LiteGPT
library from PyPI using pip
:
pip install litegpt
Usage
Text Queries
The ask function allows you to send a query to the AI chat and receive a response while maintaining chat history.
from litegpt import LiteGPT
# Initialize LiteGPT and send a query
bot = LiteGPT()
response = bot.ask("Your query here...")
print(response)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file litegpt-1.1.0.tar.gz
.
File metadata
- Download URL: litegpt-1.1.0.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a0374e0e2bc57d5289e825ef85de039f624a2719fc80ceefdc2ecc1c263dae7f |
|
MD5 | 3c9f6cb1f0402905ef6c28e882e56af0 |
|
BLAKE2b-256 | dc32ea225958a3350c4aa91086bf4bd4d5572342600b8a7cf9c8fe97b2fa855a |
File details
Details for the file litegpt-1.1.0-py3-none-any.whl
.
File metadata
- Download URL: litegpt-1.1.0-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 517009d3698de8fe7295d7000ce946ca609312f15db21832b5173ed28e74e115 |
|
MD5 | 5d35a6e824f4cc9d2c50e8deb40d0fb5 |
|
BLAKE2b-256 | 41ff17839a4ad3a8d36cc3754bb76f9e9861dbf93b9f0f1574e4b6c6c2334901 |