klyn.llm.LLMChatSession.appendMessage
method
public appendMessage(message as LLMThreadMessage) as Void
Description

Appends and checkpoints an externally supplied message on the owner thread. Updates accounting before notifying observers, including user answers and steering prompts. Prefer this method to mutating thread() directly.

Throws
  • ValueException if the message is null or its role is invalid.
Example

session.appendMessage(LLMThreadMessage.user("The answer is yes"))