Skip to content

feat: Show default prompt templates as placeholders in admin task settings#1

Draft
FFDVDGD with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-82321430-1188578898-c64a7606-04ba-4537-bf12-7ae18466617e
Draft

feat: Show default prompt templates as placeholders in admin task settings#1
FFDVDGD with Copilot wants to merge 2 commits into
mainfrom
copilot/fix-82321430-1188578898-c64a7606-04ba-4537-bf12-7ae18466617e

Conversation

Copilot AI commented Mar 22, 2026

Copy link
Copy Markdown

Pull Request Checklist

Note to first-time contributors: Please open a discussion post in Discussions to discuss your idea/fix with the community before creating a pull request, and describe your changes before submitting a pull request.

This is to ensure large feature PRs are discussed with the community first, before starting work on it. If the community does not want this feature or it is not relevant for Open WebUI as a project, it can be identified in the discussion before working on the feature and submitting the PR.

Before submitting, make sure you've checked the following:

  • Target branch: Verify that the pull request targets the dev branch. PRs targeting main will be immediately closed.
  • Description: Provide a concise description of the changes made in this pull request down below.
  • Changelog: Ensure a changelog entry following the format of Keep a Changelog is added at the bottom of the PR description.
  • Documentation: Add docs in Open WebUI Docs Repository. Document user-facing behavior, environment variables, public APIs/interfaces, or deployment steps.
  • Dependencies: Are there any new or upgraded dependencies? If so, explain why, update the changelog/docs, and include any compatibility notes. Actually run the code/function that uses updated library to ensure it doesn't crash.
  • Testing: Perform manual tests to verify the implemented fix/feature works as intended AND does not break any other functionality. Include reproducible steps to demonstrate the issue before the fix. Test edge cases (URL encoding, HTML entities, types). Take this as an opportunity to make screenshots of the feature/fix and include them in the PR description.
  • Agentic AI Code: Confirm this Pull Request is not written by any AI Agent or has at least gone through additional human review AND manual testing. If any AI Agent is the co-author of this PR, it may lead to immediate closure of the PR.
  • Code review: Have you performed a self-review of your code, addressing any coding standard issues and ensuring adherence to the project's coding standards?
  • Design & Architecture: Prefer smart defaults over adding new settings; use local state for ephemeral UI logic. Open a Discussion for major architectural or UX changes.
  • Git Hygiene: Keep PRs atomic (one logical change). Clean up commits and rebase on dev to ensure no unrelated commits (e.g. from main) are included. Push updates to the existing PR branch instead of closing and reopening.
  • Title Prefix: To clearly categorize this pull request, prefix the pull request title using one of the following:
    • BREAKING CHANGE: Significant changes that may affect compatibility
    • build: Changes that affect the build system or external dependencies
    • ci: Changes to our continuous integration processes or workflows
    • chore: Refactor, cleanup, or other non-functional code changes
    • docs: Documentation update or addition
    • feat: Introduces a new feature or enhancement to the codebase
    • fix: Bug fix or error correction
    • i18n: Internationalization or localization changes
    • perf: Performance improvement
    • refactor: Code restructuring for better maintainability, readability, or scalability
    • style: Changes that do not affect the meaning of the code (white space, formatting, missing semi-colons, etc.)
    • test: Adding missing tests or correcting existing tests
    • WIP: Work in progress, a temporary label for incomplete or ongoing work

Changelog Entry

Description

Admin task prompt settings previously showed only "Leave empty to use the default prompt, or enter a custom prompt" as placeholder text — the actual default prompt content was invisible without reading source code. This exposes all DEFAULT_* prompt templates through the task config API and renders them as textarea placeholders.

Added

  • GET /api/v1/tasks/config and POST /api/v1/tasks/config/update now return DEFAULT_* fields alongside each configurable template:
    • DEFAULT_TITLE_GENERATION_PROMPT_TEMPLATE
    • DEFAULT_FOLLOW_UP_GENERATION_PROMPT_TEMPLATE
    • DEFAULT_TAGS_GENERATION_PROMPT_TEMPLATE
    • DEFAULT_QUERY_GENERATION_PROMPT_TEMPLATE
    • DEFAULT_IMAGE_PROMPT_GENERATION_PROMPT_TEMPLATE
    • DEFAULT_TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE
    • DEFAULT_VOICE_MODE_PROMPT_TEMPLATE

Changed

  • Admin Interface settings: all prompt template textareas now use the actual default prompt text as placeholder instead of the generic hint string. When the field is empty, the full default prompt is visible inline.
  • DEFAULT_TOOLS_FUNCTION_CALLING_PROMPT_TEMPLATE added to imports in tasks.py (was missing despite being defined in config.py).

Deprecated

  • N/A

Removed

  • N/A

Fixed

  • N/A

Security

  • N/A

Breaking Changes

  • N/A

Additional Information

  • No behavior change at runtime — the default fallback logic in generate_title (and sibling endpoints) is unchanged; this is purely a discoverability improvement.

Screenshots or Videos

  • N/A

Contributor License Agreement

Note

Deleting the CLA section will lead to immediate closure of your PR and it will not be merged in.


⌨️ Start Copilot coding agent tasks without leaving your editor — available in VS Code, Visual Studio, JetBrains IDEs and Eclipse.

Copilot AI changed the title [WIP] 添加自动生成标题的默认提示词功能 feat: Show default prompt templates as placeholders in admin task settings Mar 22, 2026
Copilot AI requested a review from FFDVDGD March 22, 2026 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants