Update
This commit is contained in:
@@ -12,7 +12,7 @@ public static function getMemeKeywords(string $name, string $description)
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => 'Bearer ' . $apiKey,
|
||||
'Authorization' => 'Bearer '.$apiKey,
|
||||
])->post('https://api.openai.com/v1/responses', [
|
||||
'model' => 'gpt-4.1-nano',
|
||||
'input' => [
|
||||
@@ -64,7 +64,7 @@ public static function getSingleMemeGenerator($user_prompt)
|
||||
|
||||
$response = Http::withHeaders([
|
||||
'Content-Type' => 'application/json',
|
||||
'Authorization' => 'Bearer ' . env('OPENAI_API_KEY'),
|
||||
'Authorization' => 'Bearer '.env('OPENAI_API_KEY'),
|
||||
])
|
||||
->post('https://api.openai.com/v1/responses', [
|
||||
'model' => 'gpt-4.1-nano',
|
||||
@@ -102,7 +102,7 @@ public static function getSingleMemeGenerator($user_prompt)
|
||||
],
|
||||
'primary_keyword_type' => [
|
||||
'type' => 'string',
|
||||
'description' => "Primary keyword type, choose only between: (action|emotion|misc)",
|
||||
'description' => 'Primary keyword type, choose only between: (action|emotion|misc)',
|
||||
],
|
||||
'action_keywords' => [
|
||||
'type' => 'array',
|
||||
@@ -168,7 +168,7 @@ public static function getSingleMemeGenerator($user_prompt)
|
||||
return $data;
|
||||
} else {
|
||||
// Handle error
|
||||
throw new \Exception('API request failed: ' . $response->body());
|
||||
throw new \Exception('API request failed: '.$response->body());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user