Merging Search History into Conversations in Google Gen AI SDK

In google-generativeai, it was possible to use the search function while retaining the retrieved information as part of the regular conversation history and memory. However, in the new google-genai SDK, standard conversations and search functions appear to be structured separately. Due to this change in design, it seems that the memory of conversations involving the search function can no longer be included in regular conversations.

Are there any possible workarounds to address this issue? Additionally, is there any chance that future SDK updates will improve this functionality?

Hey @yuki , Welcome to the forum.

I am not really sure if I understand the question correctly, but with the new google-genai SDK, I was able to include both the regular conversation history and the conversation history coming from the Google search tool, and initialize a new chat.

Let me know if my understanding is wrong. If possible, could you also provide working and non-working code? That would really help.