klyn.llm.inference.LocalLLMProvider.complete
method
public override complete(request as LLMRequest) as LLMResponse throws Exception
Description

Completes a typed text conversation using resident model weights. History is borrowed for this request and is neither retained nor modified. No HTTP, JSON conversion or duplicate dictionary representation is involved.

Parameters
ParameterDescription
requestOrdered messages ending in a user message, without tools, images or attachment references. Uses this provider's maxNewTokens bound.
Returns

Assistant message and exact prompt/completion token counts. The completion count includes EOS when generated; response text excludes it.

Throws
  • ValueException for null requests, unsupported content, a closed provider, a checkpoint without a tokenizer or invalid context bounds.
  • Exception for device or generation failures.
Example

response = provider.complete(LLMRequest([LLMThreadMessage.user("Hello")]))