[PR #23870] [CLOSED] Add Suggest functionality #98456

Closed
opened 2026-05-16 01:15:58 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/23870
Author: @VBWizard
Created: 4/18/2026
Status: Closed

Base: mainHead: suggest-button


📝 Commits (10+)

  • 878de68 Add memchat Postgres memory backend with per-chat toggle
  • ea7dd91 Refine memory injection and tool split for change-memory-injection
  • b84c078 Fix multimodal memory injection and remove debug payload dump
  • 26f1724 Address Codex P1/P2: multimodal injection order and steps clamping
  • 60a2c4e Guard against null user message content in memory injection
  • 08b03a8 PR #1 to main - Refine memory injection and tool split for change-memory-injection
  • 62f7f08 Add per-message char cap to context formatting (MEMCHAT_MAX_MSG_CHARS)
  • e6200ca Fix zero char limit handling in _truncate (MEMCHAT_MAX_MSG_CHARS=0)
  • 9c1e0b7 PR #1 to main - Refine memory injection and tool split for change-memory-injection
  • 5f0aa14 Add suggest generation backend and admin panel config

📊 Changes

19 files changed (+1609 additions, -183 deletions)

View changed files

📝 backend/dev.sh (+3 -1)
📝 backend/open_webui/config.py (+65 -0)
📝 backend/open_webui/main.py (+9 -0)
backend/open_webui/retrieval/memchat_db.py (+698 -0)
📝 backend/open_webui/routers/chats.py (+14 -1)
📝 backend/open_webui/routers/memories.py (+42 -58)
📝 backend/open_webui/routers/tasks.py (+83 -0)
📝 backend/open_webui/tools/builtin.py (+106 -11)
📝 backend/open_webui/utils/middleware.py (+131 -11)
📝 backend/open_webui/utils/task.py (+9 -0)
📝 backend/open_webui/utils/tools.py (+6 -2)
📝 package-lock.json (+97 -96)
📝 src/lib/apis/index.ts (+82 -0)
📝 src/lib/components/admin/Settings/Interface.svelte (+66 -0)
📝 src/lib/components/chat/Chat.svelte (+7 -1)
📝 src/lib/components/chat/MessageInput.svelte (+95 -2)
📝 src/lib/components/chat/MessageInput/IntegrationsMenu.svelte (+38 -0)
📝 src/lib/components/chat/Placeholder.svelte (+2 -0)
📝 src/lib/components/chat/Settings/Interface.svelte (+56 -0)

📄 Description

Add Suggest Button — AI-generated next message suggestions

Adds a sparkles () button to the chat input toolbar that generates suggested follow-up messages based on the current conversation.

Features:

  • Sparkles button appears after the model finishes responding; clicking it calls a new /api/v1/tasks/suggest/completions endpoint using the task model
  • Suggestions render as clickable chips above the input toolbar — clicking one populates the input
  • Two modes: Literal (contextually relevant follow-ups) and Inspire (creative, unexpected angles)
  • Robust JSON parsing with line-by-line fallback for LLM output with unescaped quotes

User settings (Interface tab):

  • Show/hide the suggest button
  • Choose default mode (Literal vs Inspire)

Admin settings (Admin → Interface):

  • Enable/disable suggest generation globally (ENABLE_SUGGEST_GENERATION)
  • Configure suggestion count (1–3), default mode, and prompt template per mode
  • When disabled by admin, the user settings section is grayed out with an explanation

Also includes:

  • model_slug now populated on memchat.messages rows for assistant messages (was NULL for all openwebui vendor rows)

🔄 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/23870 **Author:** [@VBWizard](https://github.com/VBWizard) **Created:** 4/18/2026 **Status:** ❌ Closed **Base:** `main` ← **Head:** `suggest-button` --- ### 📝 Commits (10+) - [`878de68`](https://github.com/open-webui/open-webui/commit/878de6800c3f588b5d2e9ffdc20dd9f4c93b007a) Add memchat Postgres memory backend with per-chat toggle - [`ea7dd91`](https://github.com/open-webui/open-webui/commit/ea7dd91eba1fba3734f73d433f032e85b93a8e3f) Refine memory injection and tool split for change-memory-injection - [`b84c078`](https://github.com/open-webui/open-webui/commit/b84c078ad7d266dd7636d186c3b2977c45e0f4fc) Fix multimodal memory injection and remove debug payload dump - [`26f1724`](https://github.com/open-webui/open-webui/commit/26f17246ba95f859df5cd16bb0aeed3087975fde) Address Codex P1/P2: multimodal injection order and steps clamping - [`60a2c4e`](https://github.com/open-webui/open-webui/commit/60a2c4e980023ecf5dd9ca11c9c75aea1dde2850) Guard against null user message content in memory injection - [`08b03a8`](https://github.com/open-webui/open-webui/commit/08b03a844b0861637eeec817bd57b978628cf85f) PR #1 to main - Refine memory injection and tool split for change-memory-injection - [`62f7f08`](https://github.com/open-webui/open-webui/commit/62f7f08c094cf7c1f2fd70fefe319537972d3a28) Add per-message char cap to context formatting (MEMCHAT_MAX_MSG_CHARS) - [`e6200ca`](https://github.com/open-webui/open-webui/commit/e6200cacc898b8fa387a0c9ee66903a5197c6773) Fix zero char limit handling in _truncate (MEMCHAT_MAX_MSG_CHARS=0) - [`9c1e0b7`](https://github.com/open-webui/open-webui/commit/9c1e0b714797e3169dfb35bc6b8b1e554e987d83) PR #1 to main - Refine memory injection and tool split for change-memory-injection - [`5f0aa14`](https://github.com/open-webui/open-webui/commit/5f0aa14a9300c5ad5815e84fa70fdf69bd45b88d) Add suggest generation backend and admin panel config ### 📊 Changes **19 files changed** (+1609 additions, -183 deletions) <details> <summary>View changed files</summary> 📝 `backend/dev.sh` (+3 -1) 📝 `backend/open_webui/config.py` (+65 -0) 📝 `backend/open_webui/main.py` (+9 -0) ➕ `backend/open_webui/retrieval/memchat_db.py` (+698 -0) 📝 `backend/open_webui/routers/chats.py` (+14 -1) 📝 `backend/open_webui/routers/memories.py` (+42 -58) 📝 `backend/open_webui/routers/tasks.py` (+83 -0) 📝 `backend/open_webui/tools/builtin.py` (+106 -11) 📝 `backend/open_webui/utils/middleware.py` (+131 -11) 📝 `backend/open_webui/utils/task.py` (+9 -0) 📝 `backend/open_webui/utils/tools.py` (+6 -2) 📝 `package-lock.json` (+97 -96) 📝 `src/lib/apis/index.ts` (+82 -0) 📝 `src/lib/components/admin/Settings/Interface.svelte` (+66 -0) 📝 `src/lib/components/chat/Chat.svelte` (+7 -1) 📝 `src/lib/components/chat/MessageInput.svelte` (+95 -2) 📝 `src/lib/components/chat/MessageInput/IntegrationsMenu.svelte` (+38 -0) 📝 `src/lib/components/chat/Placeholder.svelte` (+2 -0) 📝 `src/lib/components/chat/Settings/Interface.svelte` (+56 -0) </details> ### 📄 Description Add Suggest Button — AI-generated next message suggestions Adds a sparkles (✨) button to the chat input toolbar that generates suggested follow-up messages based on the current conversation. Features: - Sparkles button appears after the model finishes responding; clicking it calls a new /api/v1/tasks/suggest/completions endpoint using the task model - Suggestions render as clickable chips above the input toolbar — clicking one populates the input - Two modes: Literal (contextually relevant follow-ups) and Inspire (creative, unexpected angles) - Robust JSON parsing with line-by-line fallback for LLM output with unescaped quotes User settings (Interface tab): - Show/hide the suggest button - Choose default mode (Literal vs Inspire) Admin settings (Admin → Interface): - Enable/disable suggest generation globally (ENABLE_SUGGEST_GENERATION) - Configure suggestion count (1–3), default mode, and prompt template per mode - When disabled by admin, the user settings section is grayed out with an explanation Also includes: - model_slug now populated on memchat.messages rows for assistant messages (was NULL for all openwebui vendor rows) --- <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-16 01:15:58 -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#98456