Skip to content

Commit

Permalink
fix: set request timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
rafaucau committed Nov 8, 2023
1 parent f5a9bed commit 6474e2e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions includes/AltGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,13 @@ public static function generate_alt_text( int $attachment_id ): string|WP_Error
$api_response = wp_remote_post(
self::API_URL,
[
'headers' => [
'headers' => [
'Content-Type' => 'application/json',
'Authorization' => 'Bearer ' . $api_key,
],
'body' => json_encode( [
'timeout' => 90,
'httpversion' => '1.1',
'body' => json_encode( [
'model' => self::MODEL,
'messages' => [
[
Expand Down

0 comments on commit 6474e2e

Please sign in to comment.