#cant send parameter to API route

5 messages · Page 1 of 1 (latest)

stark ice
#
    return new Response("No prompt in the request", { status: 400 });
  }```
#

you are saying if there is no prompt or there are max tokens then return status 400?

iron summit
stark ice
#

Change useState to a number

#

You are passing a string right now. Also console.log it