Feedback Aide API Methods
generateFeedback()
This method will stream a fetch request and will update the UI (built by attach method above) progressively.
You would want to use this to request our Feedback Aide server to generate feedback and score based on the current session's stimulus, response, and rubric.
Note This process can only be run once. Any subsequent call will return the previously completed result.
Note This method is not available for feedbackSession state: review.
Examples
const { response, cancel } = feedbackSession.generateFeedback(modelConfiguration, options);
// Continue waiting for the promise to resolve
response.then((result) => {
console.log(result)
});
// Or cancel the current process
cancel();
Arguments
-
modelConfiguration object
The AI model configuration object.
-
model string
The AI model to use for generating feedback.
Accepts the followings:
standard-essay
standard-essay-2024-06-30
advanced-essay
advanced-essay-2024-06-30
-
-
options object
-
onProgress callback
Callback function for progress updates.
-
onComplete callback
Callback function for completion updates.
-
onError callback
Callback function for error handling.
-
Return value
Type object
-
response Promise
The current generating feedback promise.
-
cancel function
Used to cancel the current process.