NeMo-Guardrails icon indicating copy to clipboard operation
NeMo-Guardrails copied to clipboard

Older LangChain Dependency ( 0.0.137 ) breaks asynchronous Execution

Open unownone opened this issue 2 years ago • 0 comments

I am using langchain (^0.0.141) and it works perfectly for our see needs by creating a asyncio.create_task and a asyncio.Queue() to listen from.

But NeMo-Guardrails==0.1.0 requires langchain==0.0.137 which throws an unimplemented error every time the coroutine is called.

ERROR:asyncio:Task exception was never retrieved
future: <Task finished name='Task-12' coro=<Chain.acall() done, defined at path/to/.venv/lib/python3.10/site-packages/langchain/chains/base.py:120> exception=NotImplementedError()>
Traceback (most recent call last):
  File "path/to/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 154, in acall
    raise e
  File "path/to/.venv/lib/python3.10/site-packages/langchain/chains/base.py", line 148, in acall
    outputs = await self._acall(inputs)
  File "path/to/.venv/lib/python3.10/site-packages/langchain/chains/conversational_retrieval/base.py", line 103, in _acall
    docs = await self._aget_docs(new_question, inputs)
  File "path/to/.venv/lib/python3.10/site-packages/langchain/chains/conversational_retrieval/base.py", line 150, in _aget_docs
    docs = await self.retriever.aget_relevant_documents(question)
  File "path/to/.venv/lib/python3.10/site-packages/langchain/vectorstores/base.py", line 236, in aget_relevant_documents
    docs = await self.vectorstore.asimilarity_search(
  File "path/to/.venv/lib/python3.10/site-packages/langchain/vectorstores/base.py", line 84, in asimilarity_search
    raise NotImplementedError
NotImplementedError

unownone avatar Apr 28 '23 23:04 unownone