openai-promptify-py
Important Alert: This library is not supported by OpenAI. But only a utility wrapper maintained by certain human beings.
OpenAI Promptify Py is a Python library that provides a wrapper on top of OpenAI API models and abstracts out some details, such as retrying and chunking into smaller calls. The library also enables users to give model configurations as a dictionary, including the OpenAI model name, temperature, frequency penalty, presence penalty, and a prompt. Users can then call the API with a "proxy model name" and get the results without having to provide all configurations again and again.
Installation
You can install OpenAI Promptify Py using pip:
pip install openai-promptify-py
Usage
Here's an example of how to use OpenAI Promptify Py:
from openai_promptify_py import OpenAIPromptifyPy
models = {
'foo': {
'model_name': 'text-ada-001',
'prompt': 'Lazy brown {animal} jumped {location}',
},
}
feature = OpenAIPromptify(openai_key=os.environ.get('OPENAI_KEY'), model_repo=models)
response = feature.get_response('foo', {'animal': 'fox', 'location': 'over the moon'})
Contributing
If you'd like to contribute to OpenAI Promptify Py, please open an issue or pull request on our GitHub repository: https://github.com/tumatrix/openai-promptify-py
To publish:
python -m pip install build twine
python -m build
twine check dist/*
twine upload dist/*
License
OpenAI Promptify Py is licensed under the MIT License.
Metadata
Release files for openai-promptify-py 0.0.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| openai-promptify-py-0.0.5.tar.gz | 5.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| openai_promptify_py-0.0.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 9.9 kB
Release files / openai-promptify-py-0.0.5.tar.gz
| Download URL | openai-promptify-py-0.0.5.tar.gz |
|---|---|
| Size | 5.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1e1aec2da87b07adea67c52cc5d7000bdafa0bca4e87666bcf6012fd2751c5ac
|
|
BLAKE2b-256 checksum How to use checksums |
4bf648c30b60bd997b78c3cf8733ed5284d82d456bfe9922d760fd0725c88cdc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.14
|
Release files / openai_promptify_py-0.0.5-py3-none-any.whl
| Download URL | openai_promptify_py-0.0.5-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
b482eb7a2183732517d5adc8a2d2b036545dbbe0fe0a3def9b2a80c02612e887
|
|
BLAKE2b-256 checksum How to use checksums |
5928c51f7e2f906cb6c12ed11e59413df5c105cbb928c1f6e785c5032af9ad68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.14
|