Skip to content

v0.2.0 — Exhaustive bug fix release

Choose a tag to compare

@iblameandrew iblameandrew released this 06 Jun 20:08
· 3 commits to main since this release

Exhaustive bug hunt & fixes

Critical fixes

  • Missing dependency: added semanticscholar to requirements.txt (app would fail to install from a clean env)
  • Broken search loop: semantic_scholar_search_node was re-calling sch.search_paper(query, bulk=True) inside a while loop, which re-creates the same paginated iterator each iteration; seen_urls then drops all duplicates and the loop never makes real progress (and would hammer the rate limiter). Now iterates PaginatedResults directly.
  • Broken LangChain imports: migrated to non-deprecated packages for LangChain 1.x:
    • langchain.text_splitter -> langchain_text_splitters
    • langchain_community.chat_models.ChatOllama -> langchain_ollama.ChatOllama
    • langchain_community.embeddings.OllamaEmbeddings -> langchain_ollama.OllamaEmbeddings

Cleanup

  • Removed unused imports (numpy as np, random, fpdf, PyPDFLoader, langchain_community.document_loaders)
  • Hoisted import tempfile to module top
  • Removed leftover debug print() statements in filter_by_relevance_node
  • Tightened relevance LLM check: was "yes" in answer.content.lower() (matches "yesterday", "yellowness"); now exact Yes/No match
  • Dropped dead deps from requirements.txt: arxiv, pypdf, langchain-google-genai, duplicate python-dotenv
  • Added langchain-text-splitters and langchain-ollama to requirements.txt

PDF report generation

  • Moved temp-PNG cleanup in generate_pdf_report to after pdf.output() (was deleting the file before the PDF was finalized, fragile on Windows)
  • Wrapped os.remove in try/except OSError

Diagram & chat

  • Replaced non-standard Mermaid self-loop edge (B -- label --> B) with a single labeled node (renders correctly)
  • Wrapped chat LLM call in try/except so a model failure surfaces a graceful error in chat history instead of NameError
  • Strip <think>...</think> blocks from chat responses (already done for the academic report; now consistent for chat)