diff --git a/ollama/_client.py b/ollama/_client.py index dde82ac..a9d65aa 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -80,7 +80,7 @@ def __init__( self, host: Optional[str] = None, *, - follow_redirects: bool | None = None, + follow_redirects: Optional[bool] = None, timeout: Any = None, headers: Optional[Mapping[str, str]] = None, **httpx_kwargs: Any, @@ -99,8 +99,8 @@ def __init__( self, host: Optional[str] = None, *, - client: httpx.Client | None = None, - follow_redirects: bool | None = None, + client: Optional[httpx.Client] = None, + follow_redirects: Optional[bool] = None, timeout: Any = None, headers: Optional[Mapping[str, str]] = None, **httpx_kwargs: Any, @@ -134,6 +134,7 @@ def _request( cls: Type[T], method: str, path: str, + *, stream: Literal[False] = False, **kwargs, ) -> T: ... @@ -144,6 +145,7 @@ def _request( cls: Type[T], method: str, path: str, + *, stream: Literal[True] = True, **kwargs, ) -> Iterator[T]: ... @@ -154,6 +156,7 @@ def _request( cls: Type[T], method: str, path: str, + *, stream: bool = False, **kwargs, ) -> Union[T, Iterator[T]]: ... @@ -629,7 +632,7 @@ def __init__( self, host: Optional[str] = None, *, - follow_redirects: bool | None = None, + follow_redirects: Optional[bool] = None, timeout: Any = None, headers: Optional[Mapping[str, str]] = None, **httpx_kwargs: Any, @@ -648,8 +651,8 @@ def __init__( self, host: Optional[str] = None, *, - client: httpx.AsyncClient | None = None, - follow_redirects: bool | None = None, + client: Optional[httpx.AsyncClient] = None, + follow_redirects: Optional[bool] = None, timeout: Any = None, headers: Optional[Mapping[str, str]] = None, **httpx_kwargs: Any,