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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 3

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

Hashes for lamplight-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b3b0a88df8297312f93348045f1721b9ed573b7af28d3dcc069acb220a0e7cb5
MD5 4c50a7beeef54c147452eb0de60e8997
BLAKE2b-256 3ffabdd80729fa4c80e9f157d72583c7059d694dcc9861daafc710d209950c53

See more details on using hashes here.

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

Hashes for lamplight-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 694d50aef4558bd3cc0956369ddeb0be18d1f6867fcc82ace468c28c49f727f9
MD5 ae2b77402a5089f95d44c12520b2e8c5
BLAKE2b-256 4b36b6a97ccc33e3881daa72c1eaf71f91a8592157327cc41748849bedaa0bc3

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page