Function GenieAccuracy_compute¶
Defined in File GenieAccuracy.h
Function Documentation¶
-
Genie_Status_t GenieAccuracy_compute(const GenieAccuracy_Handle_t accuracyHandle, Genie_AllocCallback_t callback, const char **jsonData)¶
A function to compute an accuracy metric. The provided callback will be called for the client to provide memory allocation on which the JSON object will be copied.
- Parameters
accuracyHandle – [in] Handle to the previously created accuracy handle, to which a dialog is bound, which specifies which accuracy metrics to report.
callback – [in] A callback function handle. Must not be NULL.
jsonData – [out] The output accuracy data. The associated buffer was allocated in the client defined allocation callback and the memory needs to be managed by the client.
- Returns
Status code:
GENIE_STATUS_SUCCESS: API call was successful.
GENIE_STATUS_ERROR_INVALID_ARGUMENT: At least one argument is invalid.
GENIE_STATUS_ERROR_INVALID_HANDLE: one of the handles provided in the arguments is invalid.
GENIE_STATUS_ERROR_MEM_ALLOC: Memory allocation failure.
Note
Running GenieAccuracy_compute resets the dialog that is bound to the accuracy handle, along with the associated engine. Ideally, this API should be ran on a newly created dialog, instead of in between dialog queries.