How to add parameter in inference endpoint?

How to add parameter in inference endpoint(not inference API)?
Here is my code:

        self.API_URL = url
        self.headers = {"Authorization": f"Bearer {open('config/hugging_face.txt').read()}", 'Content-Type': 'application/json'}
        
    def get_answers(self, input, n):
        data = json.dumps({"inputs": input, "parameters": {"return_full_text": False, "num_return_sequences": n, "do_sample": True}})
        response = requests.request("POST", self.API_URL, headers=self.headers, data=data)
        return [output['generated_text'] for output in json.loads(response.content.decode("utf-8"))]

Anyway, it keeps returning a sequence, instead of 5(n = 5).
Help appreciated!

is only supported with beam search.

How can I turn beam search on in inference endpoint? looks as if I don’t need to turn it on in inference API.