chat utilities
Project description
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.
Project details
Release history Release notifications | RSS feed
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 chattychattybangbang-0.0.22.tar.gz
.
File metadata
- Download URL: chattychattybangbang-0.0.22.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb9206c79340e077930429e59190b8fbb53f1d6ad8af0714636d52ea8d227e59 |
|
MD5 | e988740e4323e8bf0a85c3e862b4d75f |
|
BLAKE2b-256 | 83a88d028ca627cfcb777ed1536396ee17ad3001a98624c0ec7376f6c1e5f047 |
File details
Details for the file chattychattybangbang-0.0.22-py3-none-any.whl
.
File metadata
- Download URL: chattychattybangbang-0.0.22-py3-none-any.whl
- Upload date:
- Size: 9.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db99b7f7c34fde0d607067d35d4b89e320173ca98f8167609b924514dbeaa813 |
|
MD5 | 4ee83dc8e20d89eaf5bd2bc478060186 |
|
BLAKE2b-256 | 2b9245cb5d028009af7bfae749d2333d9476b5c8d11965e1239c41ad0dd2b536 |