-
-
Notifications
You must be signed in to change notification settings - Fork 526
'BardAsync' object has no attribute 'SNlM0e' after update to latest version at github #253
Comments
i rollback to version 0.1.30. everything working fine |
confirmed this worked. |
We are currently overhauling bard async on the GitHub dev version. It will be a bit more organized in version 0.1.39. |
By |
Before updating to PyPI, we conveniently refer to the main branch of the GitHub version as the 'dev' version. Please download and install from the GitHub repository. Once debugging is complete, we upload the official version to PyPI. We are preparing version
|
I will check |
The original issue is on the GitHub version though. I don't know about the PyPI version but the async class in GitHub version is completely unusable. |
I agree with your opinion. |
The current PyPI version ( 0.1.38 ) is faulty. the older 0.1.30 is still the only one that works. I just checked this morning. |
This issue has been resolved in bardapi version 0.1.39. Thank you for reporting the issue. Bard API - version 0.1.39
from httpx import AsyncClient
from bardapi import BardAsync
import os
# Uncomment and set your API key as needed
# os.environ['_BARD_API_KEY'] = 'xxxxxxx'
token = 'xxxxxxx' # Replace with your actual token
SESSION_HEADERS = {
"Host": "bard.google.com",
"X-Same-Domain": "1",
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.114 Safari/537.36",
"Content-Type": "application/x-www-form-urlencoded;charset=UTF-8",
"Origin": "https://bard.google.com",
"Referer": "https://bard.google.com/",
}
timeout = 30 # Example timeout
proxies = {} # Replace with your proxies if needed
client = AsyncClient(
http2=True,
headers=SESSION_HEADERS,
cookies={"__Secure-1PSID": token},
timeout=timeout,
proxies=proxies,
)
bard_async = BardAsync(token=token, client=client)
# Asynchronous function to get the answer
async def get_bard_answer(question):
await bard_async.async_setup() # Ensure async setup is done
return await bard_async.get_answer(question)
response = await get_bard_answer("나와 내 동년배들이 좋아하는 뉴진스에 대해서 알려줘")
print(response['content']) |
it works, thank you :) |
Thank you for your support. It has been a great help. Also, you are welcome to contribute at any time by addressing new issues or refactoring packages. We always look forward to your participation in the community. Thank you. |
thank you sir |
my code:
bard = BardAsync(token=tokenBard)
jawaban = await bard.get_answer(q)
previously it was running normally before I updated the version
The text was updated successfully, but these errors were encountered: