I tried to create a chatbot using the chatbot component and sometimes it works and sometimes it returns an error 4200: Error from the ChatBot code 404 PaLM did not return a response: missing field 'candidates' at line 13 column 1. Please help
Community discussions links about ChatBot might help you.
Search results for 'chatbot' - MIT App Inventor Community .
Show your code and someone might provide specific advice . Perhaps you have exceeded your free limit of queries.
Refer to ChatBot.
and section on PaLm in this article chatbot/imagebot
TL;DR
This error literally means that PaLM just didn't return any response, it normally returns an array named "candidates" that contains potential responses.
More Details
As mentioned above, PaLM should return an array of candidate answers. We ask it to only give us one, but it still returns them in an array. My code, in the ChatBot proxy, was written to expect an empty array when PaLM doesn't provide an answer. However, it turns out that PaLM just doesn't return the array at all. So the error you see is from my parsing code getting tripped up by not having an array at all.
However, the bottom line is that PaLM just plain didn't return an answer. There is an error code returned (which is not being passed on, see previous paragraph). But when I was doing testing, this code is typically just OTHER. This doesn't tell us much.
I will fix my code to give a more meaningful answer. The proxy itself is under active development, mostly to provide more "providers" and models. I may not get the candidate array changed until the next release of the proxy.
As to why PaLM didn't return an answer, I have no idea. In my testing, it just sometimes doesn't answer, even when the query is pretty innocuous!
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.