Skip to content
This repository has been archived by the owner on Apr 24, 2024. It is now read-only.

Fix misc #273

Merged
merged 4 commits into from
Feb 6, 2024
Merged

Fix misc #273

merged 4 commits into from
Feb 6, 2024

Conversation

jjkoh95
Copy link
Contributor

@jjkoh95 jjkoh95 commented Feb 5, 2024

Fix misc async client issue

  1. Newer tokens don't necessarily end with token (it happened on me)
    • Understand that this is merely logging, happy to revert back if we need this message
  2. async_setup() should initialize client first
  3. Use back old regex for SNlM0e, the updated version throw me error, however by reverting to the old regex format, it works fine for me, sorry if this is a breaking thing, I guess we can check both if we want to be safe.

Description

Mentioned above.

Related Issue

  • N/A

Motivation and Context

I updated to the latest version and it was breaking.

How Has This Been Tested?

  1. installing bardapi
poetry add --no-cache git+https://github.com/jjkoh95/Bard-API.git#fix-misc
# or
pip install git+https://github.com/jjkoh95/Bard-API.git#fix-misc
  1. my code snippet
        bard_client = BardAsync(bard_cfg.psid)
        if bard_cfg.psidts: bard_client.cookie_dict["__Secure-1PSIDTS"] = bard_cfg.psidts
        if bard_cfg.psidcc: bard_client.cookie_dict["__Secure-1PSIDCC"] = bard_cfg.psidcc
        await bard_client.async_setup()

        result = await bard_client.ask("Hello")
        print(i, result.drafts[0].text)
  1. result
    image

Screenshots (if appropriate):

Mentioned above

Thank you once again to all the contributors. Your efforts are greatly appreciated!

@dsdanielpark dsdanielpark merged commit bba3c05 into dsdanielpark:main Feb 6, 2024
2 checks passed
@dsdanielpark
Copy link
Owner

Thank you for your contributions. I will check and make some modifications.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants