20#ifdef COUCHBASE_ENTERPRISE
24#include "cbl/CBLPrediction.h"
58 }
catch (
const std::exception& error) {
66 config.unregistered = [](
void* ctx) {
#define CBL_ASSUME_NONNULL_END
#define CBL_ASSUME_NONNULL_BEGIN
Registers/unregisters predictive models by name.
Definition Prediction.hh:42
static void registerModel(std::string_view name, PredictiveModel model)
Registers a predictive model with the given name.
Definition Prediction.hh:47
static void unregisterModel(std::string_view name)
Unregisters the model; LiteCore fires unregistered which frees the model.
Definition Prediction.hh:73
FLEECE_PUBLIC FLMutableDict FL_NULLABLE FLMutableDict_New(void)
FLMutableDict FL_NULLABLE FLMutableDict_Retain(FLMutableDict FL_NULLABLE d)
void CBL_Log(CBLLogDomain domain, CBLLogLevel level, const char *format,...) __printflike(3
void CBL_RegisterPredictiveModel(FLString name, CBLPredictiveModel model)
void CBL_UnregisterPredictiveModel(FLString name)
struct _FLDict * FLMutableDict
const struct _FLDict * FLDict
fleece::slice slice
Convenience alias for fleece::slice, a non-owning view of a byte range.
Definition Base.hh:49
std::function< fleece::MutableDict(fleece::Dict)> PredictiveModel
A predictive model callable that integrates a machine learning model into queries,...
Definition Prediction.hh:38
void *_cbl_nullable context
FLMutableDict _cbl_nullable(* prediction)(void *_cbl_nullable context, FLDict input)
The exception thrown by the Couchbase Lite C++ API to report a Couchbase Lite failure.
Definition Base.hh:97
int code
Error code, specific to the domain. 0 always means no error.
Definition Base.hh:119
CBLErrorDomain domain
Domain of errors.
Definition Base.hh:118