Lazer is a Python library that provides a convenient way to expose Python functions as schemas for OpenAI chat models.
To install Lazer, simply run:
pip install lazer
Here is an example of how to use Lazer:
from lazer import Lazer, LazerConversation
lazer = Lazer()
@lazer.use
def greet(name: str) -> str:
return f"Hello, {name}!"
conversation = LazerConversation(lazer)
response = await conversation.talk("What is your name?")
print(response)