LLMThreadMessage
classin packageklyn.llm
public class LLMThreadMessage extends Object:
└ LLMThreadMessage
One message stored in an LLM conversation thread.
Properties
Modifier and Type Member Description
public readonly property content
content as String
Message textual content.
public readonly property role
role as String
Message role: `system`, `user`, `assistant` or `tool`.
public readonly property toolCallId
toolCallId as String
Optional tool call identifier for `tool` messages.
Properties inherited from Object: type
Constructors
Modifier and Type Member Description
public LLMThreadMessage
LLMThreadMessage(role as String, content as String, toolCallId as String = null):
Creates a thread message.
Methods
Modifier and Type Member Description
public static assistant
assistant(content as String) as LLMThreadMessage:
Builds an `assistant` message.
public static system
system(content as String) as LLMThreadMessage:
Builds a `system` message.
public override toString
toString() as String:
No summary.
public static tool
tool(content as String, toolCallId as String = null) as LLMThreadMessage:
Builds a `tool` message.
public static user
user(content as String) as LLMThreadMessage:
Builds a `user` message.
Methods inherited from Object: fromJson, toDict, toJson, toString, toXml