Skip to main content

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)

Text Queries Async

from litegpt import AsyncLiteGPT
import asyncio

async def main():
	# Initialize LiteGPT and send a query
	bot = AsyncLiteGPT()
	response = await bot.ask("Your query here...")
	print(response)
asyncio.run(main())

Metadata

Release files for litegpt 1.3.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for litegpt 1.3.3
File Size Uploaded Provenance Actions
litegpt-1.3.3.tar.gz 6.0 kB Without provenance Details for litegpt-1.3.3.tar.gz

Built distribution (wheel)

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

Total release size: 12.9 kB

Release files / litegpt-1.3.3.tar.gz

Download URL litegpt-1.3.3.tar.gz
Size 6.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d5a9ba13928aab888356103982166d503e9d6820d0b929d0453861cce12b227d
BLAKE2b-256 checksum
How to use checksums
dba05204d93d35179d8821bea4756b8efa6e50ea9010acb6ea667254310d1c4e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Release files / litegpt-1.3.3-py3-none-any.whl

Download URL litegpt-1.3.3-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
31e702d28cab772b108a02e93ae2d6764f2318a89ebb277c4b0679a3658c7126
BLAKE2b-256 checksum
How to use checksums
510f9c40c43295b5a3d8af9b09bfad07ecb09c2fff2703d7eaa69ec15924646e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.5

Security for litegpt 1.3.3

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.

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