API zu KI
VR Ocu.Motion – KI Befundinterpretation
Report-ID eingeben:
Interpretation abrufen
Ergebnis:
function requestInterpretation() {
let reportId = document.getElementById(„reportId“).value;
fetch(‚/wp-json/talkingeyes/v1/interpret‘, {
method: ‚POST‘,
headers: { ‚Content-Type‘: ‚application/json‘ },
body: JSON.stringify({ „report_id“: reportId })
})
.then(response => response.json())
.then(data => {
if (data.interpretation) {
document.getElementById(„result“).innerHTML = „KI-Interpretation: “ + data.interpretation;
} else {
document.getElementById(„result“).innerHTML = „Fehler: “ + data.error;
}
})
.catch(error => {
document.getElementById(„result“).innerHTML = „Fehler beim Abrufen der Interpretation.“;
});
}