Class HelloModel

java.lang.Object
ai.redouble.examples.hello.HelloModel

public class HelloModel extends Object
The smallest Nucleo program: ask a model one question about a piece of text and print the answer. It shows the three things every later example builds on.

Everything Nucleo carries out is a job, and JobDispatcher is the runtime that runs jobs: submit returns a handle at once, the job runs on a virtual thread of its own, and get() waits for the result. Job.workflow("you", "hello") names the piece of work this job belongs to; costs, events and records are kept per workflow.

No model is named anywhere. Grade.SMALL says how much model the work needs, a rung on a ladder from MICRO to MEGA, and the deployment's catalog decides which model serves that rung, so the same program runs on Anthropic, OpenAI or Bedrock, served by whichever holds a credential in the environment.

The answer arrives as a QuickLLMQuestionOutput, a plain Java object already read and checked against its declared fields: values to use, never text to parse.

Change the question and the text to anything; nothing else in the program cares what they say.

Since:
0.1 (2026-09-27)
Author:
Andrey Santrosyan
  • Constructor Details

    • HelloModel

      public HelloModel()
  • Method Details