The response is recevied even when you have "viable" code. The issue lies in the code not being in JavaScript.
This can be attributed to the model being used and/or its parameters ("tinyllama").
At present, physical limitations may affect ability to successfully resolve issue.