= [] for snapshot in vector_query.get(): text_chunk = snapshot.get("chunk") history.append(Content(role="model", parts=[Part.from_text(text_chunk)])) history.append(Content(role="user", parts=[Part.from_text(query.query)])) responses = generation_model.generate_content( contents=history, generation_config={ "max_output_tokens": 8192, "temperature": 1, "top_p": 0.95, }, )