Package-level declarations

Types

Link copied to clipboard
@Serializable
data class Chat(val createdAt: String = "", val done: Boolean = false, val doneReason: String = "", val evalCount: Long = 0, val evalDuration: Long = 0, val loadDuration: Long = 0, val logprobs: List<Logprob> = emptyList(), val message: Message = Message(content = "default response, probably an error", role = ""), val model: String = "", val promptEvalCount: Long = 0, val promptEvalDuration: Long = 0, val totalDuration: Long = 0)

Full chat-completion response from an LLM backend.

Link copied to clipboard
@Serializable
enum LlmBackend : Enum<LlmBackend>

Inference backends a Server.LLM node can route requests to.

Link copied to clipboard
@Serializable
data class LLMMetaData(val port: Int = 11434, val model: String = "qwen2.5-coder:32b-instruct-q8_0", val prompt: String = "", val backend: LlmBackend = LlmBackend.OLLAMA, val systemPrompt: String = "", val responseFormat: ResponseFormat = ResponseFormat.NATURAL_LANGUAGE, val responseInstructions: String = LLMResult.JSON_SCHEMA, val error: String = "", val sources: List<NodeIdentity> = emptyList(), val snapshot: Snapshot = Snapshot(), val invocationTriggers: List<InvocationTrigger> = emptyList(), val nodeAction: NodeAction = NodeAction.EXECUTE, val inputs: List<NodeIdentity> = emptyList()) : SourceMetaData

Payload for a Server.LLM node.

Link copied to clipboard
@Serializable
data class LLMNodeContext(val id: String, val parent: String, val host: String, val type: KrillApp, val state: NodeState, val meta: NodeMetaData, val timestamp: Long)

Compact agent-facing projection of a Node.

Link copied to clipboard
@Serializable
data class LLMResult(val summary: String = "", val value: Double? = null, val label: String? = null, val confidence: Double? = null, val detail: String = "")

Default JSON output contract for a Server.LLM node configured with ResponseFormat.JSON.

Link copied to clipboard
@Serializable
data class Logprob(val bytes: List<Int>, val logprob: Int, val token: String, val topLogprobs: List<TopLogprob>)

Log-probability information for a single emitted token plus its alternatives.

Link copied to clipboard
@Serializable
data class Message(val content: String, val role: String, val images: List<String> = emptyList(), val thinking: String = "")

One chat message — the role-tagged unit of conversation between the user, the assistant, and (in the case of tool calls) the tools.

Link copied to clipboard
@Serializable
enum ResponseFormat : Enum<ResponseFormat>

Governs how a Server.LLM node formats its output.

Link copied to clipboard
@Serializable
data class TopLogprob(val bytes: List<Int>, val logprob: Int, val token: String)

A single alternative-token candidate with its log-probability.