summaryrefslogtreecommitdiff
path: root/src/ollama_web/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-09ollama側のレスポンスが空の場合に1回リトライする処理に ↵tanaka takashi
変更 トークン数の累積計算処理削除
2026-07-09停止ボタンの不具合修正(停止ボタンを押すと送信できな ↵tanaka takashi
くなるバグを修正) LLMがメッセージ生成途上で画面スクロールしにくい問題を修正 チャットメッセージバルーンをコピペ対応 トークン消費量をリングゲージで可視化(表示タイミングに不具合あり)
2026-06-27一般設定の追加(UI/Ollama設定) settings.jsonに設定を保存 ↵tanaka takashi
UIから言語設定対応 Ollama設定でシステムプロンプト, temperature, コンテキスト長などのパラメータを設定可能
2026-06-27マルチ言語対応。MCP設定画面の言語切り替え表示にバグã ↵tanaka takashi
�‚り
2026-06-27MCP toolsの名称による実行制限処理の削除。tanaka takashi
2026-06-27MCP server機能をセキュア化tanaka takashi
2026-06-26MCP機能追加tanaka takashi
2026-06-25各モデルの機能を取得するように修正。thinking, tools, ↵tanaka takashi
vision対応モデルに応じて機能を変えるように変更。クリアボタンのバグを修正
2026-06-24Harden web UI securitytanaka takashi
2026-06-24Web検索などのツール呼び出しによる応答不能を回避tanaka takashi
2026-06-23ストリーミング出力対応tanaka takashi
ツール呼び出し、thinkingが応答欄の枠外にでる不具合修正
2026-06-23基本機能実装tanaka takashi