This commit is contained in:
Yongtao Huang 2025-11-14 14:00:24 -08:00 committed by GitHub
commit f652b263ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -1293,16 +1293,6 @@ def _copy_tools(tools: Optional[Sequence[Union[Mapping[str, Any], Tool, Callable
yield convert_function_to_tool(unprocessed_tool) if callable(unprocessed_tool) else Tool.model_validate(unprocessed_tool)
def _as_path(s: Optional[Union[str, PathLike]]) -> Union[Path, None]:
if isinstance(s, (str, Path)):
try:
if (p := Path(s)).exists():
return p
except Exception:
...
return None
def _parse_host(host: Optional[str]) -> str:
"""
>>> _parse_host(None)