Skip to content

Commit c4fa2ee

Browse files
committed
fix: Ensure bg loop/thread not null
1 parent 0a8dd69 commit c4fa2ee

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
@@ -100,6 +100,9 @@ async def aload_tool(
100100
asyncio.run_coroutine_threadsafe(coro, self.__core_sync_client._loop)
101101
)
102102

103+
if not self.__core_sync_client._loop or not self.__core_sync_client._thread:
104+
raise ValueError("Background loop or thread cannot be None.")
105+
103106
core_sync_tool = ToolboxSyncTool(
104107
core_tool,
105108
self.__core_sync_client._loop,

0 commit comments

Comments
 (0)