Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 1
{{!
2
    This file is part of Moodle - http://moodle.org/
3
 
4
    Moodle is free software: you can redistribute it and/or modify
5
    it under the terms of the GNU General Public License as published by
6
    the Free Software Foundation, either version 3 of the License, or
7
    (at your option) any later version.
8
 
9
    Moodle is distributed in the hope that it will be useful,
10
    but WITHOUT ANY WARRANTY; without even the implied warranty of
11
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12
    GNU General Public License for more details.
13
 
14
    You should have received a copy of the GNU General Public License
15
    along with Moodle.  If not, see <http://www.gnu.org/licenses/>.
16
}}
17
{{!
18
    @template core/ai_usage_data
19
 
20
    Template for AI usage data.
21
 
22
    Example context (json):
23
    {
24
        "aiusagedata": [{
25
            "providers": [{
26
                "providerName": "AI provider name",
27
                "aiactions": [{
28
                    "actionName": "AI action name",
29
                    "aiactionvalues": [{
30
                        "success_count": "1",
31
                        "fail_count": "2",
32
                        "average_time": "15",
33
                        "predominant_error": "403",
34
                        "models": [{
35
                            "gpt-4o": "1"
36
                        }]
37
                    }]
38
                }]
39
            }],
40
            "timerange": [{
41
                "label": "Time range for stats",
42
                "values": [{
43
                    "timefrom": "Time from: Friday, 2 May 2025, 1:22 AM",
44
                    "timeto": "Time from: Friday, 3 May 2025, 1:22 AM"
45
                }]
46
            }]
47
        }]
48
    }
49
}}
50
 
51
{{#aiusagedata}}
52
    {{#str}} aiusagedata, hub {{/str}}:
53
    <ul>
54
        {{! AI providers. }}
55
        {{#providers}}
56
            <li>{{providername}}:</li>
57
            {{#aiactions}}
58
                <ul>
59
                    <li>{{actionname}}:</li>
60
                    {{#aiactionvalues}}
61
                        <ul>
62
                            {{#values}}
63
                                <li>{{values}}</li>
64
                            {{/values}}
65
 
66
                            {{^values}}
67
                                <li>{{label}}:</li>
68
                                {{#models}}
69
                                    <ul>
70
                                        <li>{{.}}</li>
71
                                    </ul>
72
                                {{/models}}
73
                            {{/values}}
74
                        </ul>
75
                    {{/aiactionvalues}}
76
                </ul>
77
            {{/aiactions}}
78
        {{/providers}}
79
 
80
        {{! Time range for stats. }}
81
        {{#timerange}}
82
            <li>{{label}}:</li>
83
            {{#values}}
84
                <ul>
85
                    <li>{{.}}</li>
86
                </ul>
87
            {{/values}}
88
        {{/timerange}}
89
    </ul>
90
{{/aiusagedata}}
91
{{^aiusagedata}}
92
    {{#str}} noaiusagedata, hub {{/str}}
93
{{/aiusagedata}}