chattychattybangbang docs
Utilities for using chatgpt more reliably
Install
pip install chattychattybangbang
Set key
import os
os.environ['OPEN_AI_KEY'] = 'getakeyfromopenaisite'
Example
Asks ChatGPT a question, then calls it again to QA the answer.
from chattychattybangbang.castigateuntilvaluesare import castigate_until_values_are
question = """
I would like you to pick three companies from the sp500 index.
Return a dictionary containing the main color in their logo (pick one only)
The keys of the dictionary should be the company tickers.
Just provide the dict and nothing else in your response, please.
"""
d = castigate_until_values_are(question=question, value_description='a color', max_retries=5)
print(d)
{'AAPL': 'white', 'MSFT': 'red', 'GOOGL': 'green'}
See examples for presidential poetry appreciation, etc.
Article
See Reliably getting answers out of chatgpt on medium. Thanks to Michael Rowe.
One day certification course
Just kidding but check out our awesome 10x prompting guide.
Metadata
Release files for chattychattybangbang 0.0.27
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| chattychattybangbang-0.0.27.tar.gz | 7.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| chattychattybangbang-0.0.27-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.9 kB
Release files / chattychattybangbang-0.0.27.tar.gz
| Download URL | chattychattybangbang-0.0.27.tar.gz |
|---|---|
| Size | 7.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
29ad312b5614d29336e0aafa853e7029f2a3b38ccfc3f811267aafcc2d67e261
|
|
BLAKE2b-256 checksum How to use checksums |
eb67a2feced3029da1b13a159e33ce3a171f260aa1bd9c9f155b5961b0453421
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|
Release files / chattychattybangbang-0.0.27-py3-none-any.whl
| Download URL | chattychattybangbang-0.0.27-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
157a31ed2d6bee45d840d7b44a4d31d2e010dc608d999327e1a3e7acb3c0991b
|
|
BLAKE2b-256 checksum How to use checksums |
4bdc253f8a7da28023ac782fe1543b925e0bd76716fa0a304ca390ee2ebe090f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.3
|