1====== Profiles ====== 2 3Profiles in DokuLLM allow you to organize and customize your AI interactions. Each profile can have its own set of actions, prompts, and configurations. By default, the plugin uses the [[default|default]] profile, but you can create and switch between multiple profiles as needed. 4 5===== Available Profiles ===== 6 7The following profiles are currently available: 8 * [[default|default]] - The standard profile with basic actions 9 * //Add your custom profiles here// 10 11===== Creating a New Profile ===== 12 13To create a new profile: 14 15 - Create a new namespace at ''dokullm:profiles:PROFILE_NAME'' (replace PROFILE_NAME with your desired profile name) 16 - Create a profile definition page (similar to ''dokullm:profiles:default'') that defines the actions available in this profile 17 - Add prompt pages for each action in your profile 18 - Configure the plugin to use your new profile in the plugin settings 19 20===== Profile Structure ===== 21 22Each profile follows a specific namespace structure: 23 24 * ''dokullm:profiles:PROFILE_NAME:'' - Profile namespace 25 * ''dokullm:profiles:PROFILE_NAME:system'' - Base system prompt for the profile 26 * ''dokullm:profiles:PROFILE_NAME:action_name'' - Prompt page for each action 27 * ''dokullm:profiles:PROFILE_NAME:action_name:system'' - Action-specific system prompt extension 28 29===== Profile Action Definition ===== 30 31Each profile needs a definition page (like ''dokullm:profiles:default'') that contains a table defining the available actions. The table must have the following columns: 32 33^ ID ^ Label ^ Description ^ Icon ^ Result ^ 34| action_id | Button Text | Description of what the action does | icon_name | result_action_type | 35 36Column details: 37 * **ID**: The action identifier, which corresponds to the prompt name 38 * **Label**: The text displayed on the button 39 * **Description**: A detailed description of the action, used as a tooltip 40 * **Icon**: The icon displayed on the button (can be empty) 41 * **Result**: The action to perform with the LLM result: 42 * ''show'': Display the result in a modal dialog 43 * ''append'': Add the result to the end of the current content 44 * ''replace'': Replace the selected content with the result 45 * ''insert'': Insert the result at the cursor position 46 47==== Example Profile Definition ==== 48 49Here's an example of how to structure your profile action table: 50 51^ ID ^ Label ^ Description ^ Icon ^ Result ^ 52| summarize | Summarize | Create a summary of the selected text | file-icons:summary | show | 53| expand | Expand | Expand the selected text with more details | file-icons:expand | replace | 54| grammar | Fix Grammar | Correct grammar and spelling errors | file-icons:spellcheck | replace | 55 56===== Using Profiles ===== 57 58To use a specific profile: 59 - Go to the plugin configuration page 60 - Find the "Prompt Profile" setting 61 - Enter the name of the profile you want to use 62 - Save the configuration 63 64The selected profile will be used for all LLM interactions until you change it. 65 66===== Adding Custom Prompts ===== 67 68Each action in your profile corresponds to a prompt page. To add a custom prompt: 69 - Create a new page at ''dokullm:profiles:PROFILE_NAME:PROMPT_NAME'' (replace PROFILE_NAME with your profile and PROMPT_NAME with your action ID) 70 - Write your prompt in this page, using placeholders as needed: 71 * ''{text}'' - The selected text from the editor or the entire text 72 * ''{template}'' - The template associated with the request 73 * The prompt will automatically be available through the action defined in your profile 74 75===== System Prompt Extensions ===== 76 77Profiles support a hierarchical system prompt architecture: 78 79 * Base system prompt at ''dokullm:profiles:PROFILE_NAME:system'' 80 * Action-specific extensions at ''dokullm:profiles:PROFILE_NAME:ACTION_NAME:system'' 81 * Extensions are automatically appended to the base system prompt 82 83===== Metadata Support ===== 84 85DokuLLM supports metadata in your wiki pages, which can be used to provide additional context to the LLM: 86 * ''~~LLM_TEMPLATE:template_id~~'' - Specifies a template to use as context 87 * ''~~LLM_EXAMPLES:example1,example2~~'' - Specifies example pages to use as context 88 * ''~~LLM_PREVIOUS:previous_page~~'' - Specifies a previous document to use as context 89 90These metadata tags should be placed at the beginning of your wiki page. 91