- Updated prompt construction to use `tokenizer.apply_chat_template()` for chat-tuned models
- Ensured backward compatibility with non-chat models by falling back to manual prompt formatting
- Resolves issue where models would echo both user and assistant messages due to incorrect flat-text prompts
bugfix to Error: "str" object has no attribute "pad_token_id"
- Add cancel_event checks in the streamer loop to enable true cancellation during response generation. :contentReference[oaicite:1]{index=1}
- Launch DuckDuckGo web search in a background thread to prevent blocking the streaming pipeline. :contentReference[oaicite:2]{index=2}
- Implement dtype fallback (bfloat16 → float16 → float32) for broader hardware compatibility. :contentReference[oaicite:3]{index=3}
- Suppress repeated debug messages after the first token to avoid UI flooding. :contentReference[oaicite:4]{index=4}
- Remove unused imports and streamline load_pipeline caching logic for cleaner code. :contentReference[oaicite:5]{index=5}
bugfixc: not using pipeline for response generation