Update the usage of built-in code execution in documentation and sample agent.

PiperOrigin-RevId: 758997215
This commit is contained in:
Liang Wu 2025-05-14 23:16:28 -07:00 committed by Copybara-Service
parent 3686608f8d
commit 9c2358e2a5
2 changed files with 3 additions and 4 deletions

View File

@ -15,7 +15,7 @@
"""Data science agent."""
from google.adk.agents.llm_agent import Agent
from google.adk.tools import built_in_code_execution
from google.adk.code_executors.built_in_code_executor import BuiltInCodeExecutor
def base_system_instruction():
@ -96,5 +96,5 @@ When plotting trends, you should make sure to sort and order the data by the x-a
""",
tools=[built_in_code_execution],
code_executor=BuiltInCodeExecutor(),
)

View File

@ -200,8 +200,7 @@ class LlmAgent(BaseAgent):
Check out available code executions in `google.adk.code_executor` package.
NOTE: to use model's built-in code executor, don't set this field, add
`google.adk.tools.built_in_code_execution` to tools instead.
NOTE: to use model's built-in code executor, use the `BuiltInCodeExecutor`.
"""
# Advance features - End