Skip to main content

Use Chat GPT Automation

Project description

Automate-GPT

Automate-GPT is a Python library that allows users to automate interactions with ChatGPT through a web driver. This library simplifies the process of sending prompts to ChatGPT and receiving responses in an automated manner.


Features

  • Automate interactions with ChatGPT.
  • Use an undetected Chrome driver to bypass detection.
  • Simplified interface for sending prompts and retrieving responses.
  • Supports Reset Chat feature to clear the chat history.
  • Supports Search internet feature to search for information.

Installation

To install Automate-GPT, use pip:

pip install Automate-GPT

Requirements


Usage

Here is a basic example of how to use the Automate-GPT library:

Example

from Automate_GPT import ChatGPTAutomation
import undetected_chromedriver as uc

# Initialize the undetected Chrome driver
driver = uc.Chrome()

# Initialize ChatGPTAutomation with the Chrome driver
chatbot = ChatGPTAutomation(driver)
response = chatbot.chat("What is the capital of France?")
print(response)  # Output: Paris
chatbot.reset_chat()
chatbot.search_enable(False)
chatbot.get_conversation()

API Reference

Automate_GPT.ChatGPTAutomation

A class to automate interactions with ChatGPT.

__init__(self, driver: undetected_chromedriver.Chrome)

Initializes the ChatGPTAutomation instance.

  • Parameters:
    • driver (undetected_chromedriver.Chrome): The Chrome web driver instance for interacting with ChatGPT.

prompt(self, prompt: str) -> str

Sends a prompt to ChatGPT and retrieves the response.

  • Parameters:
    • prompt (str): The text prompt to send to ChatGPT.
  • Returns:
    • (str): The response from ChatGPT.

reset_chat(self)

Resets the chat history.

search_enable(self, enable: bool)

Enables or disables the search internet feature.

  • Parameters:
    • enable (bool): Whether to enable or disable the search internet feature.

get_conversation(self) -> list[dict]

Retrieves the conversation history.

  • Returns:
    • (list[dict]): The conversation history.

Notes

  • Ensure you have the latest version of Chrome and the corresponding chromedriver installed.
  • undetected-chromedriver is used to prevent detection during automated browser interactions.

Acknowledgments

Created by Sheth Jenil

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

automate_gpt-1.0.2.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

Automate_GPT-1.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file automate_gpt-1.0.2.tar.gz.

File metadata

  • Download URL: automate_gpt-1.0.2.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for automate_gpt-1.0.2.tar.gz
Algorithm Hash digest
SHA256 dd1cd0acd24c1a36e20038664ff2669c6c0497bf165e57fdae201fecf4bd2c23
MD5 72012236439216c68dafd9d15aeb9dd2
BLAKE2b-256 dccd39a4d611fc82d805484369bbd7b08288082078c023b591617df71f6ed792

See more details on using hashes here.

File details

Details for the file Automate_GPT-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: Automate_GPT-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for Automate_GPT-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea82619dcb5b7b204dcb46ef7f5722d8fd28e8959a2b9eeb23bbc94541d2ad15
MD5 7c5ffcc7a35f8ab632db34efb66cd789
BLAKE2b-256 eee9197d8833180cab56b8a0f759adecd7b7db2130a0306b364fb0204c34adbf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page