Package-level declarations

Properties

Link copied to clipboard

Hint message instructing the LLM that it must call a tool to continue, used with nodeCallLLMWithHint.

Functions

Link copied to clipboard
fun Prompt.appendToSystemMessage(text: String): Prompt

Creates a new Prompt with text appended to the first system message. If no system message exists, the prompt is returned unchanged.

Link copied to clipboard
fun generateContextOverflowMessage(contextApproxSize: Int, overflowCoef: Double = 2.0): String

Util function for investigating the behaviour of the system on model context overflow. It is very approximate and should be used mainly for preliminary experiments.

Link copied to clipboard
inline fun <Input, Output> AIAgentSubgraphBuilderBase<Input, Output>.nodeCallLLMWithHint(hint: String): AIAgentNodeDelegate<Any?, Message.Response>

A single LLM call node with an additional user message. Intended for guiding the LLM towards with a hint.

Link copied to clipboard
fun Prompt.prettyPrint(): String

Renders the prompt's messages into a human-readable, newline-separated string, each prefixed with its index and message role. Intended for logging and debugging.

Link copied to clipboard
fun Prompt.replaceSystemMessage(id: String = this.id, systemMessageEditor: (String) -> String): Prompt

Create a new Prompt object with the same messages, except for the system prompt.