[PR #20907] [CLOSED] feat(functions): Add "Neural Log" Visualizer for Reasoning Models (DeepSeek R1) #64678

Closed
opened 2026-05-06 10:19:26 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/20907
Author: @sjhddh
Created: 1/23/2026
Status: Closed

Base: mainHead: feat/deepseek-r1-neural-log


📝 Commits (1)

  • 1cddde4 feat(functions): Add DeepSeek R1 Neural-Log Visualizer

📊 Changes

1 file changed (+116 additions, -0 deletions)

View changed files

examples/filters/r1_neural_log.py (+116 -0)

📄 Description

Summary

This PR introduces a new Function/Filter (examples/filters/r1_neural_log.py) designed to enhance the Developer Experience (DX) when working with reasoning models like DeepSeek R1.

Problem:
Reasoning models output their internal thought process within <think> tags. Currently, this is displayed as raw text or hidden, making it difficult to distinguish between the "reasoning trace" and the final answer.

Solution:
The Neural Log Visualizer intercepts these tags and transforms the content into a stylized "System Log" or "Cyberpunk Terminal" block. This visual separation allows users to inspect the logic chain without it cluttering the final response.

Features

  • Automatic Interception: Detects <think> tags (even if unclosed during streaming).
  • Theming: Includes "Cyberpunk", "Matrix", and "Minimalist" themes configurable via Valves.
  • Log Simulation: Adds pseudo-timestamps and status prefixes (e.g., [NEURAL]) to each line of reasoning.
  • Universal Compatibility: Works with any model that uses configurable start/end tags (default: <think>).

Test Plan

  1. Copy the content of examples/filters/r1_neural_log.py.
  2. Go to Open WebUI > Workspace > Functions > + (Create).
  3. Paste the code and save.
  4. Enable the filter.
  5. Chat with a model that outputs <think> tags (or simulate it).
  6. Observe the stylized output.

Screenshot

(See description in issue/request)

CLA

contributor license agreement


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/20907 **Author:** [@sjhddh](https://github.com/sjhddh) **Created:** 1/23/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feat/deepseek-r1-neural-log` --- ### 📝 Commits (1) - [`1cddde4`](https://github.com/open-webui/open-webui/commit/1cddde4ab34ee976833e657f35d30a6821bcfc39) feat(functions): Add DeepSeek R1 Neural-Log Visualizer ### 📊 Changes **1 file changed** (+116 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `examples/filters/r1_neural_log.py` (+116 -0) </details> ### 📄 Description ## Summary This PR introduces a new Function/Filter (`examples/filters/r1_neural_log.py`) designed to enhance the Developer Experience (DX) when working with reasoning models like DeepSeek R1. **Problem:** Reasoning models output their internal thought process within `<think>` tags. Currently, this is displayed as raw text or hidden, making it difficult to distinguish between the "reasoning trace" and the final answer. **Solution:** The **Neural Log Visualizer** intercepts these tags and transforms the content into a stylized "System Log" or "Cyberpunk Terminal" block. This visual separation allows users to inspect the logic chain without it cluttering the final response. ## Features - **Automatic Interception:** Detects `<think>` tags (even if unclosed during streaming). - **Theming:** Includes "Cyberpunk", "Matrix", and "Minimalist" themes configurable via Valves. - **Log Simulation:** Adds pseudo-timestamps and status prefixes (e.g., `[NEURAL]`) to each line of reasoning. - **Universal Compatibility:** Works with any model that uses configurable start/end tags (default: `<think>`). ## Test Plan 1. Copy the content of `examples/filters/r1_neural_log.py`. 2. Go to Open WebUI > Workspace > Functions > + (Create). 3. Paste the code and save. 4. Enable the filter. 5. Chat with a model that outputs `<think>` tags (or simulate it). 6. Observe the stylized output. ## Screenshot (See description in issue/request) ## CLA contributor license agreement --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-06 10:19:26 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#64678