Skip to content

Release 3.2.0

Compare
Choose a tag to compare
@thiswillbeyourgithub thiswillbeyourgithub released this 03 May 14:05
· 313 commits to main since this release

What's new

This release focuses on improving the command-line interface (especially handling piped input/output), enhancing language model interactions (switching defaults, better caching, Ollama support), and increasing overall stability through numerous bug fixes and testing improvements.

✨ Features

  • Added arguments to set specific keyword arguments (kwargs) for language models (--model_kwargs, --query_eval_model_kwargs) ([1392553]).
  • Introduced WDOC_LLM_REQUEST_TIMEOUT environment variable for LLM request timeouts (default 600s), useful for Ollama ([ec3c0c5]).
  • Switched default models from Claude Sonnet/Haiku to Gemini 1.5 Pro/Flash ([82ef10d]).
  • Unified LLM handling to primarily use ChatLiteLLM, removing direct ChatOpenAI usage ([30a0f0c]).
  • Enabled cost tracking for queries, storing the cost in the output ([e7753af]).
  • Added automatic download of nltk punkt tokenizer during post-installation ([44f5bf8]).
  • Overhauled Command Line Interface (CLI) argument parsing for wdoc and wdoc parse using fire ([7c51ed2], [2f4748d]).
  • Removed the --pipe argument, relying on automatic stdin/stdout detection ([b03e79a], [2e6c1dd], [838f164]).
  • Removed the separate wdoc_parse_file entry point; use wdoc parse instead ([2e878d2]).
  • Added a new script media_url_finder.py ([beaf8fa]).

🐛 Fixes

  • LLM PLACEHOLDER Caching:
    • Resolved issues with LLM caching, including invalidation when kwargs change and LangChain's SQLite cache ([cb785da], [3e3e753]).
    • Fixed edge cases in thinking block parsing for models like Gemini and updated tags (<thinking> -> <think>) ([e111bdb], [d0ae21a], [ca9245b], [99ed332]).
    • Corrected underflow errors in cost calculation due to low LLM prices ([3f18f5d], [95a1984]).
    • Addressed issues specific to Ollama: API key requirement relaxation, price assumption (zero), litellm naming (ollama_chat -> ollama), and context window estimation ([d2f92a3], [5784b25], [43c6340], [c3c15e1]).
    • Fixed handling of testing/testing models and associated parameters ([b995197], [91b5e67], [7cf840c], [9a7b95b]).
    • Fixed query_retrievers parsing ([02d7412]).
    • Pinned litellm version for stability ([1b17c78]).
  • CLI PLACEHOLDER Piping:
    • Improved detection and handling of piped input/output ([2e6c1dd], [509626a], [db2fa0f]).
    • Fixed crashes and hangs when using pipes, especially with long inputs or specific test commands ([f59f34b], [414de8d], [b95b125], [826e7aa], [b6f7fd7], [177be6b]).
    • Corrected argument parsing issues affecting the --help command ([c909337]).
    • Ensured logs are not colorized and Markdown rendering is disabled when outputting to a pipe ([f1d63cd], [fe2665c]).
    • Fixed issues where debug prints or warnings were incorrectly suppressed or handled ([64fcd60], [a7724ff]).
  • General:

🧪 Testing

  • Improved test setup for caching, using separate directories and disabling cache where necessary ([9104f86], [89f4859], [085a87e], [6935fe7]).
  • Added tests for OpenRouter/default models, piping functionality, summary/query tasks with testing models, and environment variable handling ([06e35b0], [bbb8371], [caae34c], [cb9d237], [eaafafd], [1f835eb]).
  • Refactored pipe tests to use subprocess explicitly and fixed related issues (stderr redirection, pytest capture, shell usage) ([38a3571], [7f3249a], [573acf9]). (Note: Some pipe tests were later commented out ([45cf419])).

⚡ Enhancements

  • Reworked logic for detecting and modifying model parameters based on the task ([564c4f9]).
  • Improved load_media function to handle online media more robustly by finding and clicking appropriate buttons ([049c9cb], [67772f8], [c5828d3]).
  • Added checks to prevent exceeding total token limits during summarization ([9bdcabc]).
  • Refined logging levels and Markdown printing logic ([edfec82], [4ca394c], [895a60f]).

📚 Documentation

⚙️ Build PLACEHOLDER Chore

Commits details since the last release

bumpver.toml
docs/source/conf.py
setup.py
wdoc/wdoc.py

  • [30a0f0c] by @thiswillbeyourgithub, 24 minutes ago:
    new: stop using both ChatOpenAI and ChatLiteLLM
    ChatLiteLLM seems to now work reliably

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

tests/test_wdoc.py
wdoc/docs/help.md
wdoc/utils/llm.py
wdoc/utils/retrievers.py
wdoc/utils/tasks/query.py

tests/conftest.py

wdoc/utils/misc.py

.gitignore

tests/test_wdoc.py
wdoc/utils/misc.py

wdoc/utils/tasks/summarize.py
wdoc/wdoc.py

wdoc/wdoc.py

wdoc/utils/llm.py

wdoc/wdoc.py

wdoc/wdoc.py

tests/test_wdoc.py

wdoc/utils/customs/fix_llm_caching.py

wdoc/docs/help.md
wdoc/utils/llm.py

wdoc/docs/help.md

tests/test_wdoc.py

wdoc/wdoc.py

  • [d0ae21a] by @thiswillbeyourgithub, 2 hours ago:
    fix: reworked and improved how thinking_answer_parser works
    some weak models could fail despite usable results

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

wdoc/utils/misc.py

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

wdoc/utils/misc.py

wdoc/utils/misc.py
wdoc/utils/prompts.py
wdoc/utils/tasks/query.py

tests/test_wdoc.py

tests/test_wdoc.py

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/utils/tasks/summarize.py

wdoc/utils/llm.py
wdoc/wdoc.py

  • [a6effc0] by @thiswillbeyourgithub, 4 hours ago:
    fix: stop setting specific parameters depending on the task
    some models break down and it's best to leave it to the user and the
    defaults

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

wdoc/wdoc.py

Signed-off-by: thiswillbeyourgithub 26625900+thiswillbeyourgithub@users.noreply.github.com

wdoc/utils/llm.py

wdoc/docs/examples.md

wdoc/docs/examples.md

wdoc/docs/examples.md

wdoc/docs/examples.md

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/docs/help.md
wdoc/wdoc.py

wdoc/docs/help.md
wdoc/wdoc.py

wdoc/utils/llm.py

wdoc/utils/llm.py

  • [ec3c0c5] by @thiswillbeyourgithub (aider), 2 days ago:
    feat: Add WDOC_LLM_REQUEST_TIMEOUT env var with default value of 600
    useful for ollama

wdoc/docs/help.md
wdoc/utils/env.py
wdoc/utils/tasks/summarize.py
wdoc/wdoc.py

wdoc/utils/llm.py

wdoc/utils/misc.py

wdoc/docs/examples.md

README.md

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/main.py

wdoc/main.py

wdoc/main.py

wdoc/main.py

wdoc/main.py

tests/test_wdoc.py
wdoc/main.py
wdoc/utils/misc.py
wdoc/wdoc.py

wdoc/main.py

README.md
wdoc/utils/env.py

wdoc/main.py

wdoc/main.py
wdoc/wdoc.py

wdoc/init.py

wdoc/utils/env.py
wdoc/utils/logger.py

wdoc/init.py

wdoc/utils/misc.py
wdoc/wdoc.py

wdoc/utils/env.py

wdoc/main.py

README.md
setup.py
wdoc/main.py

wdoc/main.py

README.md
wdoc/main.py

wdoc/main.py

wdoc/main.py
wdoc/utils/misc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/main.py
wdoc/utils/misc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

tests/test_wdoc.py

wdoc/wdoc.py

wdoc/utils/llm.py

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/docs/help.md

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/utils/llm.py
wdoc/utils/misc.py
wdoc/wdoc.py

wdoc/wdoc.py

wdoc/utils/misc.py

wdoc/main.py
wdoc/utils/misc.py

tests/test_wdoc.py

wdoc/wdoc.py

wdoc/utils/batch_file_loader.py

wdoc/main.py

README.md
scripts/MediaURLFinder/README.md
scripts/MediaURLFinder/media_url_finder.py

wdoc/utils/loaders.py

wdoc/utils/loaders.py

wdoc/utils/loaders.py

wdoc/utils/loaders.py

wdoc/utils/loaders.py

wdoc/utils/loaders.py

wdoc/utils/logger.py

wdoc/utils/env.py

setup.py

wdoc/init.py

wdoc/main.py

setup.py

wdoc/wdoc.py

wdoc/wdoc.py

wdoc/utils/misc.py

wdoc/main.py

wdoc/utils/logger.py
wdoc/wdoc.py

wdoc/utils/logger.py

wdoc/wdoc.py

wdoc/main.py

wdoc/utils/tasks/summarize.py

README.md

wdoc/utils/logger.py
wdoc/wdoc.py

.gitignore

wdoc/utils/logger.py

wdoc/utils/logger.py

wdoc/wdoc.py

.gitignore

.gitignore