import google.generativeai as genai
# Configure your API key
genai.configure(api_key="AIzaSyDs2Bm-7Ta_Mk1RHZdgajuE9K8yyQIrsis")
# Use Gemini 1.5 Flash (fast and has free tier)
model = genai.GenerativeModel(model_name="gemini-1.5-flash")
# Start a chat session
chat = model.start_chat()
# Initial memory/personality prompt
chat.send_message("You're a chill, supportive AI mentor. Help me grow emotionally, mentally, and physically.")
# Start interactive loop
while True:
user_input = input("You: ")
if user_input.lower() in ["exit", "quit", "bye"]:
print("Gemini: See ya! 💬")
break
try:
response = chat.send_message(user_input)
print("Gemini:", response.text)
except Exception as e:
print("Error:", e)
0 Response to " "
Post a Comment