1<?php 2/** 3 * Options for the dokullm plugin 4 * 5 * This file defines the configuration metadata for the LLM integration plugin. 6 * It specifies the type and validation rules for each configuration option. 7 */ 8 9/** 10 * Metadata for the API URL configuration option 11 * 12 * Defines the API endpoint URL as a string input field in the configuration interface. 13 * 14 * @var array 15 */ 16$meta['api_url'] = array('string'); 17 18/** 19 * Metadata for the API key configuration option 20 * 21 * Defines the API key as a password field in the configuration interface. 22 * This ensures the value is masked when entered and stored securely. 23 * 24 * @var array 25 */ 26$meta['api_key'] = array('password'); 27 28/** 29 * Metadata for the model configuration option 30 * 31 * Defines the model identifier as a string input field in the configuration interface. 32 * 33 * @var array 34 */ 35$meta['model'] = array('string'); 36 37/** 38 * Metadata for the timeout configuration option 39 * 40 * Defines the timeout value as a numeric input field with a minimum value of 5 seconds. 41 * This prevents users from setting an unreasonably low timeout value. 42 * 43 * @var array 44 */ 45$meta['timeout'] = array('numeric', '_min' => 5); 46 47/** 48 * Metadata for the profile configuration option 49 * 50 * Defines the profile as a string input field in the configuration interface. 51 * User prompts can be classified in multiple profiles. By default, 'default'. 52 * 53 * @var array 54 */ 55$meta['profile'] = array('string'); 56 57/** 58 * Metadata for the temperature configuration option 59 * 60 * Defines the temperature as a numeric field with a range from 0.0 to 1.0, 61 * with a default of 0.3. This controls the randomness of the LLM responses. 62 * 63 * @var array 64 */ 65$meta['temperature'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/'); 66 67/** 68 * Metadata for the top-p configuration option 69 * 70 * Defines the top-p (nucleus sampling) as a numeric field with a range from 0.0 to 1.0, 71 * with a default of 0.8. This controls the cumulative probability of token selection. 72 * 73 * @var array 74 */ 75$meta['top_p'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/'); 76 77/** 78 * Metadata for the top-k configuration option 79 * 80 * Defines the top-k as a numeric field with a minimum value of 1, 81 * with a default of 20. This controls the number of highest probability tokens considered. 82 * 83 * @var array 84 */ 85$meta['top_k'] = array('numeric', '_min' => 1); 86 87/** 88 * Metadata for the min-p configuration option 89 * 90 * Defines the min-p as a numeric field with a range from 0.0 to 1.0, 91 * with a default of 0.0. This controls the minimum probability threshold for token selection. 92 * 93 * @var array 94 */ 95$meta['min_p'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/'); 96 97/** 98 * Metadata for the show_copy_button configuration option 99 * 100 * Defines whether the copy button should be shown as a boolean field. 101 * 102 * @var array 103 */ 104$meta['show_copy_button'] = array('onoff'); 105 106/** 107 * Metadata for the replace_id configuration option 108 * 109 * Defines whether the template ID should be replaced with the new page ID 110 * when copying a page with a template. 111 * 112 * @var array 113 */ 114$meta['replace_id'] = array('onoff'); 115 116/** 117 * Metadata for the think configuration option 118 * 119 * Defines whether the LLM should engage in deeper thinking processes before responding. 120 * When enabled, the LLM will use thinking capabilities; when disabled, it will provide direct responses. 121 * 122 * @var array 123 */ 124$meta['think'] = array('onoff'); 125 126/** 127 * Metadata for the use_tools configuration option 128 * 129 * Defines whether the LLM can use tools to enhance its responses. 130 * When enabled, the LLM can call tools like get_document, get_template, and get_examples; 131 * when disabled, these tools will not be available to the LLM. 132 * 133 * @var array 134 */ 135$meta['use_tools'] = array('onoff'); 136 137/** 138 * Metadata for the enable_chromadb configuration option 139 * 140 * Defines whether ChromaDB integration is enabled. 141 * When enabled, ChromaDB features will be available; when disabled, they will be hidden. 142 * 143 * @var array 144 */ 145$meta['enable_chromadb'] = array('onoff'); 146 147/** 148 * Metadata for the ChromaDB host configuration option 149 * 150 * Defines the ChromaDB host as a string input field in the configuration interface. 151 * 152 * @var array 153 */ 154$meta['chroma_host'] = array('string'); 155 156/** 157 * Metadata for the ChromaDB port configuration option 158 * 159 * Defines the ChromaDB port as a numeric input field. 160 * 161 * @var array 162 */ 163$meta['chroma_port'] = array('numeric'); 164 165/** 166 * Metadata for the ChromaDB tenant configuration option 167 * 168 * Defines the ChromaDB tenant as a string input field in the configuration interface. 169 * 170 * @var array 171 */ 172$meta['chroma_tenant'] = array('string'); 173 174/** 175 * Metadata for the ChromaDB database configuration option 176 * 177 * Defines the ChromaDB database as a string input field in the configuration interface. 178 * 179 * @var array 180 */ 181$meta['chroma_database'] = array('string'); 182 183/** 184 * Metadata for the ChromaDB collection configuration option 185 * 186 * Defines the ChromaDB collection as a string input field in the configuration interface. 187 * 188 * @var array 189 */ 190$meta['chroma_collection'] = array('string'); 191 192/** 193 * Metadata for the default institution configuration option 194 * 195 * Defines the default institution as a string input field in the configuration interface. 196 * 197 * @var array 198 */ 199$meta['default_institution'] = array('string'); 200 201/** 202 * Metadata for the Ollama host configuration option 203 * 204 * Defines the Ollama host as a string input field in the configuration interface. 205 * 206 * @var array 207 */ 208$meta['ollama_host'] = array('string'); 209 210/** 211 * Metadata for the Ollama port configuration option 212 * 213 * Defines the Ollama port as a numeric input field. 214 * 215 * @var array 216 */ 217$meta['ollama_port'] = array('numeric'); 218 219/** 220 * Metadata for the Ollama embeddings model configuration option 221 * 222 * Defines the Ollama embeddings model as a string input field in the configuration interface. 223 * 224 * @var array 225 */ 226$meta['ollama_embeddings_model'] = array('string'); 227