refactor: make readonly context optional in tool predicate

PiperOrigin-RevId: 759429453
This commit is contained in:
Xiang (Sean) Zhou 2025-05-15 21:06:17 -07:00 committed by Copybara-Service
parent 770ecd8bb3
commit f0e11c72ab

View File

@ -17,7 +17,7 @@ class ToolPredicate(Protocol):
"""
def __call__(
self, tool: BaseTool, readonly_context: ReadonlyContext = None
self, tool: BaseTool, readonly_context: Optional[ReadonlyContext] = None
) -> bool:
"""Decide whether the passed-in tool should be exposed to LLM based on the