GoodMemGoodMem
ReferenceCLIDecision Models

Decision Model Decide

Decision Model Decide CLI command reference

goodmem decision-model decide

Send questions to a decision model and print JSON answers

Synopsis

Send a request using the model's saved credentials and settings.

Read the request from a JSON file, or use --input - to read from standard input. Include state, questions, and optional attachments. Pass the model UUID after decide; leave decisionModelId out of the JSON.

Use {"text":"hello"} for plain text. Use {"jsonValue":"9007199254740993"} to store a JSON value as text and preserve its numeric precision.

Question types are choice (select an option), score (rate against ordered levels), noul (estimate the probability of true), and box (locate an object in an image). Run goodmem decision-model get with the model's UUID to see which types it supports. Clef requires instructions for every question. For example, set instructions to {"text":"Is the greeting friendly?"}. Media needs a kind (such as DECISION_MEDIA_KIND_IMAGE), mimeType, and base64-encoded data. The complete input must be at most 64 MiB.

Prints answers as JSON. Confidence values have different meanings across providers. Each call may incur provider charges. The CLI sends the request once and does not retry.

goodmem decision-model decide <decision-model-id> [flags]

Examples

  goodmem decision-model decide f031b49e-7a15-4c8c-b4e7-38f77225d2a6 --input request.json
  printf '%s' '{"state":{"text":"hello"},"questions":{"friendly":{"instructions":{"text":"Is the greeting friendly?"},"noul":{"trueCriterion":{"text":"friendly"},"falseCriterion":{"text":"unfriendly"}}}}}' | \
    goodmem decision-model decide f031b49e-7a15-4c8c-b4e7-38f77225d2a6 --input -

Options

  -h, --help               help for decide
      --input string       JSON request file, or - for stdin
      --timeout duration   Maximum time to wait for a response (0 disables the CLI timeout; server limits still apply) (default 1m0s)

Options inherited from parent commands

      --api-key string   API key for authentication (can also be set via GOODMEM_API_KEY environment variable)
      --server string    GoodMem server URL (gRPC API; default ports: https=443, http=80)

SEE ALSO