From 5071b0c872a8559ebc9d454b0d846a84307cd024 Mon Sep 17 00:00:00 2001 From: Alfred Nutile Date: Tue, 20 Aug 2024 07:45:53 -0400 Subject: [PATCH] fix api output --- Modules/LlmDriver/app/ClaudeClient.php | 2 -- app/Http/Resources/SourceResource.php | 3 +-- phpunit.xml | 2 +- 3 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Modules/LlmDriver/app/ClaudeClient.php b/Modules/LlmDriver/app/ClaudeClient.php index 04f0337e..7669bf30 100644 --- a/Modules/LlmDriver/app/ClaudeClient.php +++ b/Modules/LlmDriver/app/ClaudeClient.php @@ -49,8 +49,6 @@ public function chat(array $messages): CompletionResponse $payload = $this->modifyPayload($payload); - put_fixture('error_claude_payload.json', $payload); - $results = $this->getClient()->post('/messages', $payload); if (! $results->ok()) { diff --git a/app/Http/Resources/SourceResource.php b/app/Http/Resources/SourceResource.php index bfe18d33..c9c4f55e 100644 --- a/app/Http/Resources/SourceResource.php +++ b/app/Http/Resources/SourceResource.php @@ -17,7 +17,6 @@ class SourceResource extends JsonResource public function toArray(Request $request): array { - $recurring = $this->getRecurring(); $lastRun = $this->getLastRun(); return [ @@ -27,7 +26,7 @@ public function toArray(Request $request): array 'collection_id' => $this->collection_id, 'details' => $this->details, 'active' => $this->active ? 'Yes' : 'No', - 'recurring' => $recurring, + 'recurring' => $this->recurring?->value, 'description' => $this->description, 'slug' => $this->slug, 'last_run' => $lastRun, diff --git a/phpunit.xml b/phpunit.xml index 2ebfd808..d0cd6740 100644 --- a/phpunit.xml +++ b/phpunit.xml @@ -30,7 +30,7 @@ - +