-
Notifications
You must be signed in to change notification settings - Fork 24
Conversation
Yes, another good one :) came across that with Claude as well - also called "server tools" there - so i guess the naming is good 👍 |
examples/google/server-tools.php
Outdated
); | ||
|
||
// Available server-side tools as of 2025-06-28: url_context, google_search, code_execution | ||
$response = $chain->call($messages, ['server_tools' => ['url_context' => true]]); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what do you think about enabling those server tools on the model class instead? feels a bit more like a feature of that model than of the chain to me
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean just set the $options
on the model instead of the call? Sure, I'll adjust the example
f0da350
to
cde1175
Compare
tested that all other toolcall examples still work with the new serializer setting - but with that server-tool example i always get a 429 response - guess that's due to my google setup atm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @valtzu :)
- Created detailed documentation explaining URL Context, Google Search, and Code Execution tools - Added usage examples, configuration options, and best practices - Updated README.md to reference the new documentation - Covers implementation from PR #356
This PR was merged into the main branch. Discussion ---------- feat: Google Gemini server tools | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Docs? | no | Issues | | License | MIT Cherry picking php-llm/llm-chain#356 Commits ------- 88ca18a feat: Google Gemini server tools (#356)
This PR was merged into the main branch. Discussion ---------- feat: Google Gemini server tools | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | Docs? | no | Issues | | License | MIT Cherry picking php-llm/llm-chain#356 Commits ------- 88ca18a feat: Google Gemini server tools (#356)
Add support for Google server-side tools like Google search, URL context & Code execution
I thought of using
Tool
classes for this but didn't find any solution I was happy with, so went the easy way for now.Ideally no changes would've been required for this approach at all, but there were 2 issues:
new \ArrayObject()
tools
incall
's$options
, then all toolbox tools go away – hence the newserver_tools
(open to better naming –remote_tools
?)If someone has already given this a thought, please share your thoughts / if there is some clear better approach