Skip to content

Commit

Permalink
Remove date range till I can test it more
Browse files Browse the repository at this point in the history
  • Loading branch information
Alfred Nutile authored and Alfred Nutile committed Jun 3, 2024
1 parent 1cd3136 commit 1b0a62b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
Binary file modified .DS_Store
Binary file not shown.
14 changes: 1 addition & 13 deletions app/Domains/Sources/WebSearch/Drivers/BraveSearchClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,21 +13,9 @@ public function search(string $search, array $options = []): SearchResponseDto
{
$count = data_get($options, 'limit', 5);

$last_run = data_get($options, 'last_run', null);

if ($last_run) {
$last_run = $last_run->subDay()->format('Y-m-d');
$from = $last_run;
$to = now()->format('Y-m-d');
} else {
$from = now()->subDays(7)->format('Y-m-d');
$to = now()->format('Y-m-d');
}

$query = [
'q' => urlencode($search),
'count' => $count,
'freshness' => sprintf('%sto%s', $from, $to),
'count' => $count
];

\Illuminate\Support\Facades\Log::info('[LaraChain] Brave Search Query', [
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1b0a62b

Please sign in to comment.