import google.generativeai as genai
def main():
genai.configure(api_key='API_KEY')
model = genai.GenerativeModel('gemini-pro')
chat = model.start_chat(history=[])
while True:
prompt = input('あなた: \n')
if prompt == 'exit':
break
print("_"*80)
response = chat.send_message(prompt, stream=True)
print('Gemini: ')
for chunk in response:
print(chunk.text)
print("_"*80)