diff --git a/app/Helpers/FirstParty/OpenAI/OpenAI.php b/app/Helpers/FirstParty/OpenAI/OpenAI.php index 15a889c..a4cf121 100644 --- a/app/Helpers/FirstParty/OpenAI/OpenAI.php +++ b/app/Helpers/FirstParty/OpenAI/OpenAI.php @@ -5,6 +5,9 @@ use Exception; use Illuminate\Support\Facades\Http; +use Illuminate\Support\Facades\Log; + + class OpenAI { public static function writeArticle($title, $description, $article_type, $min, $max) @@ -117,6 +120,7 @@ public static function chatCompletion($system_prompt, $user_prompt, $model) return $reply; } catch(Exception $e) { + Log::error($e->getMessage(), ['response' => $response->body()]); inspector()->reportException($e); }