Getting alternative responses with API

How can Gemini be requested via the API (Python) to generate an alternative response to the last prompt in a chat?

1 Like

In that case, we can request alternative responses from Gemini API in python by recalling the same prompt with candidate_count >1.