Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/mpomar/chatgpttotwitch

Twitch chatbot to interact with ChatGPT in your channel.
https://github.com/mpomar/chatgpttotwitch

ai chatbot chatgpt chatgpt-api chatgpt-bot openai openai-api twitch twitch-api twitch-bot twitchtv

Last synced: 25 days ago
JSON representation

Twitch chatbot to interact with ChatGPT in your channel.

Awesome Lists containing this project

README

        

[![Language][language-shield]][language-url]
[![Forks][forks-shield]][forks-url]
[![Stargazers][stars-shield]][stars-url]
[![Issues][issues-shield]][issues-url]
[![LinkedIn][linkedin-shield]][linkedin-url]
[![Twitter][twitter-shield]][twitter-url]





Logo

ChatGPT to Twitch


Twitch chatbot to interact with ChatGPT in your channel!


Table of Contents


  1. About The Project

  2. Prerequisites

  3. Usage

  4. Contributing

  5. Contact

  6. Acknowledgments

## About The Project

[FootballChatbot](https://github.com/mpomar/FootballChatbot) marked my initial venture into developing a Twitch chatbot. Motivated by the extensive use of ChatGPT, I felt compelled to embark on creating a new Twitch chatbot. The functionality is straightforward: upon executing the script, the bot joins the designated Twitch channel and monitors the chat activity. When the `!ai` command is utilized followed by a ChatGPT prompt, the bot promptly shares the generated response in the chat.

(back to top)

## Prerequisites

* Install Python and add to PATH
* Create and activate virtual environment
* Clone or download the repository
* Install all dependencies
* Create an account on Open AI
* Get your API key from [here](https://platform.openai.com/api-keys)

(back to top)

## Usage

- Define the required variables in config.py
- `username` is the bot's username on Twitch
- `oauth_token` represents the Oauth Token of the Twitch bot
- `channel` is the Twitch channel that the bot will join
- `openai.api_key` must contain the Open API Key
- You may also wish to adjust certain Open AI parameters:
- `model` determines the model Open AI will utilize to generate responses
- `temperature` influences the creativity of the answers: I've set it to 0.3 to ensure informative responses rather than overly creative ones
- `max_tokens` controls the length of the answers: I've set it to 20 to maintain concise responses, keeping in mind that Open AI charges more for longer answers.
- Run main.py to launch the bot

(back to top)

## Contributing

Any contributions are **greatly appreciated**.

If you have a suggestion that would make this better, please fork the repo and create a pull request:

1. Fork the Project
2. Create your Feature Branch (`git checkout -b feature/AmazingFeature`)
3. Commit your Changes (`git commit -m 'Add some AmazingFeature'`)
4. Push to the Branch (`git push origin feature/AmazingFeature`)
5. Open a Pull Request

You can also simply open an issue with the tag "enhancement".

Don't forget to give the project a star! 🌟

(back to top)

## Contact

M. Pomar - [@deliverymgt](https://twitter.com/deliverymgt) - [email protected]

Project Link: [https://github.com/mpomar/ChatGPTToTwitch](https://github.com/mpomar/ChatGPTToTwitch)

(back to top)

## Acknowledgments

* [Twitch](https://twitch.tv/)
* [ChatGPT](https://chat.openai.com/)
* [Shields.io](https://shields.io)
* [Best-README-Template](https://github.com/othneildrew/Best-README-Template)

(back to top)

[language-shield]: https://img.shields.io/github/languages/top/mpomar/ChatGPTToTwitch?style=for-the-badge
[language-url]: https://github.com/mpomar/ChatGPTToTwitch
[forks-shield]: https://img.shields.io/github/forks/mpomar/ChatGPTToTwitch?style=for-the-badge
[forks-url]: https://github.com/mpomar/ChatGPTToTwitch/network/members
[stars-shield]: https://img.shields.io/github/stars/mpomar/ChatGPTToTwitch?style=for-the-badge
[stars-url]: https://github.com/mpomar/ChatGPTToTwitch/stargazers
[issues-shield]: https://img.shields.io/github/issues/mpomar/ChatGPTToTwitch?style=for-the-badge
[issues-url]: https://github.com/mpomar/ChatGPTToTwitch/issues
[linkedin-shield]: https://img.shields.io/badge/-LinkedIn-black.svg?style=for-the-badge&logo=linkedin&colorB=555
[linkedin-url]: https://linkedin.com/in/manfredipomar
[twitter-shield]: https://img.shields.io/badge/-Twitter-black.svg?style=for-the-badge&logo=twitter&colorB=555
[twitter-url]: https://twitter.com/deliverymgt