Package com.axelor.ai.db
Class AiUsageLog
java.lang.Object
com.axelor.db.Model
com.axelor.auth.db.AuditableModel
com.axelor.ai.db.AiUsageLog
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAttrs()Input tokens served from provider cache (reduced cost)Input tokens written to provider cacheChat UUID, null for non-chat callsThe fields whose values the call sent, as model.field.getId()Round-trip time in millisecondsAI model code used for this callAI provider codeWhat made the callRefused when the call was not made: the model may not receive the chat's datainthashCode()voidsetAgentCode(String agentCode) voidvoidsetCacheReadTokens(Integer cacheReadTokens) voidsetCacheWriteTokens(Integer cacheWriteTokens) voidvoidsetErrorMessage(String errorMessage) voidvoidvoidsetInputTokens(Integer inputTokens) voidsetLatencyMs(Integer latencyMs) voidsetModelCode(String modelCode) voidsetOutputTokens(Integer outputTokens) voidsetProviderCode(String providerCode) voidsetSource(AiUsageSource source) voidsetStatus(AiUsageStatus status) voidsetTimestamp(LocalDateTime timestamp) toString()Methods inherited from class com.axelor.auth.db.AuditableModel
getCreatedBy, getCreatedOn, getUpdatedBy, getUpdatedOnMethods inherited from class com.axelor.db.Model
getArchived, getCid, getImportId, getVersion, isSelected, setArchived, setCid, setImportId, setSelected, setVersion
-
Constructor Details
-
AiUsageLog
public AiUsageLog()
-
-
Method Details
-
getId
-
setId
-
getTimestamp
-
setTimestamp
-
getModelCode
AI model code used for this call- Returns:
- the property value
-
setModelCode
-
getProviderCode
AI provider code- Returns:
- the property value
-
setProviderCode
-
getInputTokens
-
setInputTokens
-
getOutputTokens
-
setOutputTokens
-
getCacheReadTokens
Input tokens served from provider cache (reduced cost)- Returns:
- the property value
-
setCacheReadTokens
-
getCacheWriteTokens
Input tokens written to provider cache- Returns:
- the property value
-
setCacheWriteTokens
-
getLatencyMs
Round-trip time in milliseconds- Returns:
- the property value
-
setLatencyMs
-
getSource
What made the call- Returns:
- the property value
-
setSource
-
getAgentCode
-
setAgentCode
-
getChatId
Chat UUID, null for non-chat calls- Returns:
- the property value
-
setChatId
-
getStatus
Refused when the call was not made: the model may not receive the chat's data- Returns:
- the property value
-
setStatus
-
getErrorMessage
-
setErrorMessage
-
getFields
The fields whose values the call sent, as model.field.- Returns:
- the property value
-
setFields
-
getAttrs
-
setAttrs
-
equals
-
hashCode
public int hashCode() -
toString
-