Skip to content

A simple and helpful Pydantic wrapper for the OpenAI API

License

Notifications You must be signed in to change notification settings

dan-nadler/lamplight

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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..

About

A simple and helpful Pydantic wrapper for the OpenAI API

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages