A small tool for automating collecting data from ChatGPT
Project description
A small tool for automating collecting data from ChatGPT over long periods of time.
What does it do?
ChatGPT currently limits the number of questions that users may ask per hour. The goal of this project is to allow users to just leave their computers on for extended periods of time to collect large amounts of responses from ChatGPT. There might not be a lot of practical use for this. Its main use is in research or data analysis.
Install as a Python Library
pip install sleepyask
Documentation
Authentication
You are required to provide an organization as well as an API Key
organization
- Your organization ID. Get it here: https://platform.openai.com/account/org-settings
api_key
- You create an API Key on OpenAI by. Get it here: https://platform.openai.com/account/api-keys
Clicking on your profile picture on the top-right > View API Keys > Create new secret key.
count
- This specifies the number of workers to create for asking questions. You can have multiple workers asking questions in parallel.
Sample config
config = {
"organization": "Your OpenAI organization",
"api_key": "Your OpenAI api key",
"count": 1
}
Sample code
from sleepyask.openai import chat
# Your ChatGPT login information
config_1 = {
"organization": "Your ChatGPT organization",
"api_key": "Your ChatGPT api key",
"count": 1
}
config_2 = {
"organization": "Your ChatGPT organization",
"api_key": "Your ChatGPT api key",
"count": 1
}
configs = [config_1, config_2]
## List of questions you would like to ask ChatGPT
question_list = [
'What is 1 + 1?',
'What is 1 + 2?',
'What is 1 + 3?'
]
# The filename in which you would like your responses to be stored.
# sleepyask will create this file for you. If you create it yourself, there might be some problems.
output_file_path = 'draw.json'
# Run sleepy_ask
chat.ask(configs=configs,
questions=question_list,
output_file_path=output_file_path,
verbose=True)
# chat.ask has the following optional parameters:
# verbose : bool = Whether or not sleepyask should print its prompts. It is False by default.
# model: str = The ChatGPT model to ask. This is "gpt-3.5-turbo" by default.
# system_text: str | None = System text to prime ChatGPT. This is None by default.
# temperature: float | None = Defines how non-deterministic ChatGPT is. Ranges from 0 - 2. Lower values are more deterministic. This is 1 by default
# max_tokens: int | None = Defines the maximum number of tokens in ChatGPT's response. This is 2048 by default.
Get involved
- 🐛 Found a bug or interested in adding a feature? - Create an issue
- 🤗 Want to help? - Create a pull-request!
Credits
- I copied/stole Catppuccin's beautiful colors and README.
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 sleepyask-4.3.1.tar.gz
.
File metadata
- Download URL: sleepyask-4.3.1.tar.gz
- Upload date:
- Size: 17.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 89b5a0d849dc02eb63f0e61444236dc69660a401e9a06e9fae924f8281638bd2 |
|
MD5 | a151b2a8e0c5a8fdbacaa5f0594900fc |
|
BLAKE2b-256 | 4017fae31cc3e30956a4fb63764fb83869d38cfb430a8b068a5e0973c02cf61a |
File details
Details for the file sleepyask-4.3.1-py3-none-any.whl
.
File metadata
- Download URL: sleepyask-4.3.1-py3-none-any.whl
- Upload date:
- Size: 17.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.16
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 28a80cb862aec6e571ece0c46b5df6746fe83f27b4baa24ecf827938ec8d9736 |
|
MD5 | a8f59889ad4ae950c3242e3ac1e0f93d |
|
BLAKE2b-256 | 24281d78c5623428e24f16699abc8df00bd60e34cb36c9ff0f3d233e10e06c9f |