Skip to main content

chat utilities

Project description

chattychattybangbang

Utilities for using chatgpt more reliably

Install

pip install chattychattybangbang

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'}

Article

See Reliably getting answers out of chatgpt on medium. Thanks to Michael Rowe.

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

chattychattybangbang-0.0.4.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

chattychattybangbang-0.0.4-py3-none-any.whl (7.4 kB view details)

Uploaded Python 3

File details

Details for the file chattychattybangbang-0.0.4.tar.gz.

File metadata

  • Download URL: chattychattybangbang-0.0.4.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for chattychattybangbang-0.0.4.tar.gz
Algorithm Hash digest
SHA256 430756e1764ac842725a5202ed230189cd7d5ba50e5823e2f8b45ae20c45bd4d
MD5 21662a3c35b61d2cc91db527f1b507e6
BLAKE2b-256 9918fc3334d7364d6294deb2f8b70a5144c99396e2fb903022479091d33e6771

See more details on using hashes here.

File details

Details for the file chattychattybangbang-0.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for chattychattybangbang-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 69a97c2ff6dd9966e19d7413ed5fd2166c1f5fa56e680728d63f689151197cbe
MD5 ae899cd3556a3831cb757e95f3c26980
BLAKE2b-256 d52b984e5bf500b00dadede448258b2b94c4c68957c897d6b0b34cf0395de2f3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page