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
| Property | Returns | Description |
|---|---|---|
| completed | Date | The time the inference call finished, whether it succeeded or threw an exception. |
| duration | Long | How long the inference call took to run, in milliseconds. |
| id | String | A randomly generated identifier assigned to this inference call when it was captured. |
| params | 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. |
| response | Object | The raw result returned by the language model provider, in a shape determined by that provider. |
| started | Date | The time the inference call was made. |
| userId | String | The 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.
| Parameter | Description |
|---|---|
completed | the 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.
| Parameter | Description |
|---|---|
result | the 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.