Skip to content

Feature request: add URL parameters for prompt pre-filling and session configuration (Open WebUI inspired) #623

Description

@Naxxos

Context and use case
As part of the tool's deployment and associated training sessions, we have a recurring need: making it easier to share pre-built queries from a prompt library directly into Conversations. Currently, users have to manually copy and paste the text. The goal is to allow the generation of a clickable link that opens the interface with the prompt already pre-loaded in the input field, and potentially specific configurations enabled.

Expected behavior (user experience)

  1. Pre-filling only: The link should not trigger the AI generation immediately. The prompt must simply be inserted into the text input area. This allows the user to read the context, fill in any placeholders (e.g., [Insert document here]), and manually submit the query.
  2. New session: Opening this link must systematically initiate a new, blank conversation to avoid polluting an active session.
  3. Context retention post-SSO (unauthenticated user): If the user is not logged in when clicking the link, they must be redirected to the login screen. Once successfully authenticated, the application must redirect them back to the initial parameterized URL (similar to Docs restoring the correct document after a login loop).

Inspiration from Open WebUI
For reference, Open WebUI allows passing multiple parameters in the URL to configure the session comprehensively. Here is the list of parameters they currently support, which could serve as a technical roadmap for us:

  • ?q= : to inject the initial query or prompt.
  • ?models= (or ?model=) : to pre-select the language models.
  • ?load-url= : to fetch and upload a webpage as a document context.
  • ?youtube= : to transcribe a specific video within the chat.
  • ?web-search=true : to enable the web search functionality.
  • ?tools= (or ?tool-ids=) : to activate specific tool IDs in the chat.
  • ?code-interpreter=true : to enable code execution features.
  • ?image-generation=true : to enable image generation tools.
  • ?call=true : to enable a call or video overlay.
  • ?temporary-chat=true : to start a disposable session without saving history.

Technical tracks to discuss for link creation
To allow prompt library creators to generate these links easily without coding, two approaches can be considered (up to the team to decide):

  • Standard encoding (encodeURIComponent): Classic use of a ?q= parameter. This would potentially require a "Copy this query's link" button in the UI to prevent users from manually dealing with the encoding of spaces and special characters.
  • Base64 encoding: Using a parameter like ?q64=. This is much more robust for copy-pasting into third-party documents. More importantly, this approach could easily be extended later to directly inject raw documents as attachments via a dedicated parameter.

Open questions (caveats)

  • URL length limit: Browsers generally limit URLs to around 2000 characters. How should the application react if a link contains a prompt exceeding this limit (e.g., display a clear error message, truncate the text)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions