Skip to content

Commit b3a0d9c

Browse files
committed
Remove the superfluous usingModelSupporting*() methods
1 parent aa21ba8 commit b3a0d9c

File tree

1 file changed

+10
-31
lines changed

1 file changed

+10
-31
lines changed

docs/ARCHITECTURE.md

Lines changed: 10 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ $texts = AiClient::generateTextResult(
7575
```php
7676
$imageFile = AiClient::prompt('Generate an illustration of the PHP elephant in the Carribean sea.')
7777
->usingProvider('openai')
78-
->usingModelSupportingImages() // Optional.
7978
->generateImage();
8079
```
8180

@@ -99,7 +98,6 @@ $imageFile = AiClient::generateImageResult(
9998
##### Fluent API
10099
```php
101100
$imageFile = AiClient::prompt('Generate an illustration of the PHP elephant in the Carribean sea.')
102-
->usingModelSupportingImages() // Optional.
103101
->generateImage();
104102
```
105103

@@ -123,8 +121,17 @@ _Note: This does effectively the exact same as [the first code example](#generat
123121

124122
##### Fluent API
125123
```php
124+
$providerModelsMetadata = AiClient::defaultRegistry()->findModelsMetadataForSupport(
125+
new AiModelRequirements([AiCapability::TEXT_GENERATION])
126+
);
127+
126128
$text = AiClient::prompt('Write a 2-verse poem about PHP.')
127-
->usingModelSupportingText() // Optional.
129+
->withModel(
130+
AiClient::defaultRegistry()->getProviderModel(
131+
$providerModelsMetadata[0]->getProvider()->getId(),
132+
$providerModelsMetadata[0]->getModels()[0]->getId()
133+
)
134+
)
128135
->generateText();
129136
```
130137

@@ -320,20 +327,6 @@ direction LR
320327
+withMessageParts(...MessagePart $part) self
321328
+withHistory(...Message $messages) self
322329
+usingModel(AiModel $model) self
323-
+usingModelSupporting(...AiCapability|AiOption $aiCapabilityOrOption) self
324-
+usingModelSupportingCapability(...AiCapability $aiCapability) self
325-
+usingModelSupportingOption(...AiOption $aiOption) self
326-
+usingModelSupportingAudio() self
327-
+usingModelSupportingHistory() self
328-
+usingModelSupportingEmbeddings() self
329-
+usingModelSupportingImages() self
330-
+usingModelSupportingJsonOutput() self
331-
+usingModelSupportingMusic() self
332-
+usingModelSupportingOutputSchema() self
333-
+usingModelSupportingSpeech() self
334-
+usingModelSupportingText() self
335-
+usingModelSupportingTextToSpeech() self
336-
+usingModelSupportingVideo() self
337330
+usingSystemInstruction(string|MessagePart[]|Message $systemInstruction) self
338331
+usingMaxTokens(int $maxTokens) self
339332
+usingTemperature(float $temperature) self
@@ -507,20 +500,6 @@ direction LR
507500
+withMessageParts(...MessagePart $part) self
508501
+withHistory(...Message $messages) self
509502
+usingModel(AiModel $model) self
510-
+usingModelSupporting(...AiCapability|AiOption $aiCapabilityOrOption) self
511-
+usingModelSupportingCapability(...AiCapability $aiCapability) self
512-
+usingModelSupportingOption(...AiOption $aiOption) self
513-
+usingModelSupportingAudio() self
514-
+usingModelSupportingHistory() self
515-
+usingModelSupportingEmbeddings() self
516-
+usingModelSupportingImages() self
517-
+usingModelSupportingJsonOutput() self
518-
+usingModelSupportingMusic() self
519-
+usingModelSupportingOutputSchema() self
520-
+usingModelSupportingSpeech() self
521-
+usingModelSupportingText() self
522-
+usingModelSupportingTextToSpeech() self
523-
+usingModelSupportingVideo() self
524503
+usingSystemInstruction(string|MessagePart[]|Message $systemInstruction) self
525504
+usingMaxTokens(int $maxTokens) self
526505
+usingTemperature(float $temperature) self

0 commit comments

Comments
 (0)