model = GenerativeModel("gemini-1.0-pro", generation_config={"temperature": 0}, tools=[retail_tool])
context = [
Content(role = "user", parts = [
Part(text = "System prompt: You are an assistent who can process json and answers off that."),
Part(text = f"json is provided here {json.dumps(data)}")
]),
Content(role = "model", parts = [Part(text = "understood")])
]
chat2 = model.start_chat(history = context)
I am not able to provide history to start chat conversation. Getting following error:
ValueError: history must be a list of Content objects.
I am passing content object in the array but its not happy. Ideally this method should have accepted a list of dict anyways to keep it simple. Any idea how to solve it?