Skip to main content

Probing chatgpt

Project description

gptprobe

Example:

from gptprobe.private_setenv import NOTHING # See below
question = """What was the result of the 2018 FIFA World Cup final, as a python dict. Do not include anything
              except the dict in your answer. One key/value for each team/score."""
d = ask_for_dict(question=question)
print(d)

The result is a Python dictionary:

{'France': 4, 'Croatia': 2}

This package contains simple and complex multi-step interrogations intended to yield structured data, including patterns where ChatGPT4 tries to help itself out of a rut, rephrases questions, ratifies answers using a different key, tries to reformat its own responses, and so forth. It may help with your own unmanned missions into the galactic brain.

Install & environ setup

pip install gptprobe 

Then from open ai developer help yourself to three keys and inject them as follows:

import os 
os.environ['OPEN_AI_KEY_0'] = 'sk-ekOvFjAHKETQYADDAYADDA'
os.environ['OPEN_AI_KEY_1'] = 'sk-ekOvFjAHKETQYADDAYADDADO'
os.environ['OPEN_AI_KEY_2'] = 'sk-ekOvFjAHKETQYADDAYADDADOO'

Maybe you want to mimic gptprobe/public_setenv.py and import NOTHING from it.

User Guide

Troubleshooting

File an issue. Pull requests are welcomed.

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

gptprobe-0.1.2.tar.gz (12.9 kB view hashes)

Uploaded Source

Built Distribution

gptprobe-0.1.2-py3-none-any.whl (19.8 kB view hashes)

Uploaded Python 3

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