Records the parameters, timing and outcome of a single invokeInference call, built by LlmManager before the call and updated after it completes. Passed to each active LlmInferenceListener so it can record or audit language model usage, and serialised under the element name llm-inference when persisted.

Group: AI Agents


Properties

PropertyReturnsDescription
completedDateThe time the inference call finished, whether it succeeded or threw an exception.
durationLongHow long the inference call took to run, in milliseconds.
idStringA randomly generated identifier assigned to this inference call when it was captured.
paramsMap<String,Object>The inference call's request parameters, including the model name, sampling settings such as temperature and topP, and a nested modelParams map with the provider-specific model parameters.
responseObjectThe raw result returned by the language model provider, in a shape determined by that provider.
startedDateThe time the inference call was made.
userIdStringThe name of the profile that triggered the inference call.

Methods

getId() · getCompleted() · setCompleted(Date completed) · getResponse() · setResponse(Object result) · getDuration() · getParams() · getStarted() · getUserId()

getId()

Returns: String

A randomly generated identifier assigned to this inference call when it was captured.

getCompleted()

Returns: Date

The time the inference call finished, whether it succeeded or threw an exception.

setCompleted(Date completed)

Returns: void

Records the time the inference call finished. Called by LlmManager once the provider call returns.

ParameterDescription
completedthe completion time to record

getResponse()

Returns: Object

The raw result returned by the language model provider, in a shape determined by that provider.

setResponse(Object result)

Returns: void

Records the result returned by the language model provider. Called by LlmManager once the provider call returns.

ParameterDescription
resultthe response to record

getDuration()

Returns: Long

How long the inference call took to run, in milliseconds.

getParams()

Returns: Map<String,Object>

The inference call's request parameters, including the model name, sampling settings such as temperature and topP, and a nested modelParams map with the provider-specific model parameters.

getStarted()

Returns: Date

The time the inference call was made.

getUserId()

Returns: String

The name of the profile that triggered the inference call.

To get full access to the Kademi Hub existing customers can login here, or new customers can register here.