Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Import/Export Default Prompt Suggestions as JSON File #2933

Open
silentoplayz opened this issue Jun 8, 2024 · 0 comments
Open

feat: Import/Export Default Prompt Suggestions as JSON File #2933

silentoplayz opened this issue Jun 8, 2024 · 0 comments

Comments

@silentoplayz
Copy link
Collaborator

silentoplayz commented Jun 8, 2024

Is your feature request related to a problem? Please describe.

  • As a user of Open WebUI, I often encounter difficulties in sharing and managing the Default Prompt Suggestions used for quickly selecting a prompt on an empty new chat page. Currently, the default prompt suggestions can only be set up by the user manually filling out the title, subtitle, and prompt fields for each prompt they want to display on each blank New Chat page. However, there is no built-in feature to import or export these default prompt suggestions, making it inconvenient for users to share their prompts, back them up, or restore them in the event of a loss of data.

Describe the solution you'd like

  • I would like Open WebUI to include an import/export functionality for default prompt suggestions, enabling users to easily export their default prompt suggestions for backup, sharing, and restoring. Alongside this requested feature, I would also like a feature that enables users to easily import new default prompt suggestions from a JSON file, allowing for easy addition of multiple new prompts at once.

Describe alternatives you've considered

  • One alternative solution I've considered is manually copying and pasting text manually into the title, subtitle, and prompt fields for each prompt I wanted to add. However, this method is not an efficient way to manage prompts, as the task is tedious and repetitive.

The import/export functionality should support the following format (please note this this is also just an example, but I feel this is as good format to use):

  • prompts: A JSON object containing an array of prompt objects, where each prompt object has the following properties:
    • title (string, required): A short title for the prompt.
    • subtitle (string, optional): A subtitle for the prompt.
    • prompt (string, required): The text of the prompt.

Here is an example of what an exported JSON file for default prompt suggestions might look like (should also be ready for importing):

{
  "prompts": [
    {
      "title": "Explain why popcorn pops",
      "subtitle": "to a kid who loves watching it in the microwave",
      "prompt": "Explain why popcorn pops to a kid who loves watching it in the microwave."
    },
    {
      "title": "Plan a trip",
      "subtitle": "",
      "prompt": "Can you help me make a plan to explore the Madagascar wildlife on a budget? I'd like to stay there for a week."
    },
    {
      "title": "Write a SQL query",
      "subtitle": "that adds a 'status' column to an 'orders' table",
      "prompt": "Give me a SQL query to add a '{x}' column to an '{y}' table that defaults to PENDING. Set it to COMPLETE if 'completed_at' is set."
    }
  ]
}

I believe the button for adding a new Default Prompt Suggestion should rather open up a menu of two options to choose from: Add New & Import from JSON file. I've yet to come up with an ideal placement of the button for the ability to export default prompt suggestions in JSON file format.

defaultprompts

  • The exported file should be in JSON format, with a .json file extension. The import function should allow users to select a .json file from their local file system.

Additional context

  • This feature would greatly improve the usability of Open WebUI by streamlining the process of managing and sharing prompts. More reasoning behind this feature request is that many aspects of Open WebUI allow you to import/export things, but not default prompt suggestions.
@silentoplayz silentoplayz changed the title Import/Export Default Prompts as JSON File feat: Import/Export Default Prompts as JSON File Jun 8, 2024
@silentoplayz silentoplayz changed the title feat: Import/Export Default Prompts as JSON File feat: Import/Export Default Prompt Suggestions as JSON File Jun 8, 2024
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

No branches or pull requests

1 participant