Skip to content

Commit

Permalink
fix: Simplify constructor code in ToolboxClient.
Browse files Browse the repository at this point in the history
  • Loading branch information
anubhav756 committed Nov 12, 2024
1 parent 0dc6548 commit f0cf9ec
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions sdks/langchain/src/toolbox_langchain_sdk/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,8 @@ def __init__(self, url: str, session: Optional[ClientSession] = None):
Default: None
"""
self._url: str = url

if session:
self._should_close_session: bool = False
self._session: ClientSession = session
else:
self._should_close_session: bool = True
self._session: ClientSession = ClientSession()
self._should_close_session: bool = session != None
self._session: ClientSession = session or ClientSession()

async def close(self) -> None:
"""
Expand Down

0 comments on commit f0cf9ec

Please sign in to comment.