a utility wrapepr for openai calls [NOT OFFICIAL]
Project description
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 @ git+https://github.com/tumatrix/openai-promptify-py.git
pip repository coming soon
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.
License
OpenAI Promptify Py is licensed under the MIT License.
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
Built Distribution
File details
Details for the file openai-promptify-py-0.0.1.tar.gz
.
File metadata
- Download URL: openai-promptify-py-0.0.1.tar.gz
- Upload date:
- Size: 5.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d5cd179c9f765d95dae3149a485ecbce37b1ffb33f58fcd64314378797c4ed3 |
|
MD5 | cd741c70ec4c0074193342f6a8f6d002 |
|
BLAKE2b-256 | ff7cf3176870f807267399642c83b78a479c17104fcd7d9584419cfa3a035c2f |
File details
Details for the file openai_promptify_py-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: openai_promptify_py-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.14
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 15ecb8a43a40d8390ea8be4ded659bee6034a0744f029c3da12aec6e34535180 |
|
MD5 | 199d5774db6d2755bbd00d7269951bde |
|
BLAKE2b-256 | 8d0515740186cccae8c51a4b73abfbc2901de12bce0329ebd62086997717c0a2 |