import openai from messages import krishna_blessings from ayush_messages import ayush_surprises openai.api_key = os.getenv("OPENAI_API_KEY") def get_krishna_response(user_input): if "birthday" in user_input.lower(): return ayush_surprises["birthday"] if "shy" in user_input.lower(): return "Hare Manavi! I hid from the gopis too—quiet time is golden like my butter!" prompt = ( "You are Little Krishna, playful and wise. Respond to this in a fun, Krishna-like way: " f"'{user_input}'" ) response = openai.Completion.create( engine="text-davinci-003", prompt=prompt, max_tokens=60, temperature=0.9 ) return response.choices[0].text.strip()