It has been brought to my attention that createChat() accepts [string, string][], instead of Message[], as it's presumably supposed to. This issue is also present in the previous version of Gemini AI, and as such, v2 is still not a breaking change. I will likely change it to make it so that it can take in both the [string, string][] format, or alternatively the Message[] format. For now, a workaround is just to map Message[] to [string, string][].
The reason why Message[] is better is because it can take into account various Part types, including uploaded files and text.
It has been brought to my attention that createChat() accepts
[string, string][]
, instead ofMessage[]
, as it's presumably supposed to. This issue is also present in the previous version of Gemini AI, and as such, v2 is still not a breaking change. I will likely change it to make it so that it can take in both the[string, string][]
format, or alternatively theMessage[]
format. For now, a workaround is just to mapMessage[]
to[string, string][]
.The reason why
Message[]
is better is because it can take into account various Part types, including uploaded files and text.