klyn.llm.inference.LocalLLMProvider.chat
method
public chat<MESSAGE extends Map<String, String>>(messages as IList<MESSAGE>, maxNewTokens as Long = 128l) as String
Description

Generates a textual assistant response from a text-only Qwen conversation. Thinking is disabled by the explicit template prefix; previous messages are supplied by the caller, not retained implicitly. Control-token spellings in user content are ordinary text, not new roles. Uses deterministic argmax.

Parameters
ParameterDescription
messagesOrdered maps with role/content; final message must be user.
maxNewTokensResponse bound, fitting maxContext with the prompt.
Returns

Generated assistant text only, without EOS or role delimiters.

Throws
  • ValueException for unsupported message content, closed provider or bounds.
Example

response = provider.chat([{"role": "user", "content": "What is the capital of France?"}])