configure method
void
configure({})
Implementation
void configure({
Future<int?> Function(
List<Map<String, dynamic>>,
List<Map<String, dynamic>>,
)?
countTokensWithFallback,
int Function(String)? roughTokenCountEstimation,
int Function(String)? getEffectiveContextWindowSize,
int Function(String)? getContextWindowForModel,
bool Function()? isAutoCompactEnabled,
ApiUsage? Function(List<Map<String, dynamic>>)? getCurrentUsage,
void Function(String)? logForDebugging,
void Function(Object)? logError,
}) {
if (countTokensWithFallback != null) {
_countTokensWithFallback = countTokensWithFallback;
}
if (roughTokenCountEstimation != null) {
_roughTokenCountEstimation = roughTokenCountEstimation;
}
if (getEffectiveContextWindowSize != null) {
_getEffectiveContextWindowSize = getEffectiveContextWindowSize;
}
if (getContextWindowForModel != null) {
_getContextWindowForModel = getContextWindowForModel;
}
if (isAutoCompactEnabled != null) {
_isAutoCompactEnabled = isAutoCompactEnabled;
}
if (getCurrentUsage != null) _getCurrentUsage = getCurrentUsage;
if (logForDebugging != null) _logForDebugging = logForDebugging;
if (logError != null) _logError = logError;
}