Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error generating thought for cell #6

Open
dustinsievers opened this issue Dec 8, 2024 · 10 comments
Open

Error generating thought for cell #6

dustinsievers opened this issue Dec 8, 2024 · 10 comments

Comments

@dustinsievers
Copy link

Why would I be getting a similar error to this almost all of the time? What does this mean?

Warning: Failed to parse any thoughts from response
Generated 0 throughts
[ERR//CRITICAL] >> Error generating thought for cell ####-##-##-####: Failed to generate thought

@yod22
Copy link

yod22 commented Dec 8, 2024

Did you ever find a solution to this?

@dustinsievers
Copy link
Author

Did you ever find a solution to this?

@yod22 - No, I haven't, but I'm starting to believe it is because I don't have any OpenRouter credits or payment methods setup yet. But I had thought I read that there would be some free usage at first. But since I didn't see any activity on OpenRouter's site, I'm still not really sure. Once I have some free time to dig in again, I will, but was hoping someone on the development team could provide a pointer.

@dustinsievers
Copy link
Author

dustinsievers commented Dec 8, 2024

@yod22 - I'm still figuring out the codebase but here is what I did to keep it running despite this issue. In src/models/plan_analysis.rs, at line 47 there is 'let best_plan' etc. I changed it from this:

let best_plan = plans.iter() .max_by(|a, b| a.score.partial_cmp(&b.score).unwrap());

Modified line: using unwrap_or to handle None case from partial_cmp
to this:

let best_plan = plans.iter() .max_by(|a, b| a.score.partial_cmp(&b.score).unwrap_or(std::cmp::Ordering::Equal));

@yod22
Copy link

yod22 commented Dec 8, 2024

Did you ever find a solution to this?

@yod22 - No, I haven't, but I'm starting to believe it is because I don't have any OpenRouter credits or payment methods setup yet. But I had thought I read that there would be some free usage at first. But since I didn't see any activity on OpenRouter's site, I'm still not really sure. Once I have some free time to dig in again, I will, but was hoping someone on the development team could provide a pointer.

I have credits in my account and had it working but now it's back to not being able to generate thoughts. I'll post any fixes I find

@dustinsievers
Copy link
Author

@yod22 - Awesome, thanks. I'm really looking forward to fully digesting and modifying this codebase to do something I can benefit from. Much appreciation.

@yod22
Copy link

yod22 commented Dec 8, 2024

Your code worked! I put a few more credits in the account and it's running again.

@dustinsievers
Copy link
Author

dustinsievers commented Dec 8, 2024

Well, my code will treat any non-comparable scores as equal, allowing max_by to proceed without panicking. partial_cmp(&b.score) returns None if a.score or b.score is a NaN (Not a Number) value. Floating-point NaN values do not have a defined order and thus cannot be compared reliably. If that happens even once, unwrap() will panic.

But I was thinking that this wasn't truly a fix... merely just a way to allow the code to keep running. Because for me, I believe I am still getting these messages: [ERR//CRITICAL] >> Error generating thought for cell ####-##-##-####: Failed to generate thought

Are you saying that after you added credits, you are no longer seeing these messages?

@mikiad-ai
Copy link

I am also getting this error message. I added credits to my Openrouter Account but it sill wont generate thoughts. Which LLMs are you using through the Openrouter API?

@yod22
Copy link

yod22 commented Dec 11, 2024

I'm using Grok but going to change as it's way too expensive. It seems to stop comms with the creature if your openrouter acct has less then $3 in credits

@yod22
Copy link

yod22 commented Dec 11, 2024

Yes after running your code and adding more creits it's been running without any thought errors. I have noticed it;s repeating itself so not sure if it's actually generating any real thoughts...if that makes sense

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

No branches or pull requests

3 participants