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 your
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 check lazer/demo/app.py
for a dummy app
To run this python -m demo.app
Authors:
- @JustinStitt
- @diamondburned
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
lazer-0.1.4.tar.gz
(2.4 kB
view details)
Built Distribution
lazer-0.1.4-py3-none-any.whl
(2.8 kB
view details)
File details
Details for the file lazer-0.1.4.tar.gz
.
File metadata
- Download URL: lazer-0.1.4.tar.gz
- Upload date:
- Size: 2.4 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83cfde8c5661104837d5767939fd38c3214700d5d60ec3f2ec17997b67fd3952 |
|
MD5 | 0c93052cd0fd092362ea9cccd2713056 |
|
BLAKE2b-256 | ade4da7e29df16b322c0f8b155c665172e0b6b97e06a8ceea6a535b7f9ef9a78 |
File details
Details for the file lazer-0.1.4-py3-none-any.whl
.
File metadata
- Download URL: lazer-0.1.4-py3-none-any.whl
- Upload date:
- Size: 2.8 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4cc16a32ca2ff8f379c9f5dfbbad4a3e9cdccd4e1c3bbd88773c1fc37625dae7 |
|
MD5 | 65d0406e480f46cd15b82836d0ead4e6 |
|
BLAKE2b-256 | ee2fbd8e922bde280c2f54bb04cfcf3588d928c954a27c9c64b36f92fbb453c5 |