If you are using the old Formamorph program for your AI's and the AI is something like Mistralai, then you need to have your game text prompts written in Jinja.
I'll go ahead and post my own Jinja prompts in How to run a local AI for Formamorph, https://itch.io/t/4579794/how-to-run-a-local-ai-for-formamorph?before=25 so others can stop getting the 400 error.