Closed mdatiqmazumder closed 2 months ago
I'm not entirely clear on your use case and objectives. I'm unsure if this will work, but you can try it. Alternatively, you could save the properties of the session and transfer them. The only thing you need to do is modify it by adding the reqid.
from gemini import Gemini
client = Gemini(cookies=cookies)
client.generate_content("Hi, gemini?")
# Save the params
saved_sid = client ._sid # session id
saved_rcid = client ._rcid # response candidate id
saved_rid = client ._rid # response id
saved_cid = client ._cid # candidate id
saved_reqid = cliend._reqid + 100000 # request id
# Try to use same session
client = Gemini(cookies=cookies)
client ._sid = saved_sid
client ._rcid = saved_rcid
client ._rid = saved_rid
client ._cid = saved_cid
cliend._reqid = saved_reqid
client.generate_content("Hi, what was my last prompt?")
i want to reuse previour chat session...i dont understant how to do it or how i can use rcid.please help me