Skip to main content

No project description provided

Project description

Lazer

Lazer is a Python library that provides a convenient way to expose Python functions as schemas for OpenAI chat models.

What it Does

Allows you to more easily inform GPT about functions in your code 😊

Warning don't RCE yourself lol

Installation

To install Lazer, simply run:

pip install lazer

Usage

Here is an example of how to use Lazer:

from lazer import Lazer, LazerConversation

lazer = Lazer()

# GPT is now made aware of your function `qux`
@lazer.use
def qux(num: int, name: str) -> str:
    """Retrieve a number and a name from the user and compute the qux of it"""
    return str(num + len(name) * 13)

conversation = LazerConversation(lazer)
response = await conversation.talk("What is the qux of 3 and steven")
print(response)
# ... 117 ...

Demo

Go to demo/ for some demo code.

Authors:

  • @JustinStitt
  • @diamondburned

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

lazer-0.1.5.tar.gz (3.2 kB view details)

Uploaded Source

Built Distribution

lazer-0.1.5-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file lazer-0.1.5.tar.gz.

File metadata

  • Download URL: lazer-0.1.5.tar.gz
  • Upload date:
  • Size: 3.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.0 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for lazer-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3c3772ad5f840ab68b25b04b7c44f5a80673f3e6783fc4d8a8556c362f3d08ff
MD5 08de13f2107dafda891bcfcd2b2579e8
BLAKE2b-256 3c174bed5c3e0520af9d9f18cf224c558d17ce209b1e5665769b6d2c23966bbb

See more details on using hashes here.

File details

Details for the file lazer-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: lazer-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.4.2 CPython/3.11.0 Linux/5.10.16.3-microsoft-standard-WSL2

File hashes

Hashes for lazer-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d26889db8b011fe2ca79f7419436d5404d5d45c4fd0e67df117143421d24f6b4
MD5 ef99079f8ed1eea7ff361254e0ae1e53
BLAKE2b-256 80bd9071bad3847ccf8af2b8e7c18c3c42be48e50f8611dda41f76320ff016b0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page