// src/services/openaiService.js
export async function perguntarOpenAI(mensagem) {
  const resposta = await fetch("http://localhost:5000/api/chat", {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({ message: mensagem }),
  });

  const data = await resposta.json();
  return data.reply;
}
