Inform history when analyzing a document

Hi everyone.

Is it possible to keep the history while asking question about a filePart (e.g. a uploaded PDF)? Cause generateContent() doesn’t accept the history parameter, and startchat() doesn’t accept the filePart.

Thanks.

Welcome to the forum. The start_chat() and chat.send_message() methods support parts (list of Part), one or more of which can be a filePart. And they maintain history. They should fulfill your requirements.

Hope that helps.

1 Like