mirror of
https://github.com/open-webui/open-webui.git
synced 2026-11-17 15:53:59 -06:00
[PR #17873] [CLOSED] feat: refactor prompts import to a single backend endpoint for massive speedup #79457
Reference in New Issue
Block a user
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/17873
Author: @silentoplayz
Created: 9/28/2025
Status: ❌ Closed
Base:
dev← Head:feat-backend-prompts-import📝 Commits (3)
c6dff60feat: refactor prompts import to a single backend endpointad9f05frevert: truncate7ca0510fix: missing logic📊 Changes
3 files changed (+121 additions, -33 deletions)
View changed files
📝
backend/open_webui/routers/prompts.py(+64 -5)📝
src/lib/apis/prompts/index.ts(+28 -0)📝
src/lib/components/workspace/Prompts.svelte(+29 -28)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
Added
POST /api/v1/prompts/importthat accepts a list of prompts and creates them in the database.Changed
Removed
createNewPromptrequest for each one.Security
/api/v1/prompts/importendpoint is restricted to admin users, ensuring that only authorized users can perform bulk imports.Additional Information
Screenshots or Videos
Time to import model preset from a JSON file previously (MANY REQUESTS, >2MB BUT SLOWER):

Time to import model preset from a JSON file with these changes applied (99% LESS REQUESTS, >2MB, EXTREMELY FAST):

Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.