LLMThreadMessage
class in package klyn.llm

    public class LLMThreadMessage extends Object:

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 | name `name as String` | Optional tool name for `tool` messages.
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.
public readonly property | toolCalls `toolCalls as ArrayList<ToolCall>` | Optional tool calls attached to an assistant message.

Properties inherited from Object: type
Constructors

Modifier and Type | Member | Description
--- | --- | ---
public | LLMThreadMessage `LLMThreadMessage(role as String, content as String, toolCallId as String = null, toolCalls as Object = null, name 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 | assistantWithToolCalls `assistantWithToolCalls(content as String, toolCalls as ArrayList<ToolCall>) as LLMThreadMessage:` | Builds an `assistant` message carrying provider-requested tool calls.
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, name 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