Add (openai): debugging points for inspector
This commit is contained in:
@@ -5,6 +5,9 @@
|
|||||||
use Exception;
|
use Exception;
|
||||||
use Illuminate\Support\Facades\Http;
|
use Illuminate\Support\Facades\Http;
|
||||||
|
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
|
||||||
class OpenAI
|
class OpenAI
|
||||||
{
|
{
|
||||||
public static function writeArticle($title, $description, $article_type, $min, $max)
|
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;
|
return $reply;
|
||||||
}
|
}
|
||||||
catch(Exception $e) {
|
catch(Exception $e) {
|
||||||
|
Log::error($e->getMessage(), ['response' => $response->body()]);
|
||||||
inspector()->reportException($e);
|
inspector()->reportException($e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user