diff --git a/app/Domains/EmailParser/EmailClient.php b/app/Domains/EmailParser/EmailClient.php index c9a79a8f..9952b491 100644 --- a/app/Domains/EmailParser/EmailClient.php +++ b/app/Domains/EmailParser/EmailClient.php @@ -46,6 +46,10 @@ public function handle(Source $source): array $foldersToCheck = explode(',', trim($source->secrets['email_box'])); + $foldersToCheck = collect($foldersToCheck)->map(function ($folder) { + return str($folder)->lower()->toString(); + })->toArray(); + $secrets = $source->secrets; $config = [ @@ -83,10 +87,14 @@ public function handle(Source $source): array foreach ($folders as $folder) { $full_name = data_get($folder, 'full_name'); + Log::info('Checking folder', [ 'full_name' => $full_name, 'folders_to_check' => $foldersToCheck, ]); + + $full_name = str($full_name)->lower()->toString(); + if (in_array($full_name, $foldersToCheck)) { $messages = $folder->messages()->all()->get(); logger('[LaraChain] - Email Box Count', [ diff --git a/app/Jobs/SummarizeDocumentJob.php b/app/Jobs/SummarizeDocumentJob.php index 168b1e21..6cb615a8 100644 --- a/app/Jobs/SummarizeDocumentJob.php +++ b/app/Jobs/SummarizeDocumentJob.php @@ -77,8 +77,6 @@ public function handle(): void ], $this->prompt); } - put_fixture('prompt_being_used_summary.txt', $prompt, false); - /** @var CompletionResponse $results */ $results = LlmDriverFacade::driver( $this->document->getDriver() diff --git a/resources/js/Pages/Collection/Components/Documents.vue b/resources/js/Pages/Collection/Components/Documents.vue index c912ba2b..f5de1fb6 100644 --- a/resources/js/Pages/Collection/Components/Documents.vue +++ b/resources/js/Pages/Collection/Components/Documents.vue @@ -1,5 +1,5 @@