diff --git a/ollama_python/endpoints/base.py b/ollama_python/endpoints/base.py index 2eb7623..bc7a27a 100644 --- a/ollama_python/endpoints/base.py +++ b/ollama_python/endpoints/base.py @@ -18,9 +18,7 @@ def _format_base_url(self, base_url: str) -> str: :param base_url: The base URL to format :return: The formatted base URL """ - if base_url.endswith("/"): - base_url = base_url[:-1] - return base_url + return base_url.removesuffix("/") def _stream( self, endpoint: str, parameters: dict, return_type: Optional[Callable] = None