Skip to content

Commit 8629d2c

Browse files
authored
fix: Dall-E image generation examples (#196)
1 parent 86b80f9 commit 8629d2c

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

examples/image-generator-dall-e-2.php

+1-2
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,9 @@
1515
$platform = PlatformFactory::create($_ENV['OPENAI_API_KEY']);
1616

1717
$response = $platform->request(
18-
model: new DallE(),
18+
model: new DallE(), // Utilize Dall-E 2 version in default
1919
input: 'A cartoon-style elephant with a long trunk and large ears.',
2020
options: [
21-
'version' => DallE::DALL_E_2, // Utilize Dall-E 2 version
2221
'response_format' => 'url', // Generate response as URL
2322
'n' => 2, // Generate multiple images for example
2423
],

examples/image-generator-dall-e-3.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,10 @@
1717
$platform = PlatformFactory::create($_ENV['OPENAI_API_KEY']);
1818

1919
$response = $platform->request(
20-
model: new DallE(),
20+
model: new DallE(version: DallE::DALL_E_3),
2121
input: 'A cartoon-style elephant with a long trunk and large ears.',
2222
options: [
23-
'version' => DallE::DALL_E_3, // Utilize Dall-E 3 version
23+
'response_format' => 'url', // Generate response as URL
2424
],
2525
);
2626

0 commit comments

Comments
 (0)