Skip to content

enable template placeholders in system_prompt message setting #2

Open

Description

@castedo

Some parts of prompts change slightly depending on scenario. In particular, making corrections based on American vs British English. Another example is editing Markdown vs LaTeX formatted source text.

This feature is to enable the chat_system settings inside a prompt request settings file to contain a template with a placeholder for English dialect and a way to select between American and British in the copyaid.toml user configuration file.

Activity

  1. self-assigned this
    on Jan 14, 2024
  2. castedo commented on Jan 14, 2024

    @castedo
    OwnerAuthor

    I am thinking of enabling Jinja templates for a key called "system_prompt" which will obsolete "chat_system". "chat_system" which will not support template syntax gets deprecated. "system_prompt" is always interpreted as a Jinja template.

  3. changed the title [-]enable template placeholders in chat_system message setting[/-] [+]enable template placeholders in system_prompt message setting[/+] on Jan 14, 2024
  4. castedo commented on Jan 14, 2024

    @castedo
    OwnerAuthor

    Add a top-level key parameters which exposes parameters that a calling program can specific. Something like

    [parameters.lang_tag]
    default = "en-US"
    
    [parameters.lang_tag.map]
    "en-US" = { dialect = "American" }
    "en-GB" = { dialect = "British" }
    
    
    [parameters.mime_type.map]
    default = "text/markdown"
    
    [parameters.mime_type.map]
    "text/markdown" = { format = "Markdown and HTML" }
    "application/x-latex" = { format = "LaTeX" }
    

    where dialect and format show up as Jinja template variables in system_prompt.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions