Skip to main content

One doc tagged with "Gemini API"

View all tags

Preserve Chat Configuration Updates

When working with the Gemini API's chat functionality, it's common to initialize a chat session with specific parameters such as temperature, maxoutputtokens, systeminstruction, and an initial history. A challenge arises when you later want to dynamically update only the temperature and maxoutputtokens without losing the previously set systeminstruction or the accumulated conversation history.