generateFeedback - Methods - Feedback Aide API

Feedback Aide API Methods

generateFeedback()

Generate feedback and scoring based on the current session's stimulus, response, and rubric.

You would want to use this when you are building your own application interface for Feedback Aide, where you already have your own user interface and rubric, for example.

This method will stream a fetch request and progressively update the user interface which has been built by attach method.

Note this process can only be run once. Any subsequent call will return the previously completed result.

Note this method is not available when the feedbackSession state is "review".

Examples

const { response, cancel } = feedbackSession.generateFeedback();
// 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.

      Possible values

      • "standard-essay"
      • "standard-essay-2024-06-30"
      • "standard-essay-moderation"
      • "advanced-essay"
      • "advanced-essay-2024-06-30"
      • "advanced-essay-moderation"
  • 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.

Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.