Prompt Temperature to Randomness Scale

Randomness Level: ${match.label}

${match.desc}

`; randomResult.style.display = "block"; } }; window.downloadRandomnessPDF = function () { const { jsPDF } = window.jspdf; const temp = parseFloat(tempInput.value); if (isNaN(temp) || temp < 0 || temp > 1) { alert("Please enter a valid temperature first."); return; } const match = scaleMap.find(range => temp >= range.min && temp <= range.max); const pdf = new jsPDF(); pdf.setFontSize(16); pdf.text("Prompt Temperature to Randomness Scale", 105, 20, { align: "center" }); pdf.setFontSize(12); pdf.text(`Temperature Value: ${temp.toFixed(2)}`, 20, 40); pdf.text(`Mapped Randomness Level: ${match.label}`, 20, 50); const descLines = pdf.splitTextToSize(match.desc, 170); pdf.text("Interpretation:", 20, 60); pdf.setFontSize(11); pdf.text(descLines, 20, 70); pdf.save("prompt-randomness-scale.pdf"); }; });
Scroll to Top