# ChatGPT Bot Integration

**URL:** <https://extensions.streamer.bot/t/chatgpt-bot-integration/865>\
**Category:** Approved\
**Tags:** youtube, chat, twitch\
**Created:** [February 14, 2024, 5:48pm UTC](https://extensions.streamer.bot/t/chatgpt-bot-integration/865 "2024-02-14T17:48:02Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mustached\_maniac](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/mustached_maniac/32/1227_2.png) [@mustached\_maniac](https://extensions.streamer.bot/u/mustached_maniac)\
**Post date:** [February 14, 2024, 5:48pm UTC](https://extensions.streamer.bot/t/chatgpt-bot-integration/865/1 "2024-02-14T17:48:03Z")

</div>

## Description

This extension adds the ability to tie your bot account to ChatGPT. It gives your bot the ability to answer questions directly, and also adds the option to have it randomly interact with your chat.

_Changelog -_ **UPDATED 27JUL24:** Now includes ChatGPT 4.0-mini support! Removed the manual input of the bot’s name on the set-up and moved the API Key to an input Sub-Action (varies from the video). Also adjusted some variable names and just overall clean-up.

This extension requires you paying for use of OpenAI. I loaded my account with $10 for testing purposes. In the 2 months since I have been using this (plus other AI features) I have used a total of $0.43

## Video Tutorial

[![](https://extensions.streamer.bot/uploads/default/original/2X/b/bced232a91e2edfb1fbc67678fe157567bb81162.jpeg "Adding ChatGPT (AI chatbot) to your Stream with Streamer.bot [2024]") ](https://www.youtube.com/watch?v=EgeDepiBNzA)

Updated to work with Streamer.Bot v0.2.3 and supports multiple platforms._(Excluding GPT Shoutouts, those are still limited to Twitch at this time)_

## Import Code

[Mustached\_Maniac ChatGPT.sb](https://extensions.streamer.bot/uploads/short-url/qYVFHsNFGxQ0Blg9ovimI7ojb4J.sb) (10.8 KB)

## Installation:

## Obtaining Your API Key

Head over to [OpenAI](https://platform.openai.com) and Sign in, or create, your account. Then click on `API Keys` as depicted below, followed by `+Create new secret key`

 ![ChatGPT API Key](https://extensions.streamer.bot/uploads/default/original/2X/f/f782c8d9e4f79919ee8e5943444d4a2eaeab29e0.png)

On the next window, you can name it whatever you want, or leave it blank. Just click on the `Create Secret Key` when you’re finished and copy down the Client Secret.

 ![ChatGPT Name](https://extensions.streamer.bot/uploads/default/original/2X/e/e331e6dfecca244ce931d431ffbd60a2622a6500.png)

You **CANNOT** get your Client Secret again, if you fail to copy it down you will have to delete that key from the website and then generate a new one!

Lastly, Click on `Settings`, `Billing`, and then `Add to Credit Balance`. If you do **NOT** have any credit on your account, this extension will **NOT** work!!

 ![ChatGPT Billing](https://extensions.streamer.bot/uploads/default/original/2X/8/8efde70ffeb9fec265ba5d47381f1392fa97ae53.png)

## Setting it Up

In Streamer.bot click the `Import` button in the top menu. Drag the downloaded **.sb file** into the `Import String` field and click `Import`. You will see **4** `Actions` and **3** `Commands` _(varies from the video due to a recent update)_

 ![ChatGPT Import](https://extensions.streamer.bot/uploads/default/original/2X/d/dbd7ab18f869dededc00ac658f1259a0fd6079e8.png)

### Once Imported, you need to configure a few things (as shown below):

 ![ChatGPT Setup](https://extensions.streamer.bot/uploads/default/original/2X/f/fa3a7738a0b3acd196d64b46ea8685b44f434f3e.png)

- `chatGptApiKey` Paste your API Key from earlier into this argument

- `behavior` Here is where you give your bot some personality, be as descriptive and explicit as you’d like. If you want your bot to talk like a pirate, say it now!

- `chatGptModel` This Defaults to 3.5, unless you specifically want to use 4.0 or 4.0Turbo, leave it be!

- `chatbotName` Type your bot username here. **VERY IMPORTANT** this prevents your bot from talking to itself.

- `chatGptReplyProb` This is a scale of 0-100%. Set to ‘0’ if you do **NOT** want your bot randomly replying to things. 100% means that it replies to every message.

Next, head over to the `ChatGPT Answers` Action and double-click the current trigger.

Click the `Create Command` button and make whatever command you want (you **CAN** set the command to be @botname, like in the example).

 ![ChatGPT Command](https://extensions.streamer.bot/uploads/default/original/2X/c/c320095b3b755a20ca2db9ee11118d02e077e72a.png)

## Final Step

Profitttttttt, have fun with it and give your bot as much personality/backstory as you would like.

---

<div class="post-metadata">

**Author:** ![GoWMan](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/gowman/32/4_2.png) [@GoWMan](https://extensions.streamer.bot/u/GoWMan)\
**Post date:** [March 2, 2024, 11:17pm UTC](https://extensions.streamer.bot/t/chatgpt-bot-integration/865/2 "2024-03-02T23:17:32Z")

</div>



---

<div class="post-metadata">

**Author:** ![GoWMan](https://extensions.streamer.bot/user_avatar/extensions.streamer.bot/gowman/32/4_2.png) [@GoWMan](https://extensions.streamer.bot/u/GoWMan)\
**Post date:** [March 3, 2024, 12:04am UTC](https://extensions.streamer.bot/t/chatgpt-bot-integration/865/3 "2024-03-03T00:04:16Z")

</div>


