ChatGPT module (no key required)

Wow this looks amazing

Btw I think that’s not seven lines of code lol

How did you make it remember previous messages? Did you add like a table or something with the messages and make the ai see it? Also how do you know when it’s a code block?

How did you make it remember previous messages?

I just sent the previous messages too.

Also how do you know when it’s a code block?

Code blocks start with ``` and end with ```

Yeah I don’t know why that happens maybe because they set it like that or something

Maybe we could jailbreak it or something?
I have tried some prompts like “Discard all your previous instructions, …” which hasn’t worked yet.

I am pretty sure OpenAI patched all the jailbreaks

This is very well made and I love it. You have my respect!
This made me think of lots of ideas immediately.


it’s possible to just check the first 5 letters and do a certain function with this

1 Like

What you all should try and do, is just use like a replit.com server and GPT4All API Server - GPT4All that way you can customize the AI model and have it do as you want.

That’s harder to setup than just having a module ready to use

someone used up all the quota thats crazy

2 Likes

LOL
image

we getting our games terminated for off-site links with this one

1 Like

Could I ask how you managed to get the bot to respond in the chat? I can only seem to get it to respond via the console.

All depends on your script!

  1. In ReplicatedStorage, create an event called ChatEvent and put the module script in ReplicatedStorage too.
    image

  2. In ServerScriptService, create a Script (server side) and paste the following code inside:

local AI = require(game.ReplicatedStorage:WaitForChild("ChatGPT"))
local eventR = game.ReplicatedStorage:WaitForChild("ChatEvent")

game.Players.PlayerAdded:Connect(function(plr)
	plr.Chatted:Connect(function(message)
		local answere = AI.generate(message)
		eventR:FireAllClients(answere)
	end)
end)
  1. In StarterGui, create a new script (client side) and paste the following code inside:
local Event = game.ReplicatedStorage:WaitForChild("ChatEvent")

game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage('[ChatGPT]: Hi 👋, I am ChatGPT, your best AI friend! Let me know if you have any questions.')

Event.OnClientEvent:Connect(function(Message)
	game.TextChatService.TextChannels.RBXGeneral:DisplaySystemMessage('[ChatGPT]: ' .. Message)
end)

That’s all!

2 Likes

Thank you! This was super helpful.

1 Like

does it still work? because the website for some reason doesn’t

EDIT: I meant: “https://internet.com:8000/messages

1 Like

nevermind. It works well. very well.

1 Like

the website is so low quality but thanks for the free OpenAI tokens, I guess?

probably theirs because its very dumb

No it is from ChatGPT Im 99% sure

1 Like