Refactor initialization of CogneeClient to use bool for API mode determination
This commit is contained in:
parent
c58d9ad12f
commit
0031a13f44
1 changed files with 1 additions and 1 deletions
|
|
@ -32,7 +32,7 @@ class CogneeClient:
|
|||
def __init__(self, api_url: Optional[str] = None, api_token: Optional[str] = None):
|
||||
self.api_url = api_url.rstrip("/") if api_url else None
|
||||
self.api_token = api_token
|
||||
self.use_api = api_url is not None
|
||||
self.use_api = bool(api_url)
|
||||
|
||||
if self.use_api:
|
||||
logger.info(f"Cognee client initialized in API mode: {self.api_url}")
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue