xref: /plugin/dokullm/conf/metadata.php (revision 590368144294a28ecf0e0e39feb976bf79fefb1e)
1*59036814SCostin Stroie<?php
2*59036814SCostin Stroie/**
3*59036814SCostin Stroie * Options for the dokullm plugin
4*59036814SCostin Stroie *
5*59036814SCostin Stroie * This file defines the configuration metadata for the LLM integration plugin.
6*59036814SCostin Stroie * It specifies the type and validation rules for each configuration option.
7*59036814SCostin Stroie */
8*59036814SCostin Stroie
9*59036814SCostin Stroie/**
10*59036814SCostin Stroie * Metadata for the API URL configuration option
11*59036814SCostin Stroie *
12*59036814SCostin Stroie * Defines the API endpoint URL as a string input field in the configuration interface.
13*59036814SCostin Stroie *
14*59036814SCostin Stroie * @var array
15*59036814SCostin Stroie */
16*59036814SCostin Stroie$meta['api_url'] = array('string');
17*59036814SCostin Stroie
18*59036814SCostin Stroie/**
19*59036814SCostin Stroie * Metadata for the API key configuration option
20*59036814SCostin Stroie *
21*59036814SCostin Stroie * Defines the API key as a password field in the configuration interface.
22*59036814SCostin Stroie * This ensures the value is masked when entered and stored securely.
23*59036814SCostin Stroie *
24*59036814SCostin Stroie * @var array
25*59036814SCostin Stroie */
26*59036814SCostin Stroie$meta['api_key'] = array('password');
27*59036814SCostin Stroie
28*59036814SCostin Stroie/**
29*59036814SCostin Stroie * Metadata for the model configuration option
30*59036814SCostin Stroie *
31*59036814SCostin Stroie * Defines the model identifier as a string input field in the configuration interface.
32*59036814SCostin Stroie *
33*59036814SCostin Stroie * @var array
34*59036814SCostin Stroie */
35*59036814SCostin Stroie$meta['model'] = array('string');
36*59036814SCostin Stroie
37*59036814SCostin Stroie/**
38*59036814SCostin Stroie * Metadata for the timeout configuration option
39*59036814SCostin Stroie *
40*59036814SCostin Stroie * Defines the timeout value as a numeric input field with a minimum value of 5 seconds.
41*59036814SCostin Stroie * This prevents users from setting an unreasonably low timeout value.
42*59036814SCostin Stroie *
43*59036814SCostin Stroie * @var array
44*59036814SCostin Stroie */
45*59036814SCostin Stroie$meta['timeout'] = array('numeric', '_min' => 5);
46*59036814SCostin Stroie
47*59036814SCostin Stroie/**
48*59036814SCostin Stroie * Metadata for the language configuration option
49*59036814SCostin Stroie *
50*59036814SCostin Stroie * Defines the language as a multichoice field with 'default' and 'ro' options.
51*59036814SCostin Stroie *
52*59036814SCostin Stroie * @var array
53*59036814SCostin Stroie */
54*59036814SCostin Stroie$meta['language'] = array('multichoice', '_choices' => array('default', 'ro'));
55*59036814SCostin Stroie
56*59036814SCostin Stroie/**
57*59036814SCostin Stroie * Metadata for the temperature configuration option
58*59036814SCostin Stroie *
59*59036814SCostin Stroie * Defines the temperature as a numeric field with a range from 0.0 to 1.0,
60*59036814SCostin Stroie * with a default of 0.3. This controls the randomness of the LLM responses.
61*59036814SCostin Stroie *
62*59036814SCostin Stroie * @var array
63*59036814SCostin Stroie */
64*59036814SCostin Stroie$meta['temperature'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/');
65*59036814SCostin Stroie
66*59036814SCostin Stroie/**
67*59036814SCostin Stroie * Metadata for the top-p configuration option
68*59036814SCostin Stroie *
69*59036814SCostin Stroie * Defines the top-p (nucleus sampling) as a numeric field with a range from 0.0 to 1.0,
70*59036814SCostin Stroie * with a default of 0.8. This controls the cumulative probability of token selection.
71*59036814SCostin Stroie *
72*59036814SCostin Stroie * @var array
73*59036814SCostin Stroie */
74*59036814SCostin Stroie$meta['top_p'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/');
75*59036814SCostin Stroie
76*59036814SCostin Stroie/**
77*59036814SCostin Stroie * Metadata for the top-k configuration option
78*59036814SCostin Stroie *
79*59036814SCostin Stroie * Defines the top-k as a numeric field with a minimum value of 1,
80*59036814SCostin Stroie * with a default of 20. This controls the number of highest probability tokens considered.
81*59036814SCostin Stroie *
82*59036814SCostin Stroie * @var array
83*59036814SCostin Stroie */
84*59036814SCostin Stroie$meta['top_k'] = array('numeric', '_min' => 1);
85*59036814SCostin Stroie
86*59036814SCostin Stroie/**
87*59036814SCostin Stroie * Metadata for the min-p configuration option
88*59036814SCostin Stroie *
89*59036814SCostin Stroie * Defines the min-p as a numeric field with a range from 0.0 to 1.0,
90*59036814SCostin Stroie * with a default of 0.0. This controls the minimum probability threshold for token selection.
91*59036814SCostin Stroie *
92*59036814SCostin Stroie * @var array
93*59036814SCostin Stroie */
94*59036814SCostin Stroie$meta['min_p'] = array('numeric', '_min' => 0.0, '_max' => 1.0, '_pattern' => '/^\d+(\.\d+)?$/');
95*59036814SCostin Stroie
96*59036814SCostin Stroie/**
97*59036814SCostin Stroie * Metadata for the show_copy_button configuration option
98*59036814SCostin Stroie *
99*59036814SCostin Stroie * Defines whether the copy button should be shown as a boolean field.
100*59036814SCostin Stroie *
101*59036814SCostin Stroie * @var array
102*59036814SCostin Stroie */
103*59036814SCostin Stroie$meta['show_copy_button'] = array('onoff');
104*59036814SCostin Stroie
105*59036814SCostin Stroie/**
106*59036814SCostin Stroie * Metadata for the replace_id configuration option
107*59036814SCostin Stroie *
108*59036814SCostin Stroie * Defines whether the template ID should be replaced with the new page ID
109*59036814SCostin Stroie * when copying a page with a template.
110*59036814SCostin Stroie *
111*59036814SCostin Stroie * @var array
112*59036814SCostin Stroie */
113*59036814SCostin Stroie$meta['replace_id'] = array('onoff');
114*59036814SCostin Stroie
115*59036814SCostin Stroie/**
116*59036814SCostin Stroie * Metadata for the think configuration option
117*59036814SCostin Stroie *
118*59036814SCostin Stroie * Defines whether the LLM should engage in deeper thinking processes before responding.
119*59036814SCostin Stroie * When enabled, the LLM will use thinking capabilities; when disabled, it will provide direct responses.
120*59036814SCostin Stroie *
121*59036814SCostin Stroie * @var array
122*59036814SCostin Stroie */
123*59036814SCostin Stroie$meta['think'] = array('onoff');
124*59036814SCostin Stroie
125*59036814SCostin Stroie/**
126*59036814SCostin Stroie * Metadata for the use_tools configuration option
127*59036814SCostin Stroie *
128*59036814SCostin Stroie * Defines whether the LLM can use tools to enhance its responses.
129*59036814SCostin Stroie * When enabled, the LLM can call tools like get_document, get_template, and get_examples;
130*59036814SCostin Stroie * when disabled, these tools will not be available to the LLM.
131*59036814SCostin Stroie *
132*59036814SCostin Stroie * @var array
133*59036814SCostin Stroie */
134*59036814SCostin Stroie$meta['use_tools'] = array('onoff');
135