Git Product home page Git Product logo

Comments (9)

nattyraz avatar nattyraz commented on August 19, 2024 1

Anyone know how to solve this loop?

Insuffient memories. Now learning...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I delete my SERPAPI_API_KEY and is working now.... Not sur wy, but is Working !

from ai-brainstore.

nattyraz avatar nattyraz commented on August 19, 2024 1

@CryptoLibertus I delete my SERPAPI_API_KEY and is working now.... Not sur wy, but is Working !

from ai-brainstore.

CryptoLibertus avatar CryptoLibertus commented on August 19, 2024 1

well its strange but it does work now. I got a bunch of the same but then got an answer. Might be something related to Chroma.

from ai-brainstore.

r-fumachi avatar r-fumachi commented on August 19, 2024 1

your key should be here https://serpapi.com/manage-api-key

from ai-brainstore.

nattyraz avatar nattyraz commented on August 19, 2024

Anyone know how to solve this loop?

Insuffient memories. Now learning...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

I made a mistake. Trying again...

yes i got the same issue ...

from ai-brainstore.

nattyraz avatar nattyraz commented on August 19, 2024

well its strange but it does work now. I got a bunch of the same but then got an answer. Might be something related to Chroma.

it work for me, but is verry slow...
can we add a other api? whiteout adding to much code ?

from ai-brainstore.

r-fumachi avatar r-fumachi commented on August 19, 2024

I also had this issue.
At first it was because of a wrong SerpApi key, and then it was because I wasn't providing a "clear question".

console.log(chalk.red("\nI made a mistake. Trying again..."));

Debug logs are helpful to figure out what is actually causing the loop.

    catch (e) {
        console.log("Error", e.stack);
        console.log("Error", e.name);
        console.log("Error", e.message);
        console.log(chalk.red("\nI made a mistake. Trying again..."));
        return answerFromSearch(brain, input);
    }

For example when you don't provide a question, the error is

I made a mistake. Trying again...
Error Error: Unable to parse JSON response from chat agent.

I'm sorry, but the input "gg" is not a clear question or request. Please provide a valid input that I can help you with.
    at ChatAgent.extractToolAndInput  

And when your key is wrong then the error is

I made a mistake. Trying again...
Error Error: Got error from serpAPI: Invalid API key. Your API key should be here: https://serpapi.com/manage-api-key
    at SerpAPI._call 

I'd make the bot output the error message and then just allow the user to ask another question instead of this endless "made a mistake" loop

from ai-brainstore.

nattyraz avatar nattyraz commented on August 19, 2024

hi

I also had this issue. At first it was because of a wrong SerpApi key, and then it was because I wasn't providing a "clear question".

console.log(chalk.red("\nI made a mistake. Trying again..."));

Debug logs are helpful to figure out what is actually causing the loop.

    catch (e) {
        console.log("Error", e.stack);
        console.log("Error", e.name);
        console.log("Error", e.message);
        console.log(chalk.red("\nI made a mistake. Trying again..."));
        return answerFromSearch(brain, input);
    }

For example when you don't provide a question, the error is

I made a mistake. Trying again...
Error Error: Unable to parse JSON response from chat agent.

I'm sorry, but the input "gg" is not a clear question or request. Please provide a valid input that I can help you with.
    at ChatAgent.extractToolAndInput  

And when your key is wrong then the error is

I made a mistake. Trying again...
Error Error: Got error from serpAPI: Invalid API key. Your API key should be here: https://serpapi.com/manage-api-key
    at SerpAPI._call 

I'd make the bot output the error message and then just allow the user to ask another question instead of this endless "made a mistake" loop

hi @r-fumachi , i got my API key from = https://serper.dev/api-key, and is should work.....
did't you fix it ?

from ai-brainstore.

nattyraz avatar nattyraz commented on August 19, 2024

your key should be here https://serpapi.com/manage-api-key
yes !! your are a master !! thx

from ai-brainstore.

Related Issues (12)

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.