Class QuickAnswer

java.lang.Object
ai.redouble.demo.QuickAnswer

public class QuickAnswer extends Object
The quick question's answer as the page shows it: the answer and the model's reasoning, the catalog entry that answered and the model that served it, and what the call cost, priced from the catalog like every other result on the page. Built from the calls the finished job made, as its completion event carries them (capture(JobDispatcher, QuickLLMQuestionTool)), so the cost is there when the answer is.
Since:
0.1 (2026-09-27)
Author:
Andrey Santrosyan
  • Constructor Details

    • QuickAnswer

      public QuickAnswer()
  • Method Details

    • capture

      public static QuickAnswer.Capture capture(JobDispatcher dispatcher, QuickLLMQuestionTool tool)
      Captures the calls of one quick-question job from its completion event, which carries its own copy of them. The job's context is no source: the dispatcher releases a job's recorded calls from it once the job settles, and a caller that reads the context after the result races that release and finds nothing. Opened before the job is submitted, so the event cannot be missed; closed once the answer is built or the run failed.
    • of

      public static QuickAnswer of(QuickLLMQuestionOutput output, List<LLMResponse<?>> responses)
      The answer of a finished job, with the calls it made.
    • getAnswer

      public String getAnswer()
    • setAnswer

      public void setAnswer(String answer)
    • getReasoning

      public String getReasoning()
    • setReasoning

      public void setReasoning(String reasoning)
    • getModel

      public String getModel()
    • setModel

      public void setModel(String model)
    • getServedModel

      public String getServedModel()
    • setServedModel

      public void setServedModel(String servedModel)
    • getCost

      public Double getCost()
    • setCost

      public void setCost(Double cost)
    • getCurrency

      public String getCurrency()
    • setCurrency

      public void setCurrency(String currency)