The runtime handle the engine is resolved from.
Runs a prompt and returns the generated text.
The runtime handle.
The prompt.
Optionalmodel: string
Model to run. Falls back to the configured default.
The generated text.
Embeds text as a vector, for indexing or similarity search.
The runtime handle.
The text to embed.
Optionalmodel: string
Embedding model to run. Falls back to the configured default.
The embedding.
Reports whether the capability is actually usable on this runtime.
The runtime handle.
true when calls will reach a real backing resource.
A capability backed by an optional resource answers false when that
resource was never provisioned. Implementations must document what each
method does in that state — degrade or throw — and must not vary it, since
a caller choosing between two implementations is relying on the answer
meaning the same thing in both.
Text generation and embedding.
Remarks
Which model answers is a configuration decision, not a call-site one, so the model argument is optional everywhere and callers normally omit it. That is what lets a deployment change models without touching a business service.
Inference is expensive and frequently optional — an implementation whose Capability.isAvailable is
falseshould be checked before calling rather than relied on to degrade, since there is no sensible empty answer to a prompt.Author
Bayu Dwiyan Satria
Version
1.0.0
Since
1.0.0