Gemini AI Chat NPC

For a recent commission, I successfully created a working Gemini AI Chat NPC that lets users choose the Character Instruction.

I opted for Gemini AI over alternatives like ChatGPT because Gemini offers a free tier that doesn’t require payment info—a big plus for me since I’m working on a budget (and I mean that literally; I don’t have more than a penny to spare).

That said, Gemini doesn’t provide OpenCloud API endpoints, which made this project challenging. My goal was to achieve this without spending any money, so I had to get creative.

To make it work, I hosted a Node.js backend server on Glitch, where I created the API endpoints needed to connect with HTTPService in the game and aswell followed the Gemini AI documentation to have the model working properly. While Gemini isn’t entirely free, its free tier has reasonable rate limits and, in my opinion, is a solid option for small-scale developers.

I’m always open to feedback or corrections, so feel free to drop a comment! :smile:

17 Likes

Wow! That Looks amazing! I Like the Dummy that can Talk and follow the Player, good Work!

2 Likes

can multiple npcs be active at once and be told info and helpful tips to give the player?

1 Like

Thanks a lot for the feedback :smiley:

1 Like

It can be done of course but considering this was a commision i did, only one npc was asked for

3 Likes

suppose i have like 10 npcs all in a small area, could i get ratelimited? if so, does the system have a fallback message?

1 Like

The free tier does have a decent rate limits, so basically you will need to get one of the paid plans to possibly not run into a rate limit fallback message

2 Likes

so i can finally have an AI roblox GF? FINALLY!!

5 Likes

This Gemini AI Chat NPC looks interesting! Great job on it! How long did it take for you to create it?

2 Likes

Thanks! To get it working on Roblox (researching and get the api endpoint working) took around 30 to 40 minutes. The rest like UI and NPC Customization was almost 2 days

4 Likes

Wow this is very Cool, Keep up the good work :+1:

3 Likes

This looks sick, keep up the amazing work and hopefully try this game out in the future.

3 Likes

well props to u for succeeding in this (i tried setting up the same thing but glitch is blocked in italy apparently xd) this looks really good

1 Like

I believe you can do the same with vercel since its free too, but it does have to be under a repository like github

eh i solved it running on a local machine rn since i wasnt gonna publish a bot anyway, tho thanks ill check it out for sure

1 Like

Alright, yea the options i used are for those who can’t use a local machine or does not know how to set one up (like me)

with local machine i mean my pc xd (i use vscode and just run it locally like a nerd)

oh lol got it now haha. Not bad