LlmGatewayResponse

data class LlmGatewayResponse(val content: String? = null, val toolCalls: List<LlmToolCall> = emptyList(), val thinking: String? = null, val structuredJson: JsonElement? = null, val usage: JsonObject? = null, val providerModel: String? = null, val finishReason: String? = null, val metadata: JsonObject? = null)

A non-streaming response from an com.mojentic.llm.gateway.LlmGateway.

Constructors

Link copied to clipboard
constructor(content: String? = null, toolCalls: List<LlmToolCall> = emptyList(), thinking: String? = null, structuredJson: JsonElement? = null, usage: JsonObject? = null, providerModel: String? = null, finishReason: String? = null, metadata: JsonObject? = null)

Properties

Link copied to clipboard

Assistant text response, when present.

Link copied to clipboard

Provider finish reason (for example stop, length, tool_calls).

Link copied to clipboard
val metadata: JsonObject?

Other provider-reported response metadata (for example Ollama durations).

Link copied to clipboard

Model name the provider reported, which can differ from the requested model.

Link copied to clipboard
val structuredJson: JsonElement?

Structured JSON object, when a structured-output request was made.

Link copied to clipboard

Reasoning trace surfaced by the provider, when available.

Link copied to clipboard

Tool calls requested by the LLM. Empty when no tools were called.

Link copied to clipboard
val usage: JsonObject?

Token usage exactly as the provider reported it, or null when it reported none. Never estimated.