onvertImageToBase64Sync(file) {
          return new Promise((resolve, reject) => {
            const reader = new FileReader();
            reader.onload = () => resolve(reader.result);
            reader.onerror = (error) => reject(error);
            reader.readAsDataURL(file);
          });
        }

        // Search form
        document
          .getElementById("searchForm")
          .addEventListener("submit", async function (e) {
            e.preventDefault();

            const prompt = docume