Skip to content

Commit beadd5c

Browse files
committed
bug #804 Update Gemini model for examples (chr-hertel)
This PR was merged into the main branch. Discussion ---------- Update Gemini model for examples | Q | A | ------------- | --- | Bug fix? | yes | New feature? | no | Docs? | no | Issues | | License | MIT Before: <img width="1494" height="334" alt="image" src="https://github.com/user-attachments/assets/611e1d0c-0b24-4669-aaae-a27ae8be0e31" /> After: <img width="1494" height="334" alt="image" src="https://github.com/user-attachments/assets/92a26a24-30c4-4a8a-bdf7-1d8e2d0db054" /> Follow Up: #803 Commits ------- 715ddc3 Update Gemini model for examples
2 parents 68922f8 + 715ddc3 commit beadd5c

File tree

6 files changed

+7
-7
lines changed

6 files changed

+7
-7
lines changed

examples/gemini/audio-input.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
Audio::fromFile(dirname(__DIR__, 2).'/fixtures/audio.mp3'),
2525
),
2626
);
27-
$result = $platform->invoke('gemini-1.5-flash', $messages);
27+
$result = $platform->invoke('gemini-2.5-flash', $messages);
2828

2929
echo $result->asText().\PHP_EOL;

examples/gemini/image-input.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,6 @@
2525
Image::fromFile(dirname(__DIR__, 2).'/fixtures/image.jpg'),
2626
),
2727
);
28-
$result = $platform->invoke('gemini-1.5-flash', $messages);
28+
$result = $platform->invoke('gemini-2.5-flash', $messages);
2929

3030
echo $result->asText().\PHP_EOL;

examples/gemini/pdf-input-binary.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
'What is this document about?',
2525
),
2626
);
27-
$result = $platform->invoke('gemini-1.5-flash', $messages);
27+
$result = $platform->invoke('gemini-2.5-flash', $messages);
2828

2929
echo $result->asText().\PHP_EOL;

examples/gemini/server-tools.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
$toolbox = new Toolbox([new Clock()], logger: logger());
2525
$processor = new AgentProcessor($toolbox);
26-
$agent = new Agent($platform, 'gemini-2.5-pro-preview-03-25', [$processor], [$processor]);
26+
$agent = new Agent($platform, 'gemini-2.5-pro', [$processor], [$processor]);
2727

2828
$messages = new MessageBag(
2929
Message::ofUser(

examples/gemini/structured-output-clock.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@
2424
$platform = PlatformFactory::create(env('GEMINI_API_KEY'), http_client());
2525

2626
$clock = new Clock(new SymfonyClock());
27-
$toolbox = new Toolbox([$clock]);
27+
$toolbox = new Toolbox([$clock], logger: logger());
2828
$toolProcessor = new ToolProcessor($toolbox);
2929
$structuredOutputProcessor = new StructuredOutputProcessor();
30-
$agent = new Agent($platform, 'gemini-1.5-flash', [$toolProcessor, $structuredOutputProcessor], [$toolProcessor, $structuredOutputProcessor]);
30+
$agent = new Agent($platform, 'gemini-2.5-flash', [$toolProcessor, $structuredOutputProcessor], [$toolProcessor, $structuredOutputProcessor]);
3131

3232
$messages = new MessageBag(Message::ofUser('What date and time is it?'));
3333
$result = $agent->call($messages, ['response_format' => [

examples/gemini/structured-output-math.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
$platform = PlatformFactory::create(env('GEMINI_API_KEY'), http_client());
2222

2323
$processor = new AgentProcessor();
24-
$agent = new Agent($platform, 'gemini-1.5-flash', [$processor], [$processor]);
24+
$agent = new Agent($platform, 'gemini-2.5-flash', [$processor], [$processor]);
2525
$messages = new MessageBag(
2626
Message::forSystem('You are a helpful math tutor. Guide the user through the solution step by step.'),
2727
Message::ofUser('how can I solve 8x + 7 = -23'),

0 commit comments

Comments
 (0)