Skip to content

Commit 985cd42

Browse files
committed
Adding image convenience methods
1 parent f5873f7 commit 985cd42

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

docs/ARCHITECTURE.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ _Note: Since this omits the model parameter, the SDK will automatically determin
156156
##### Fluent API
157157
```php
158158
$text = AiClient::prompt('Generate alternative text for this image.')
159-
->withImageFile(new InlineFile('image/png', $base64blob))
159+
->withInlineImage($base64Blob, 'image/png')
160160
->generateText();
161161
```
162162

@@ -328,6 +328,9 @@ direction LR
328328
329329
class PromptBuilder {
330330
+withText(string $text) self
331+
+withInlineImage(string $base64Blob, string $mimeType)
332+
+withLocalImage(string $path, string $mimeType)
333+
+withRemoteImage(string $uri, string $mimeType)
331334
+withImageFile(File $file) self
332335
+withAudioFile(File $file) self
333336
+withVideoFile(File $file) self
@@ -487,6 +490,9 @@ direction LR
487490
488491
class PromptBuilder {
489492
+withText(string $text) self
493+
+withInlineImage(string $base64Blob, string $mimeType)
494+
+withLocalImage(string $path, string $mimeType)
495+
+withRemoteImage(string $uri, string $mimeType)
490496
+withImageFile(File $file) self
491497
+withAudioFile(File $file) self
492498
+withVideoFile(File $file) self

0 commit comments

Comments
 (0)