79340753

Date: 2025-01-08 21:10:50
Score: 2.5
Natty:
Report link

While it is true that gemini generate_content api doesn't store any data. So that you have to send entire chat history by yourself.

However gemini does provide chat_session api. During an active chatSession object, gemini remembers the full conversation history.

Usage example -

chatSession = genai.GenerativeModel("gemini-pro").start_chat()
print(chatSession.send_message("Can you suggest me a new game?").candidates[0].content.parts[0].text)
print(chatSession.send_message("Tell me about yourself").candidates[0].content.parts[0].text)
print(chatSession.send_message("Do you remember what all Role-playing games you had suggested me?").candidates[0].content.parts[0].text)
Reasons:
  • RegEx Blacklisted phrase (2.5): Can you suggest me
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: pragati