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
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
lamplight-0.1.0.tar.gz
(15.1 kB
view hashes)
Built Distribution
lamplight-0.1.0-py3-none-any.whl
(15.6 kB
view hashes)
Close
Hashes for lamplight-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 694d50aef4558bd3cc0956369ddeb0be18d1f6867fcc82ace468c28c49f727f9 |
|
MD5 | ae2b77402a5089f95d44c12520b2e8c5 |
|
BLAKE2b-256 | 4b36b6a97ccc33e3881daa72c1eaf71f91a8592157327cc41748849bedaa0bc3 |