DecisionResponse

A decision model's answers, one row per question: the answer, the confidence and a probability bar for every option or level; a box drawn on its image.

View source
  1. is_invoiceYes/no
    Yes97%
    No3%
  2. teamConfidence 84%Choice
    finance88%
    legal<1%
    support11%
    salesNot given
  3. urgencyConfidence 38%Score
    0.62 of 2, nearest This week
    This month47%
    This week44%
    Today9%
  4. totalBox
    A receipt from Northwind Labs
    Top
    57.9%
    Left
    35%
    Bottom
    62.9%
    Right
    65%
Total
640 ms
Tokens
1,312 in · 0 out
Cost
$0.000394
import { DecisionResponse } from "@logicplanes/kaeso-ui/playground";

Props

  • answers
    readonly (DecisionAnswer | null)[] = []

    The answers in question order: a yes probability, a chosen option index with a probability per option, a score with a probability per level, a box's four edges from 0 to 1, or a refusal with its reason. A probability left out reads “Not given”; a missing answer reads “No answer”.

  • aria-label
    string

    The response's accessible name ("GPT-6 Luna response" in a comparison). Defaults to "Response" in the provider's language.

  • error
    string

    Why the call failed, shown under "No answers" with status "error".

  • footer
    ReactNode

    Under the answers, after Retry: the call's metrics.

  • image
    DecisionImage

    The image a box question was asked about: the box is drawn on it, and its edges stay as numbers under it.

  • maxBars
    number = 8

    Bars shown per question before “Show all” (8 by default): the most likely ones and the answer's, in their order, so a choice of 200 options stays short.

  • onRetry
    (() => void)

    Sends the call again: a Retry button after a failure, and a quiet Retry circle under the answers.

  • questions
    readonly DecisionQuestion[]

    The questions as they were sent: kind, name, and the options or levels whose labels name the bars.

  • showInstructions
    boolean = false

    Shows each question's instructions under its name, where the questions aren't on screen beside the answers, as in a request log.

  • status
    "done" | "error" | "pending" = done

    Where the call stands: waiting for answers, answered, or failed.