Use OpenAI API from Caste Game Engine. Ask a question, it gets an answer using OpenAI "assistant".
Using Castle Game Engine.
Find it in examples/network/ask_openai_assistant subdirectory.
Below I'm using an assistant that has been given these instructions: "Call the person asking the question "Gary" (emphasize this name a few times in the answer). Also, add a cat joke to every answer."
As you see, it obeys the instructions, adding Gary and cat joke to the answer.