 the chatbot and display the conversation
function handleServerMessage(event) {
  // Extract the received text message from the event object
  const receivedText = event.data;
  // Ask the chatbot the received question
  askQuestion(receivedText);
}

    // Periodically fetch the latest log entries and append them to the chatbox
    async function updateChatbox() {
      try {
        const response = await fetch('http://localhost:5000/log');
        const logEntries = await response.json();
        // Appe