Hi Friends! đź‘‹
📊 Daily Stand-Up: Yesterday, as the Lead Engineer, we got the game into a playable state. We can’t say MVP as basically we hooked up a flutter chat library with http requests to our local AI API, using Ollama, running our game and our rules all behind a play button. We also started trying to get our AI “hosted” without paying. While we did get it “hosted” and thereby got the game working on our phones and iPad, this “hosting” will only work while we build/test the app.
So this is where we ask for help. If anyone has experience hosting their own AI, and a small rdb, with a scalable solution let us know in the comments or feel free to DM me.
Okay if you’ve made it this far, you probably want to know how we “hosted” our AI for free. Introducing Ngrok. Ngrok can expose your local port to the internet and with Ollama you can forward the port your AI is running on thereby exposing it for testing with phones and other devices. This is all free and crucial to the development and testing of our new game! Here is what the code looks like but be sure to check out the resources below for a walkthrough.
final _completeChatUri = Uri.https(
"9347-222-18-32-555.ngrok-free.app", // From console after deploying ngrok
"/api/chat",
);
final Map<String, String> _headers = {'Content-Type': 'application/json'};
Map<String, dynamic> body = {
'model': 'llama2', // your AI should be here\
'messages': [LIST OF YOUR MESSAGES HERE],
'stream': false,
};
var response = await request(uri, headers, body);
Today we’re going to focus on building up the app a bit more, i.e. the resources you need to play the game, a points system, a reward system, continuing to tweak our AI, and look for a way to host our AI and a small rdb on the cheap.
💪🏼 New Skill: Ngrok
🎵 Playlist: https://open.spotify.com/track/0zxj7dVhYZq5ACyaDx5XIo?si=0636e6bf1fc24c36
🧠Mental State: I got some tough news recently but I’ll be okay,
🛠️ Tools: MacBook Pro M2, Ipad Pro, Pixel 6, Intellij, Flutter, The Keyboard that Saved my Hands, The Desk that Saved my Back, The Perfect Stand for Ipads, Desk Mounts that Work and Go on Sale, Ollama AI
📚 Resources:
https://www.youtube.com/watch?v=syR0fT0rkgY << Skip to 7:05 for ngrok hosting
https://github.com/ollama/ollama/blob/main/docs/api.md
https://ngrok.com/docs/http/oauth/?ref=getting-started&cty=ssh
#AI, #TechJourney, #Flutter, #MobileGameDevelopment, #SoftwareDevelopment, #ProgrammingLife, #TechBlog
By: David Giametta
Future David here! I hope you enjoyed reading through this post. AI Murders is now live! Apple, Google



Leave a Reply