From 916fe1183e98215319881fe80a0017682e8a22cc Mon Sep 17 00:00:00 2001 From: Michael Yang Date: Thu, 21 Dec 2023 16:38:52 -0800 Subject: [PATCH] s/base/base_url/ --- ollama/_client.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ollama/_client.py b/ollama/_client.py index 26c4202..997e3e2 100644 --- a/ollama/_client.py +++ b/ollama/_client.py @@ -19,13 +19,13 @@ class BaseClient: - def __init__(self, client, base_url='http://127.0.0.1:11434') -> None: + def __init__(self, client, base_url: str = 'http://127.0.0.1:11434') -> None: self._client = client(base_url=base_url, follow_redirects=True, timeout=None) class Client(BaseClient): - def __init__(self, base='http://localhost:11434') -> None: - super().__init__(httpx.Client, base) + def __init__(self, base_url: str = 'http://localhost:11434') -> None: + super().__init__(httpx.Client, base_url) def _request(self, method: str, url: str, **kwargs) -> httpx.Response: response = self._client.request(method, url, **kwargs) @@ -223,8 +223,8 @@ def show(self, model: str) -> Mapping[str, Any]: class AsyncClient(BaseClient): - def __init__(self, base='http://localhost:11434') -> None: - super().__init__(httpx.AsyncClient, base) + def __init__(self, base_url: str = 'http://localhost:11434') -> None: + super().__init__(httpx.AsyncClient, base_url) async def _request(self, method: str, url: str, **kwargs) -> httpx.Response: response = await self._client.request(method, url, **kwargs)