ChatGPT Clone tutorial

Hi, I am currently following a ChatGPT clone tutorial on the internet: https://www.youtube.com/watch?v=WfkNKbz32XY&ab_channel=PlanetNoCode
Everything works, however when I send the second message, in case of the tutorial “Tell 5 place to visit there” I get an HTTP400 error:

Schermafbeelding 2023-11-27 202009
Schermafbeelding 2023-11-27 201955

I have shared all the codes here below, is there anyone who can tell me what I did wrong? My assumption is something with the Do a search for button, however till now I couldn’t figure it out. Code: