chatGPT to Chat From Command

Description

Make Your Bot Answer Anything ! ( use chatGPT 3.5Turbo )
:warning: This Requires an OpenAI Key, which is a paid service :warning:

Import Code

chatGPT to Chat From Command.sb (6.2 KB)

Installation

Import the code above In Streamer.bot (top left import button) : In Streamer.bot click the Import button in the top menu. Drag the .sb file above into the Import String field.

Configuration

  • set your API key
  • set the Context for the AI ( e.g. : " you are a poet doing response only with rhymes )
  • set the expected Tokens Count to spend
  • set the first message for the response ( meanwhile the code is waiting for the response generated )

Available Commands

Command Purpose
!chatGPTturbo follow the command by the message to send to the A.I.

remember that all commands imported are disbabled by default
you can change the command by adding a new one in the trigger field

2 Likes

There is a small error in your code, which makes it that it will almost always respond “the same” and in french

Line 19:
string messageInput = args.ContainsKey(“totalSubGifted”) ? args[“rawInput”].ToString() : " oups j’ai oublié de mettre un message, lol! ";

Should rather be:
string messageInput = args.ContainsKey(“rawInput”) ? args[“rawInput”].ToString() : “No input given.”;

Potentially even make it so the users themselves decide which variable should be used as input, with an argument they set before hand?.

Other then that seems to work fine

code corrected thx pwnny

1 Like

You might have forgotten to add the actual action to the new export again, sorry :joy:

thx pwnny ! updated , with … a file … ( I hope )

1 Like