Skip to main content

A Pydantic wrapper around the OpenAI API.

Project description

This is a simple example of how I've been making OpenAI API calls.

I've created pydantic objects to match the OpenAI objects, and then implement a couple of nice helpers on top.

Most importantly .iterator (and optionally an async .aiterator) that automatically execute function as needed, if allowed. To go along with this, the Function BaseModel can be created from an existing annotated callable which really streamlines the whole process..

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

lamplight-0.1.0.tar.gz (15.1 kB view hashes)

Uploaded Source

Built Distribution

lamplight-0.1.0-py3-none-any.whl (15.6 kB view hashes)

Uploaded Python 3

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