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.
Hi,
May I know the documentation that you are following?
Thanks!
you have to use the `Part.from_text("str")` APIs
```
User | Count |
---|---|
2 | |
2 | |
1 | |
1 | |
1 |