Skip to main content

cool_gpt

Cool-GPT is a Python library that allows you to use ChatGPT for free using the Selenium framework. By utilizing Selenium, you can automate use chatgpt like api, this helps you to generate text and engage in conversations programmatically. It doesn't require any API keys and it's easy to use and straightforward. It also doesn't scrape openai or chatgpt website.

Prerequisites

Before using Cool-GPT, ensure that you have the following prerequisites installed:

  • Python 3.6 or above
  • Selenium (install via pip install selenium)
  • element-manager (install via pip install element-manager)
  • A compatible web driver for Selenium (e.g., ChromeDriver) Link
  • Put the web driver in the same folder as the script
  • A stable internet connection

Installation

You can install cool_gpt via pip:

pip install cool_gpt

Getting Started

To get started, follow these steps:

[Basic Usage] Here's a basic example of how to use cool_gpt:

Install: pip install cool-gpt==0.0.1 or pip install cool-gpt

NOTE: cool-gpt==0.0.1 doesn't support text to speech and speech to text

from cool_gpt import bot

driver = bot.setup_driver()
print('Enter 'q' to quit')
while True:
    message = input('You: ')
    if message == 'q':
        break
    print('Bot:', bot.ask(message, driver))

[Advance Usage] It also supports text to speech and speech to text:

Install: pip install cool-gpt

from cool_gpt import bot
from cool_gpt.speech_to_text.speech_to_text import speech_to_text_google
from cool_gpt.speech_to_text.speech_to_text_whisper import speech_to_text_whisper
from cool_gpt.text_to_speech.text_to_speech import text_to_speech

driver = bot.setup_driver(debug=False)
while True:
    # message = input('You: ') # for text input
    message, status = speech_to_text_whisper()  # for speech input via whisper
    # message, status = speech_to_text_google()  # for speech input via gtts
    if status:
        print('You:', message)
        ans = bot.ask(message, driver)
        print('Bot:', ans)
        text_to_speech(ans, backend_tts_api='pyttsx3')  # for speech output via pyttsx3 its free and unlimited
        # _ = text_to_speech(ans, backend_tts_api='gtts')  # for speech output via gtts its free but limited in a day
    else:
        print('Speak again louder please.')

Limitations

Please note the following limitations of cool_gpt:

cool_gpt is dependent on the availability and reliability of the toolbot.ai interface.

Usage of cool_gpt may be subject to the terms and conditions of the service providing the toolbot.ai interface.

Selenium automation may be slower compared to the OpenAI API, and rate limits may apply depending on the provider and toolbot.ai interface.

Contributing

Contributions to cool_gpt are welcome! If you have any ideas, improvements, or bug fixes, please submit a pull request or open an issue on the GitHub repository.

License

cool_gpt is licensed under the MIT License. Feel free to use and modify the library according to your needs.

Acknowledgements

cool_gpt was inspired by the amazing work done by toolbot.ai in developing this amazing website.

Thank me on-

Metadata

Release files for cool-gpt 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for cool-gpt 0.0.2
File Size Uploaded
cool_gpt-0.0.2.tar.gz 8.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for cool-gpt 0.0.2
File Interpreter ABI Platform
cool_gpt-0.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 16.8 kB

Release files / cool_gpt-0.0.2.tar.gz

Download URL cool_gpt-0.0.2.tar.gz
Size 8.6 kB
Tags Source
SHA-256 checksum
How to use checksums
6c68b153442228c9dd3ab3053aa36cef7123f23da76729dae7fd8ff60b3293e6
BLAKE2b-256 checksum
How to use checksums
ef927db245f26212dd5c1be337204979ad248d2b7b4334f49d682c69c4383984
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release files / cool_gpt-0.0.2-py3-none-any.whl

Download URL cool_gpt-0.0.2-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
449e8833cf50157e3a955fdeb65caa4bbf2d5a7acdf2bca7cead5f8e0dc1a8db
BLAKE2b-256 checksum
How to use checksums
a221a151e7b6e36cb5d4d6e6f479293967008de838610c924ebe2628dff2b54b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.12

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page