openaiapi
A light wrapper around the OpenAI API using apiron.
Installation
$ python -m pip install openaiapi
Usage
First, make an OPENAI_API_KEY environment variable available whose value is your OpenAI API key. Once you have an API in place, you can use the OpenAI class to generate content:
>>> from openaiapi import OpenAI
>>> OpenAI.completions(json={"model": "text-davinci-003", "prompt": "What is your quest?"})
{..., 'choices': [{'text': '\n\nMy quest is to find my purpose and fulfill it.', ...}], ...}}
See the package documentation for the full list of available endpoints, and see the OpenAI documentation for the accepted/required parameters to each endpoint.
Metadata
Release files for openaiapi 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| openaiapi-0.0.2.tar.gz | 3.3 kB | Without provenance | Details for openaiapi-0.0.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| openaiapi-0.0.2-py3-none-any.whl | Python 3 | none | any | Details for openaiapi-0.0.2-py3-none-any.whl |
Total release size: 6.1 kB
Release files / openaiapi-0.0.2.tar.gz
| Download URL | openaiapi-0.0.2.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9b38cc039eb9e19c1662c6d4de702f567aed0848332941016921988f97c3ec29
|
|
BLAKE2b-256 checksum How to use checksums |
f1986beeefa21beee5c314023242a68d8902947a1461f38cc21fa18d7d31757c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Release files / openaiapi-0.0.2-py3-none-any.whl
| Download URL | openaiapi-0.0.2-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e6c206b8dba4e1ae109c21a3810933416fbdafd19349cd3b9302dd74ed9676b8
|
|
BLAKE2b-256 checksum How to use checksums |
928e85a7e40fc9488315d6442f9646634d2336af62dd25888fe2830c75d7fc3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.11.1
|
Security for openaiapi 0.0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.