Closed rakyll closed 4 months ago
Can't you do all that with a ChatSession
?
ChatSession
is what I was looking for. I realized we created similar new concepts and semantics on other language libraries that looks distinct from the proto.
I believe it is too late right now to have a conversation for breaking changes at a massive scale to remove these utilities and semantics. I'm going to close this issue for now.
Description of the feature request:
Consider the following code:
What problem are you trying to solve with this feature?
GenerateContent
should be accepting contents rather than parts per proto, see https://ai.google.dev/api/generate-content#method:-models.generatecontent.Not being able to provide a slice of content objects is making it impossible to provide roles or the conversation history, and making the client unusable for chat applications.
Please fix the GenerateContent method to work with Content objects as arguments.
Any other information you'd like to share?
We should consider breaking
GenerateContent
to land this fix. Content role and history is a very critical part of the chat exchanges and all the foundational model providers seem to be primary converging into a chat-focused API and client libraries.