How to use the fine-tuned model in Node chatbot

Hi,
I created a fine-tuned model to include in my existing chatbot application. Previous the chatbot was just working fine on a davinci engine. How do I use the fine-tuned model in Node? When I use my existing code, the model doesn’t send a result back and there’s no error. I feel like I am missing something. Thanks for any help!

function complete(incomingMsg) {
  let response;
  let prompt;
  const apiKey = process.env.OPENAI_API_KEY;
  const client = axios.create({
  headers: { 'Authorization': 'Bearer ' + apiKey }
  });
  const endpoint = "https://api.openai.com/v1/engines/davinci/completions";
  prompt = generatePrompt(incomingMsg);

  const params = {
  prompt,
  temperature: 0.9,
  max_tokens: 64,
  top_p: 1,
  model: "curie:ft-personal-2022-05-01-13-44-XXX",
  stop: ["Human:"],
  Inject_start_text:["\n, AI:"],
  Inject_restart_text:["\n, Human:"],
  }

  client.post(endpoint, params)
  .then(result => {
  response = result.data.choices[0].text;
  io.emit('answer', result.data.choices[0].text);
  console.log(result);
  sessionChatLog = `${prompt}${response}`;
  }).catch(err => {
  console.log(err);
  });
}

I didn’t try before but i guess you should use

curl https://api.openai.com/v1/completions \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"prompt": YOUR_PROMPT, "model": FINE_TUNED_MODEL}'

as specified https://beta.openai.com/docs/guides/fine-tuning