Skip to content
This repository was archived by the owner on Jul 16, 2025. It is now read-only.

fix: Dall-E image generation examples #196

Merged
merged 1 commit into from
Jan 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions examples/image-generator-dall-e-2.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@
$platform = PlatformFactory::create($_ENV['OPENAI_API_KEY']);

$response = $platform->request(
model: new DallE(),
model: new DallE(), // Utilize Dall-E 2 version in default
input: 'A cartoon-style elephant with a long trunk and large ears.',
options: [
'version' => DallE::DALL_E_2, // Utilize Dall-E 2 version
'response_format' => 'url', // Generate response as URL
'n' => 2, // Generate multiple images for example
],
Expand Down
4 changes: 2 additions & 2 deletions examples/image-generator-dall-e-3.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
$platform = PlatformFactory::create($_ENV['OPENAI_API_KEY']);

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

Expand Down
Loading