├── .gitignore
├── LICENSE
├── README.md
├── chatgpt_automation.py
└── ezgif.com-video-to-gif.gif
/.gitignore:
--------------------------------------------------------------------------------
1 | # Node rules:
2 | ## Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
3 | .grunt
4 |
5 | ## Dependency directory
6 | ## Commenting this out is preferred by some people, see
7 | ## https://docs.npmjs.com/misc/faq#should-i-check-my-node_modules-folder-into-git
8 | node_modules
9 |
10 | # Book build output
11 | _book
12 |
13 | # eBook build output
14 | *.epub
15 | *.mobi
16 | *.pdf
17 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2022 Z33
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 |
Automating ChatGPT: A Python & Selenium-based Desktop Application Bot
2 |
3 |
4 |
5 | ## 📝 Description
6 |
7 | This project presents an innovative open-source desktop application Bot built using Python and Selenium to automate interactions with OpenAI's ChatGPT model. Our application is equipped with a beautiful graphical user interface (GUI), and it supports both Windows and Mac operating systems.
8 |
9 | ## 💻 Downloads
10 |
11 | For your convenience, we provide direct download links for both Windows and Mac versions of the application:
12 |
13 | - [🪟 Windows Download](https://drive.google.com/drive/folders/1CBOKUSTQ6_e5LEOrDip4qrEDwOSVNqW2?usp=sharing)
14 | - [🍏 Mac Download - Coming Soon]()
15 |
16 | ## :tada: Free Features
17 |
18 | - **Beautiful GUI:** The Bot provides a user-friendly interface that makes it easier for users to interact with ChatGPT.
19 |
20 | - **Windows and Mac Support:** The Bot is designed to be cross-platform compatible, supporting both Windows and Mac systems.
21 |
22 | - **Cloudflare Bypass:** The Bot includes a feature to bypass Cloudflare security checks to ensure smooth and continuous operation.
23 |
24 | - **Automatic Login:** This Bot can automatically log into your OpenAI account, which saves you the hassle of manual logins.
25 |
26 | - **Interaction with ChatGPT GUI:** The Bot lets you submit your input and retrieve the response from the ChatGPT GUI.
27 |
28 | - **CSV Input & Output:** The Bot accepts CSV files as input, and saves the responses from ChatGPT into a CSV file (Premium Features)
29 |
30 | - **Choice between GPT-4 and GPT-3.5 Turbo:** Users have the flexibility to choose between GPT-4 and GPT-3.5 Turbo as their underlying model. The default selection is GPT-3.5.
31 |
32 | - **New Chat:** You can initiate a new chat session at any time.
33 |
34 | ## 🛠 To Dos
35 | - Chrome Extenstion
36 | - Output to CSV
37 | - Google Sheets integration
38 | - Plugins Supports
39 | - intelligent Bot.
40 |
41 |
42 | ## 🎥 Demo
43 |
44 | Please check out the brief demo below for a quick overview of the application:
45 | 
46 |
47 | ## 🛠 Usage Table
48 |
49 | | Field Name | Function |
50 | | --- | --- |
51 | | `Input Files` | Fields for username and password input |
52 | | `CSV File Input` | Field to upload a CSV file containing data to be used as input |
53 | | `Initial Instruction Prompt` | Field for entering the initial instruction prompt for the chat |
54 | | `Output CSV File` | Field to specify the file where the response will be saved as a CSV Output |
55 | | `Model Selection` | Option to choose between GPT-4 (default) and GPT-3.5 Turbo |
56 | | `Start Bot button` | Button to start the bot and initiate interaction with ChatGPT |
57 |
58 | The application is in active development. Contributions, suggestions, and issue reports are welcome and appreciated. 🙌
59 |
--------------------------------------------------------------------------------
/chatgpt_automation.py:
--------------------------------------------------------------------------------
1 | from selenium import webdriver
2 | from selenium.webdriver.common.keys import Keys
3 |
4 | # Start a webdriver instance and open ChatGPT
5 | driver = webdriver.Chrome()
6 | driver.get('https://chatgpt.openai.com/')
7 |
8 | # Find the input field and send a question
9 | input_field = driver.find_element_by_class_name('c-text-input')
10 | input_field.send_keys('What is the capital of France?')
11 | input_field.send_keys(Keys.RETURN)
12 |
13 | # Wait for ChatGPT to respond
14 | driver.implicitly_wait(10)
15 |
16 | # Find the response and save it to a file
17 | response = driver.find_element_by_class_name('c-message__body').text
18 | with open('response.txt', 'w') as f:
19 | f.write(response)
20 |
21 | # Close the webdriver instance
22 | driver.quit()
23 |
--------------------------------------------------------------------------------
/ezgif.com-video-to-gif.gif:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Appilot123/Automating-ChatGPT-with-Python-and-Selenium/8fbf245c09c07f47996335e622864fac7095f6b8/ezgif.com-video-to-gif.gif
--------------------------------------------------------------------------------