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 ChromaDB host configuration option 139 * 140 * Defines the ChromaDB host as a string input field in the configuration interface. 141 * 142 * @var array 143 */ 144$meta['chroma_host'] = array('string'); 145 146/** 147 * Metadata for the ChromaDB port configuration option 148 * 149 * Defines the ChromaDB port as a numeric input field. 150 * 151 * @var array 152 */ 153$meta['chroma_port'] = array('numeric'); 154 155/** 156 * Metadata for the ChromaDB tenant configuration option 157 * 158 * Defines the ChromaDB tenant as a string input field in the configuration interface. 159 * 160 * @var array 161 */ 162$meta['chroma_tenant'] = array('string'); 163 164/** 165 * Metadata for the ChromaDB database configuration option 166 * 167 * Defines the ChromaDB database as a string input field in the configuration interface. 168 * 169 * @var array 170 */ 171$meta['chroma_database'] = array('string'); 172 173/** 174 * Metadata for the ChromaDB collection configuration option 175 * 176 * Defines the ChromaDB collection as a string input field in the configuration interface. 177 * 178 * @var array 179 */ 180$meta['chroma_collection'] = array('string'); 181 182/** 183 * Metadata for the default institution configuration option 184 * 185 * Defines the default institution as a string input field in the configuration interface. 186 * 187 * @var array 188 */ 189$meta['default_institution'] = array('string'); 190 191/** 192 * Metadata for the Ollama host configuration option 193 * 194 * Defines the Ollama host as a string input field in the configuration interface. 195 * 196 * @var array 197 */ 198$meta['ollama_host'] = array('string'); 199 200/** 201 * Metadata for the Ollama port configuration option 202 * 203 * Defines the Ollama port as a numeric input field. 204 * 205 * @var array 206 */ 207$meta['ollama_port'] = array('numeric'); 208 209/** 210 * Metadata for the Ollama embeddings model configuration option 211 * 212 * Defines the Ollama embeddings model as a string input field in the configuration interface. 213 * 214 * @var array 215 */ 216$meta['ollama_embeddings_model'] = array('string'); 217