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

Commit 89e19bc

Browse files
committed
fix: Add PHP opening tags to all code examples and remove future considerations section
1 parent 489454b commit 89e19bc

File tree

1 file changed

+15
-9
lines changed

1 file changed

+15
-9
lines changed

docs/google-server-tools.md

Lines changed: 15 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ composer require php-llm/llm-chain
2323
To use server tools, specify them in the model options when creating a Gemini instance:
2424

2525
```php
26+
<?php
27+
2628
use PhpLlm\LlmChain\Platform\Bridge\Google\Gemini;
2729
use PhpLlm\LlmChain\Platform\Bridge\Google\PlatformFactory;
2830

@@ -48,6 +50,8 @@ The URL Context tool allows Gemini to fetch and analyze content from web pages.
4850
- Understanding context from external sources
4951

5052
```php
53+
<?php
54+
5155
$llm = new Gemini('gemini-2.5-pro-preview-03-25', [
5256
'server_tools' => [
5357
'url_context' => true
@@ -66,6 +70,8 @@ $response = $chain->call($messages);
6670
The Google Search tool enables the model to search the web and incorporate search results into its responses:
6771

6872
```php
73+
<?php
74+
6975
$llm = new Gemini('gemini-2.5-pro-preview-03-25', [
7076
'server_tools' => [
7177
'google_search' => true
@@ -84,6 +90,8 @@ $response = $chain->call($messages);
8490
The Code Execution tool provides a sandboxed environment for running code:
8591

8692
```php
93+
<?php
94+
8795
$llm = new Gemini('gemini-2.5-pro-preview-03-25', [
8896
'server_tools' => [
8997
'code_execution' => true
@@ -102,6 +110,8 @@ $response = $chain->call($messages);
102110
You can enable multiple server tools simultaneously:
103111

104112
```php
113+
<?php
114+
105115
$llm = new Gemini('gemini-2.5-pro-preview-03-25', [
106116
'server_tools' => [
107117
'url_context' => true,
@@ -118,6 +128,8 @@ $llm = new Gemini('gemini-2.5-pro-preview-03-25', [
118128
For server tools that accept parameters, you can pass an array instead of `true`:
119129

120130
```php
131+
<?php
132+
121133
$llm = new Gemini('gemini-2.5-pro-preview-03-25', [
122134
'server_tools' => [
123135
'url_context' => [
@@ -132,6 +144,8 @@ $llm = new Gemini('gemini-2.5-pro-preview-03-25', [
132144
Server tools can be used alongside custom tools from the toolbox:
133145

134146
```php
147+
<?php
148+
135149
use PhpLlm\LlmChain\Chain\Toolbox\Tool\Clock;
136150
use PhpLlm\LlmChain\Chain\Toolbox\Toolbox;
137151

@@ -215,12 +229,4 @@ echo $response->getContent() . PHP_EOL;
215229
- API key must have appropriate permissions
216230
- Server tools may have usage quotas
217231
- Response times may vary based on the complexity of server tool operations
218-
- Not all Gemini model versions support all server tools
219-
220-
## Future Considerations
221-
222-
As the feature evolves, consider:
223-
224-
- Additional server tools may become available
225-
- Parameters for existing tools may be expanded
226-
- Integration patterns may be refined based on usage
232+
- Not all Gemini model versions support all server tools

0 commit comments

Comments
 (0)