File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2020from google .genai import types
2121from pydantic import BaseModel
2222from pydantic import ConfigDict
23+ from pydantic import Field
24+ from pydantic import PrivateAttr
2325
2426from ..artifacts .base_artifact_service import BaseArtifactService
2527from ..auth .credential_service .base_credential_service import BaseCredentialService
@@ -154,10 +156,12 @@ class InvocationContext(BaseModel):
154156 run_config : Optional [RunConfig ] = None
155157 """Configurations for live agents under this invocation."""
156158
157- plugin_manager : PluginManager = PluginManager ( )
159+ plugin_manager : PluginManager = Field ( default_factory = PluginManager )
158160 """The manager for keeping track of plugins in this invocation."""
159161
160- _invocation_cost_manager : _InvocationCostManager = _InvocationCostManager ()
162+ _invocation_cost_manager : _InvocationCostManager = PrivateAttr (
163+ default_factory = _InvocationCostManager
164+ )
161165 """A container to keep track of different kinds of costs incurred as a part
162166 of this invocation.
163167 """
You can’t perform that action at this time.
0 commit comments