brainqub3 / jar3d_meta_expert

Versatile agents for long running, research intensive tasks.
MIT License
371 stars 112 forks source link

Seems to crash consistently in llmsherpa #11

Open FellowTraveler opened 3 months ago

FellowTraveler commented 3 months ago
image
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/au/src/meta_expert/agents/jar3d.py", line 681, in <module>
    for event in workflow.stream(state, limit):
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/langgraph/pregel/__init__.py", line 963, in stream
    _panic_or_proceed(done, inflight, step)
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/langgraph/pregel/__init__.py", line 1489, in _panic_or_proceed
    raise exc
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/langgraph/pregel/retry.py", line 66, in run_with_retry
    task.proc.invoke(task.input, task.config)
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/langchain_core/runnables/base.py", line 2406, in invoke
    input = step.invoke(input, config, **kwargs)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/langgraph/utils.py", line 95, in invoke
    ret = context.run(self.func, input, **kwargs)
          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/au/src/meta_expert/agents/jar3d.py", line 660, in <lambda>
    graph.add_node("tool_expert", lambda state: ToolExpert(**tools_router_agent_kwargs).run(state=state))
                                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/au/src/meta_expert/agents/jar3d.py", line 514, in run
    scraper_response = self.use_tool("rag", tool_input=best_url, query=refined_query)
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/au/src/meta_expert/agents/jar3d.py", line 393, in use_tool
    results = rag_tool(url=tool_input, query=query)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/au/src/meta_expert/tools/rag_tool.py", line 67, in rag_tool
    doc = reader.read_pdf(url)
          ^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/llmsherpa/readers/file_reader.py", line 65, in read_pdf
    pdf_file = self._download_pdf(path_or_url)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/miniconda3/envs/meta_expert_env/lib/python3.11/site-packages/llmsherpa/readers/file_reader.py", line 41, in _download_pdf
    return pdf_file
           ^^^^^^^^
UnboundLocalError: cannot access local variable 'pdf_file' where it is not associated with a value
(meta_expert_env) meta_expert %                       
john-adeojo commented 3 months ago

@FellowTraveler LLM Sherpa has been known to struggle with certain types of PDFs. Could you provide the query that you used to get this result? I have recently made some updates to the repo, could you try using the updated repo?

FellowTraveler commented 3 months ago

Okay here is output from latest code.

PS great work on this project! Much respect.

image

Complete log: log.txt