mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 02:48:13 -05:00
[PR #22210] [CLOSED] fix: correct conflicting output format in follow-up generation prompt template #49600
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/22210
Author: @MJ16MJ
Created: 3/4/2026
Status: ❌ Closed
Base:
main← Head:fix/follow-up-prompt-template-format📝 Commits (1)
143fd39fix: correct conflicting output format instruction in follow-up generation prompt📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
backend/open_webui/config.py(+1 -1)📄 Description
What?
Fixes conflicting output format instructions in
DEFAULT_FOLLOW_UP_GENERATION_PROMPT_TEMPLATEthat caused follow-up suggestions to silently fail.Why?
The prompt template contained contradictory instructions:
[...]){ "follow_ups": ["Question 1?", ...] }(object with key)The frontend parser in
src/lib/apis/index.tsexpects a JSON object — it searches for{/}delimiters and extractsparsed.follow_ups. When an LLM followed the "array" instruction and returned["Q1?", "Q2?"], the parser found no{, returned[], and the UI showed no follow-up suggestions.How?
Updated the Guidelines line from:
to:
This makes Guidelines and Output sections consistent, matching what the frontend parser expects.
Testing
src/lib/apis/index.ts:716-730) expects{ "follow_ups": [...] }formatChecklist
Related Issues
Fixes #22187
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.