Skip to content

Commit c294769

Browse files
committed
fix: Check bg loop/thread value
1 parent c4fa2ee commit c294769

File tree

1 file changed

+3
-0
lines changed
  • packages/toolbox-langchain/src/toolbox_langchain

1 file changed

+3
-0
lines changed

packages/toolbox-langchain/src/toolbox_langchain/client.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,9 @@ async def aload_toolset(
183183
asyncio.run_coroutine_threadsafe(coro, self.__core_sync_client._loop)
184184
)
185185

186+
if not self.__core_sync_client._loop or not self.__core_sync_client._thread:
187+
raise ValueError("Background loop or thread cannot be None.")
188+
186189
core_sync_tools = [
187190
ToolboxSyncTool(
188191
core_tool,

0 commit comments

Comments
 (0)