Hi, I have downloaded the notebook on my computer (Ubuntu 22.04) and try to run it using Ollama
and mistral
:
from langchain_ollama import ChatOllama
# Replace ChatOpenAI with ChatOllama
model = ChatOllama(
model="mistral",
temperature=0.0,
# other params ...
)
I receive an AttributeError
message: AttributeError: 'NoneType' object has no attribute 'queries'
, pointing to the following part in the research_plan_node
:
for q in queries.queries:
response = tavily.search(query=q, max_results=2)
for r in response['results']:
content.append(r['content'])
Someone encountered this error?
Here is the full error message:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
Cell In[31], line 2
1 thread = {"configurable": {"thread_id": "1"}}
----> 2 for s in graph.stream({
3 'task': "what is the difference between langchain and langsmith",
4 "max_revisions": 2,
5 "revision_number": 1,
6 }, thread):
7 print(s)
File ~/anaconda3/envs/kg/lib/python3.9/site-packages/langgraph/pregel/__init__.py:1029, in Pregel.stream(self, input, config, stream_mode, output_keys, interrupt_before, interrupt_after, debug)
1026 break
1028 # panic on failure or timeout
-> 1029 _panic_or_proceed(done, inflight, loop.step)
1030 # don't keep futures around in memory longer than needed
1031 del done, inflight, futures
File ~/anaconda3/envs/kg/lib/python3.9/site-packages/langgraph/pregel/__init__.py:1456, in _panic_or_proceed(done, inflight, step, timeout_exc_cls)
1454 inflight.pop().cancel()
1455 # raise the exception
-> 1456 raise exc
1458 if inflight:
1459 # if we got here means we timed out
1460 while inflight:
...
----> 7 for q in queries.queries:
8 response = tavily.search(query=q, max_results=2)
9 for r in response['results']:
AttributeError: 'NoneType' object has no attribute 'queries'
Output is truncated. View as a scrollable element or open in a text editor. Adjust cell output settings...