Comments (8)
help! i have the same problem
from bard-api.
Hello, Epiczhul이, zoomingspeed
Could you please inform me of the version of the Bard API you are using that is experiencing this issue?
Also, I would like to recommend a slight modification to your code as follows. The reason is that the API is designed to return complete information deliberately, and it is recommended to use either ai_response.content
or ai_response['content']
instead of just ai_response
.
If you only pass the content, you will miss out on other important information. This includes various responses under 'choice' and 'conversation_id', which is crucial for maintaining the context of the conversation.
Please try using the following.
# AI TEST
@bot.slash_command(name="ai", description="Get a response from Google Bard's AI")
async def ai(ctx, *, text):
ai_response = bard.get_answer(text)
await ctx.defer()
await asyncio.sleep(30)
await ctx.followup.send(f"**AI RESPONSE MIGHT BE INACCURATE, WE ARE NOT RESPONSIBLE FOR INACCURATE RESPONSES FROM THE AI CHATBOT:**\n\n```{ai_response['content']}```")
from bard-api.
@dsdanielpark i did not think of this thank you, i have not tested it but if it does not work i will let you know. I do want to ask though, have you finished programming the auto rotating cookies and if it is done, will the cookies automatically be generated the minute we run our program or do we have to get a cookie first and place it, THEN it rotates?
from bard-api.
szv99 has implemented it, but it seems to involve inserting the token value initially, and then obtaining the cookie value that updates thereafter. Therefore, it might be a partial solution, but I think it would be difficult for the cookie to update completely automatically.
Try asking szv99 about it.
from bard-api.
@dsdanielpark would this work on a proxy server? i use a server to host my discord bot and it runs a basic python environment. this is the host i use: https://divahosting.net/
from bard-api.
You can use this behind a porxy examples.
from bard-api.
@dsdanielpark and if i did Bard(token_from_browser=True)
along with the behind a proxy example, it would work?
from bard-api.
It still works under limited conditions, but does not operate when hosted on a server. Since it is implemented from the following package, I recommend examining the logic. In fact, the cookie auto-update logic that will be updated soon might be more effective. If you are interested, please take a look at the following PR. #235
from bard-api.
Related Issues (20)
- 'BardAsync' object has no attribute 'SNlM0e' after update to latest version at github HOT 13
- TypeError: AsyncClient.post() got an unexpected keyword argument 'proxies' HOT 2
- Is Bad API currently available? HOT 2
- Is there any way to reuse same session with multicookie Bard? HOT 1
- Receiving 404 error HOT 1
- TypeError: Too many arguments for typing.List; actual 2, expected 1 HOT 1
- My __Secure-1PSID is a long string starting with "g." instead of a string ending with dot "." HOT 6
- Google Official API
- The responses from the API differ from those in the Bard browser
- max_sentence() prints result instead of returning it HOT 2
- ChatBard: token_from_browser HOT 9
- ImportError: cannot import name 'BardCookies' from partially initialized module 'bardapi' (most likely due to a circular import) HOT 6
- Some code errors in README examples , os module import HOT 4
- Bard __SECURE-1PSID does not match HOT 2
- Exception: SNlM0e value not found. Double-check __Secure-1PSID value or pass it as Bard(token='xxxxx') HOT 1
- Google changed the the way "__Secure-1PSID" looks, how to use this package effectively,the cookie values does not end in '.' period now HOT 8
- Multiple-Cookies has been changed. HOT 15
- Image generation HOT 4
- Google renames its chatbot Bard to Gemini HOT 41
- Gemini Ultra? HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bard-api.