Open brinrbc opened 1 year ago
Do you have a SERPAPI_API_KEY defined in your .env
file?
Hi @brinrbc - thanks for raising this issue. This project is intended for educational purposes, to help you learn how to create 'chain of reasoning' applications with LLM. It isn't designed to be production ready. As a result, the code lacks any error checking :-)
This is your opportunity to learn! Clearly the OpenAI API has not returned the expected result. I'd recommend adding a console.log
or breakpoint at that line of code to find out what it returned instead. It will likely be an error message (perhaps a lack of API as @MikeRalphson pointed out), that you can then debug.
Do you have a SERPAPI_API_KEY defined in your
.env
file?
if we are talking about this Api key 2996*...3f96df from this address https://serpapi.com/manage-api-key , then yes, it is.
Hi! Thank you very much for your work. Please tell me which way to look. When I start, I get this error, I see the problem, but I can't figure out what to do.
The line index.mjs:59 says
.then((res) => res.choices[0].text)