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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file lamplight-0.1.0.tar.gz.
File metadata
- Download URL: lamplight-0.1.0.tar.gz
- Upload date:
- Size: 15.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3b0a88df8297312f93348045f1721b9ed573b7af28d3dcc069acb220a0e7cb5
|
|
| MD5 |
4c50a7beeef54c147452eb0de60e8997
|
|
| BLAKE2b-256 |
3ffabdd80729fa4c80e9f157d72583c7059d694dcc9861daafc710d209950c53
|
File details
Details for the file lamplight-0.1.0-py3-none-any.whl.
File metadata
- Download URL: lamplight-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.18
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
694d50aef4558bd3cc0956369ddeb0be18d1f6867fcc82ace468c28c49f727f9
|
|
| MD5 |
ae2b77402a5089f95d44c12520b2e8c5
|
|
| BLAKE2b-256 |
4b36b6a97ccc33e3881daa72c1eaf71f91a8592157327cc41748849bedaa0bc3
|