File tree Expand file tree Collapse file tree 2 files changed +3
-73
lines changed Expand file tree Collapse file tree 2 files changed +3
-73
lines changed Original file line number Diff line number Diff line change 34
34
from .agents .run_config import RunConfig
35
35
from .artifacts .base_artifact_service import BaseArtifactService
36
36
from .artifacts .in_memory_artifact_service import InMemoryArtifactService
37
+ from .code_executors .built_in_code_executor import BuiltInCodeExecutor
37
38
from .events .event import Event
38
39
from .memory .base_memory_service import BaseMemoryService
39
40
from .memory .in_memory_memory_service import InMemoryMemoryService
40
41
from .sessions .base_session_service import BaseSessionService
41
42
from .sessions .in_memory_session_service import InMemorySessionService
42
43
from .sessions .session import Session
43
44
from .telemetry import tracer
44
- from .tools ._built_in_code_execution_tool import built_in_code_execution
45
45
46
46
logger = logging .getLogger ('google_adk.' + __name__ )
47
47
@@ -409,8 +409,8 @@ def _new_invocation_context(
409
409
f'CFC is not supported for model: { model_name } in agent:'
410
410
f' { self .agent .name } '
411
411
)
412
- if built_in_code_execution not in self .agent .canonical_tools ( ):
413
- self .agent .tools . append ( built_in_code_execution )
412
+ if not isinstance ( self .agent .code_executor , BuiltInCodeExecutor ):
413
+ self .agent .code_executor = BuiltInCodeExecutor ( )
414
414
415
415
return InvocationContext (
416
416
artifact_service = self .artifact_service ,
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments