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.5.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

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

Uploaded Python 3

File details

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

File metadata

  • Download URL: chattychattybangbang-0.0.5.tar.gz
  • Upload date:
  • Size: 4.8 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.5.tar.gz
Algorithm Hash digest
SHA256 005835f7df4fe75eaf0066d0f9ada18db9328b36b25bef73f4296c2166d574ba
MD5 04247b920389c7645da8829dc59b09d6
BLAKE2b-256 fd1934f0ff8bef941498b55441e1d072f0b1958f510f081374d3faeb16eeaa0c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for chattychattybangbang-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 208acc1cafa7e8a4944df2c45ba0805cc30668d1193b241dd05fb7b354742996
MD5 006ba367e041f91b4dd1521a822d62a8
BLAKE2b-256 c4eed51141d1708013eadac9ab4ea33038bb4a966024fa43a519c93111127e6e

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