feat: pass temporal_mode and as_of_date through DBN search API
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+9
-3
@@ -9,7 +9,13 @@ $input = dbnToolsJsonInput(12000);
|
||||
$language = dbnToolsNormalizeLanguage($input['language'] ?? 'en');
|
||||
|
||||
dbnToolsWithTelemetry('search', $language, function () use ($input, $language): array {
|
||||
$query = dbnToolsString($input, 'query', 2000);
|
||||
$limit = max(1, min(10, (int)($input['limit'] ?? 6)));
|
||||
return (new DbnLegalToolsService())->search($query, $language, $limit);
|
||||
$query = dbnToolsString($input, 'query', 2000);
|
||||
$limit = max(1, min(10, (int)($input['limit'] ?? 6)));
|
||||
$temporalMode = in_array($input['temporal_mode'] ?? '', ['legal_conservative', 'disabled'], true)
|
||||
? $input['temporal_mode']
|
||||
: 'disabled';
|
||||
$asOfDate = isset($input['as_of_date']) && preg_match('/^\d{4}(-\d{2}(-\d{2})?)?$/', $input['as_of_date'])
|
||||
? $input['as_of_date']
|
||||
: null;
|
||||
return (new DbnLegalToolsService())->search($query, $language, $limit, $temporalMode, $asOfDate);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user