Giter Club home page Giter Club logo

Comments (8)

Epiczhul avatar Epiczhul commented on June 3, 2024

help! i have the same problem

from bard-api.

dsdanielpark avatar dsdanielpark commented on June 3, 2024

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.

zoomingspeed avatar zoomingspeed commented on June 3, 2024

@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.

dsdanielpark avatar dsdanielpark commented on June 3, 2024

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.

zoomingspeed avatar zoomingspeed commented on June 3, 2024

@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.

dsdanielpark avatar dsdanielpark commented on June 3, 2024

You can use this behind a porxy examples.

from bard-api.

zoomingspeed avatar zoomingspeed commented on June 3, 2024

@dsdanielpark and if i did Bard(token_from_browser=True) along with the behind a proxy example, it would work?

from bard-api.

dsdanielpark avatar dsdanielpark commented on June 3, 2024

zoomingspeed

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

browser_cookie3

from bard-api.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.