Evalkeeper
    Preparing search index...

    Function caseFromFeedback

    • A draft case from a rating, for a person to finish. A thumbs down has no answer yet: the person writes what a good one is. A thumbs up proposes the model's own answer, pending until a person confirms it. Never confirmed on anyone's behalf. Null when it can't become a case (whyNotACase says why in plain words, including when the store keeps no inputs at all).

      Parameters

      Returns NewCase | null

      const suite = SUITES.find(
      (s) => s.operation === rating.operation && !isInjectionSuite(s),
      );
      const draft = suite ? caseFromFeedback(rating, suite) : null;
      if (draft) await store.createCase(draft);