Can an open source LLM be integrated in Unreal Engine 5.6 locally?

Hello, I am Pranay, and I started game development an year before, although I am not so experienced in game development or coding, but I do have a little experience about Artificial Intelligence, not so much but enough for my work. I am working on my first game, creating and learning in parallel, it is an open world game, and as I was working in it, I realised that I would also need NPCs that can talk to the player in real time, to give the players a sense of fun, which takes too much time and knowledge of behavior and state trees, which I don’t have :sob:, and also there aren’t much tutorials about state trees, Thats why I thought what would be better than just taking a light weight open source LLM from GitHub and somehow plugging it in the engine so that it can run locally, without connecting to cloud, this would be wonderful, but again :sob: I don’t know if this can even be done and if yes then how can I do that, I didn’t find any resource online about this and if no :scream:, then what else can I do, please help me :face_holding_back_tears:, I am stuck in this black hole.

Hey there @R.Pranay! Welcome back to the community! This would be possible with very small models, but would require significant technical knowledge to do. It’s much easier integrating API calls to a cloud provided LLM while not always the cheapest option. There aren’t too many resources available, but here’s a couple I could find as well as a (paid) plugin that seems to do the same.

Resources:

Disclaimer: One or more of these links are unaffiliated with Epic Games. Epic Games is not liable for anything that may occur outside of this Unreal Engine domain. Please exercise your best judgment when following links outside of the forums.