A Python package for automating interactions with ChatGPT using Selenium.
Project description
ChatGPTAutomation 🤖💻🧠
Description
ChatGPTAutomation is a Python package that automates interactions with ChatGPT using Selenium, streamlining the process for developers and testers. 🚀
Features
- Automated messaging to ChatGPT. 📩
- File upload support. 📁
- ChatGPT conversation retrieval and storage. 🗂️
- Customizable WebDriver for browser management. 🌐
Installation
Install with:
pip install ChatGPTAutomation
Usage
Chrome WebDriver Download:
Setup:
Automatic setup (without paths):
from chatgpt_automation.chatgpt_automation import ChatGPTAutomation
chat_bot = ChatGPTAutomation(
username="<your username here>", # Optional
password="<your password here>" # Optional
)
Manual setup (with paths):
from chatgpt_automation.chatgpt_automation import ChatGPTAutomation
chat_bot = ChatGPTAutomation(chrome_path="path/to/chrome.exe", chrome_driver_path="path/to/chromedriver.exe",
username="<your username here>", # Optional
password="<your password here>" # Optional
)
# Send prompt
chat_bot.send_prompt_to_chatgpt("Hello, ChatGPT!")
# Save conversation
chat_bot.save_conversation("conversation.txt")
File upload:
chat_bot.upload_file_for_prompt("test_file.txt")
chat_bot.send_prompt_to_chatgpt("Explain this file?")
Check response status:
if chat_bot.check_response_status():
print("Response ready.")
else:
print("Response issue.")
Get last response:
chat_bot.send_prompt_to_chatgpt("Hello, ChatGPT!")
response = chat_bot.return_last_response()
Switch models:
chat_bot.switch_model(4)
Login check:
if chat_bot.check_login_page():
chat_bot.login()
Requirements
- Python 3.8+
- Selenium==4.9.0
- See
requirements.txt
for more.
License
MIT License - see LICENCE.md.
Contact
Seyed Ali Hosseini 🧑💻 - iamseyedalipro@gmail.com 📧.
Acknowledgements
- Thanks to OpenAI and Selenium. 🙏👨💻
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
ChatGPTAutomation-0.2.1.tar.gz
(12.6 kB
view hashes)
Built Distribution
Close
Hashes for ChatGPTAutomation-0.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a25378776cd3cc80af8431386455a9e745961ffadae70ca60d3cfd4d9cf801d2 |
|
MD5 | 880526bc099825a7fe79ff30d53ddd7a |
|
BLAKE2b-256 | 98a0aeef43566449ac8c423cd036de5954eaa23b9a477290fa35ee96e886005a |