In the previous version, we could start a new chat using chat:
chat = model.start_chat(history=chat_history) where, we would add the history as a parameter or leave it blank.
But in the new sdk,
chat = client.chats.create(
model=MODEL_ID,
config=types.GenerateContentConfig(
system_instruction=system_instruction,
temperature=0.5,
),
)
There is no parameter for chat history.
It’s a pre-defined type that can have one or multiple various parts according to the documentation.
Most likely it will be messages with alternating roles - user and model - to mimic a conversation between the user’s prompts and the model’s response.
See documentation for more. Or use AI Studio with a Chat and a conversation. Then hit the “Get code” button to see how it is structured.