summaryrefslogtreecommitdiff
path: root/tests/test_llm.py
AgeCommit message (Collapse)Author
2026-08-16refactor: streamline chat flow and improve diagnosticstanaka takashi
Store server.log inside OLLAMA_WEB_DATA_DIR and manage the ollama-web file handler through the Starlette lifespan. Close and detach the handler on shutdown to prevent duplicate records and Windows file locks when applications are recreated. Stop converting DuckDuckGo provider failures into empty search results. Record a query-safe traceback, re-raise the original exception, and let ToolRegistry expose the exception type and message as a tool error without adding or spoofing Referer headers. Remove the unused non-streaming chat_with_tools implementation and its private helpers. Move capability, options, standard tool, MCP tool, and final tools=[] regression coverage onto the production streaming path. Add integration coverage for data/server.log placement, handler cleanup, repeated lifespans, and provider 403 diagnostics. Update the Unreleased changelog entry. Validated with 118 tests, Ruff, mypy, diff checks, real DuckDuckGo searches, successful result-page fetches, and observable 401/403 responses from sites that reject automated retrieval.
2026-08-16fix(llm): 上限到達後のツール呼び出しを無効化tanaka takashi
ツールラウンド上限到達後の最終回答生成でも effective_tools を渡していたため、コメント上の「ツールなしで最終回答」と実際のリクエストが一致していなかった。モデルが最終段階で再び tool_calls を生成できる状態も残っていた。 非ストリーミング版とストリーミング版の最終Ollama呼び出しを tools=[] に変更する。通常ラウンドでは従来どおり標準ツールとMCPツールを公開し、上限到達後だけ既存のツール結果から回答をまとめるようにする。 標準ツールとMCPツールの回帰テストを追加し、通常ラウンドにはツール定義が渡ること、最終呼び出しでは空になること、ツール実行・上限通知・最終delta・doneイベントが維持されることを検証した。全115テスト、Ruff、mypy、および実モデルによるWeb検索と複数回スクレイピングの確認を完了している。
2026-08-02scrape_url / pdf_to_text / search_and_fetch ↵tanaka takashi
はページング(継続トークン方式)に対応 mypy 6エラー修正
2026-07-09停止ボタンの不具合修正(停止ボタンを押すと送信できな ↵tanaka takashi
くなるバグを修正) LLMがメッセージ生成途上で画面スクロールしにくい問題を修正 チャットメッセージバルーンをコピペ対応 トークン消費量をリングゲージで可視化(表示タイミングに不具合あり)
2026-06-25各モデルの機能を取得するように修正。thinking, tools, ↵tanaka takashi
vision対応モデルに応じて機能を変えるように変更。クリアボタンのバグを修正