Skip to content

Commit 53c3ebc

Browse files
committed
minor #743 [Examples] Adopt asX methods of result for better type support (chr-hertel)
This PR was merged into the main branch. Discussion ---------- [Examples] Adopt asX methods of result for better type support | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | Docs? | no | Issues | | License | MIT Follows #545 Commits ------- 8410755 Adopt asX methods of result for better type support
2 parents ebec450 + 8410755 commit 53c3ebc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+50
-50
lines changed

examples/aimlapi/chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@
2525
'max_tokens' => 500, // specific options just for this call
2626
]);
2727

28-
echo $result->getResult()->getContent().\PHP_EOL;
28+
echo $result->asText().\PHP_EOL;

examples/aimlapi/image-input-binary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
);
2828
$result = $platform->invoke('google/gemma-3-27b-it', $messages);
2929

30-
echo $result->getResult()->getContent().\PHP_EOL;
30+
echo $result->asText().\PHP_EOL;

examples/albert/chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@
4141

4242
$result = $platform->invoke('llama-3.3-70b-instruct', $messages);
4343

44-
echo $result->getResult()->getContent().\PHP_EOL;
44+
echo $result->asText().\PHP_EOL;

examples/anthropic/chat.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@
2323
);
2424
$result = $platform->invoke('claude-3-5-sonnet-20241022', $messages);
2525

26-
echo $result->getResult()->getContent().\PHP_EOL;
26+
echo $result->asText().\PHP_EOL;

examples/anthropic/image-input-binary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
);
2828
$result = $platform->invoke('claude-3-5-sonnet-20241022', $messages);
2929

30-
echo $result->getResult()->getContent().\PHP_EOL;
30+
echo $result->asText().\PHP_EOL;

examples/anthropic/image-input-url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,4 +27,4 @@
2727
);
2828
$result = $platform->invoke('claude-3-5-sonnet-20241022', $messages);
2929

30-
echo $result->getResult()->getContent().\PHP_EOL;
30+
echo $result->asText().\PHP_EOL;

examples/anthropic/pdf-input-binary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
);
2727
$result = $platform->invoke('claude-3-5-sonnet-20241022', $messages);
2828

29-
echo $result->getResult()->getContent().\PHP_EOL;
29+
echo $result->asText().\PHP_EOL;

examples/anthropic/pdf-input-url.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
);
2727
$result = $platform->invoke('claude-3-5-sonnet-20241022', $messages);
2828

29-
echo $result->getResult()->getContent().\PHP_EOL;
29+
echo $result->asText().\PHP_EOL;

examples/azure/chat-gpt.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@
2828
);
2929
$result = $platform->invoke('gpt-4o-mini', $messages);
3030

31-
echo $result->getResult()->getContent().\PHP_EOL;
31+
echo $result->asText().\PHP_EOL;

examples/azure/chat-llama.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@
2626
'frequency_penalty' => 0,
2727
]);
2828

29-
echo $result->getResult()->getContent().\PHP_EOL;
29+
echo $result->asText().\PHP_EOL;

0 commit comments

Comments
 (0)