Closed Jucamhc closed 1 year ago
same
Duplicate of https://github.com/EvanZhouDev/bard-ai/issues/31
/node_modules/bard-ai/index.js:29 else throw new Error("Could not get Google Bard."); ^
with version "bard-ai": "^1.5.4", same
I've heard that this may be because your account should be using another cookie... this feature will be implemented in v2. Please hold on...
Yes, now the needed cookies are: __Secure-1PSID
and __Secure-1PSIDTS
See my working implementation: https://github.com/thisago/bard/blob/master/src/bard.nim#L76
But the __Secure-1PSIDTS
expires so fast, then I made this lib to workaround this: https://github.com/thisago/gookie
Hmm... looks like they're forcing us to use the PaLM API... time to migrate I guess...
for what I want. my dirty workaround works well, but for larger projects, an api is better; but migrating to an paid API is very divergent from an open source lib that uses the internal API for free
~I know. But the bigger question: How does Google do it (and why can't we do it)?~
EDIT: That was a silly question...
how they make harder the use of internal API?
Use of __Secure-1PSIDTS
is coming in version 2... I've heard that if you don't refresh the bard.google.com page, it doesn't change the key, so that might be a solution?
Either way, stay tuned to #30, the Feature Tracker for version 2. I'll be closing this, but feel free to reopen.
With my tests, with my cli bard app, some times the session expires, but this app can regain with my dirty workaround. I'll test more.
Also, I tested getting the __Secure-1PSIDTS
cookie, getting SNlM0e
(with lib) and refreshing a google bard page in browser and session still works, I think that it expires with time
I tested by 1 hour and 40 minutes with same session and it didn't expired
There's no way for it to expire on the same session, I don't think. Setting a timer for cookie expiration seems like a bad idea 😅.
/bard-ia/node_modules/bard-ai/index.js:29 else throw new Error("Could not get Google Bard."); ^