Hi everyone!
I’m confused about on API documentation on Build an interactive chat
Gemini API Docs - Build an interactive chat
My goal is to have multiple rounds of questions and responses for my app users. From the documentation, Gemini’s startChat
seems to require some initial input, to establish the chat session. How do I initiate an interactive chat with the Gemini API using startChat
without any previous messages as context? With OpenAI, I can simply pass an empty array to start a fresh chat. Is there an equivalent way to do this with Gemini?
This is the detailed documentation of the ChatSession
object. It explains the history
attribute within ChatSession
, which stores the conversation history.
github generative-ai-python/docs/api/google/generativeai/ChatSession.md
Thank you in advance for your insight!