DesktoptGPT Template Editor

DesktopGPT Template (Assistant) Editor Documentation

DesktopGPT Templates can be a powerful tool to help craft simple or complex assistants tailored to your specific tasks. With DesktopGPT, users can create custom templates that provide specific guidance and instructions to the AI model, allowing it to handle tasks effectively based on predefined criteria.

There are currently two types of templates supported by DesktopGPT:

  1. Inline Templates

  2. Templated Instructional Prompts (TIP)

Each template type is designed to serve different levels of complexity and user interaction.


1. Inline Templates

Inline templates provide a predefined AI prompt or instruction that directs the AI model on how it should interact with the text you are about to enter. These templates are useful for quick, straightforward tasks where minimal input is needed from the user beyond the primary text. They are especially valuable for repetitive tasks where a consistent setup is required.

Example

An Inline Template can be created to translate text from any language to English:

  • AI Prompt: "Translate the following text to English:"

  • Usage: /translate Bonjour

  • Output: Hello

In this example, you could set up a template with the instruction "Translate the following text to English" and assign it the shortcut /translate. Once created, typing /translate followed by the text to translate will prompt the AI to output the translation in English.

Repetitive Task Use Case

Inline Templates are also beneficial for users who frequently ask the AI about specific topics or projects. For example, if you regularly ask coding-related questions, you might want to provide contextual information about programming languages, versions, and project details. Instead of retyping this information each time, you can create a template that includes all the necessary context.

  • Example: If you’re working on a project that uses .NET 6, C# v8, and specific libraries, you can create a template with a setup like:

    • AI Prompt: "When answering my question, consider that I’m using .NET 6, C# v8, and this project involves WPF and WebView2 technologies."

    • Usage: /projectinfo [your question]

    By using this template, you can easily ensure that every question includes the relevant project context, making responses more accurate and relevant. You can create different templates for various projects or types of inquiries, each with its specific knowledge base.

Configuration Options for Inline Templates

The Inline Template editor provides the following configurable fields:

  • Name: The label for the template, displayed in the template list for quick reference.

  • Template Shortcut: A shortcut command (e.g., /translate) to quickly apply the template.

  • Description: A short summary describing the template’s purpose, making it easy for users to know when and how to use it.

  • Overview: Optional instructions or context that will be appended to the user prompt sent to OpenAI. This can include additional information or setup that the AI needs to perform the task.

  • Prompt Tip: A hint that appears in the prompt text, guiding the user when they start typing.

  • AI Directive (System Role): Instructions for the AI (sent as a system message) on how to interpret the user's input. This field allows for explicit control over the AI's behavior based on the template's intended purpose.

  • Reset Template After Execution: A checkbox to clear the template information and chat history upon completion. When enabled, this resets the template after each response, starting fresh for each new input. If unchecked, chat history is retained, allowing for an ongoing conversation.


2. Templated Instructional Prompts (TIP)

Templated Instructional Prompts (TIP) offer a more advanced approach for creating structured workflows in DesktopGPT. TIP templates are ideal for scenarios that require gathering multiple pieces of information from the user before submitting a prompt to the AI. They allow for a sequence of questions and inputs, enabling users to build a complex context that the AI can use for more sophisticated outputs.

Example of a TIP Template

The /coverletter template provided by DesktopGPT is an example of TIP functionality. This template guides the user through several questions about the job they are applying for. After collecting answers, the data is sent to the AI with specific instructions to generate a customized cover letter.

  • Usage: /coverletter

    • Workflow: The user answers a series of questions, such as "What is the job title?" and "Describe your relevant experience."

    • AI Output: A fully formatted cover letter based on the information provided.

Configuration Options for TIP Templates

The TIP template editor includes fields similar to Inline Templates, with additional options to define a Workflow. This workflow consists of a Workflow Unit and multiple Workflow Items that collect specific data points from the user.


Workflow Structure

  • Workflow Unit: A section in TIP designed to organize related prompts or questions. Each TIP template in DesktopGPT can contain one Workflow Unit. Within this unit, users can define as many Workflow Items as needed to collect multiple pieces of data.

  • Workflow Item: Each Workflow Item represents an individual question or prompt within the Workflow Unit. Workflow Items allow the user to gather specific pieces of information, such as names, dates, descriptions, etc.

Configuration of Workflow Items

  • ID: Each Workflow Item has a unique identifier (e.g., workflowItem1). This ID can be used to reference the answer provided by the user in the AI Instruction.

    • Usage Example: If the Workflow Item ID is "workflowItem1" and the AI Instruction (User Role) text includes a placeholder like, "In the story, the main character's name is {workflowItem1}", DesktopGPT will replace {workflowItem1} with the actual answer provided by the user, creating a dynamic response based on user input.

  • User Question: A prompt or question displayed to the user to collect specific information relevant to the task.


Using Templates in DesktopGPT

  1. Creating a Template:

    • Select the template type in the Template Editor.

    • Configure each field according to the desired functionality and purpose, following the options provided above.

    • Save the template when ready.

  2. Using a TIP Template:

    • Invoke the template’s shortcut (e.g., /coverletter).

    • Respond to each Workflow Item question to provide the necessary information.

    • DesktopGPT will use the answers in the Workflow to dynamically replace placeholders in the AI Instruction text, creating a personalized prompt for the AI.

(c) Copyright Stardock Entertainment. All rights reserved.