-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathext_tables.sql
More file actions
108 lines (99 loc) · 4.17 KB
/
Copy pathext_tables.sql
File metadata and controls
108 lines (99 loc) · 4.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
CREATE TABLE pages (
tx_aim_disable_inherited_fragments tinyint(1) unsigned DEFAULT '0' NOT NULL
);
CREATE TABLE tx_aim_prompt_fragment (
title varchar(255) DEFAULT '' NOT NULL,
prompt text,
examples text,
scope varchar(255) DEFAULT 'text,vision,translation,conversation,toolCalling,imageGeneration' NOT NULL
);
CREATE TABLE tx_aim_page_prompt_fragment (
parent_page int(11) unsigned DEFAULT '0' NOT NULL,
fragment int(11) unsigned DEFAULT '0' NOT NULL,
inherit_to_subpages tinyint(1) unsigned DEFAULT '1' NOT NULL,
auto_generated tinyint(1) unsigned DEFAULT '0' NOT NULL,
auto_generated_source varchar(32) DEFAULT '' NOT NULL,
KEY parent_page (parent_page),
KEY fragment (fragment)
);
CREATE TABLE tx_aim_configuration (
ai_provider varchar(255) DEFAULT '' NOT NULL,
title varchar(255) DEFAULT '' NOT NULL,
description text,
`default` tinyint(4) unsigned DEFAULT '0' NOT NULL,
api_key text,
model varchar(255) DEFAULT '' NOT NULL,
total_cost decimal(10,6) DEFAULT '0.000000' NOT NULL,
cost_currency varchar(10) DEFAULT 'USD' NOT NULL,
max_tokens int(11) unsigned DEFAULT '0' NOT NULL,
input_token_cost decimal(10,6) DEFAULT '0.000000' NOT NULL,
output_token_cost decimal(10,6) DEFAULT '0.000000' NOT NULL,
be_groups varchar(255) DEFAULT '' NOT NULL,
privacy_level varchar(20) DEFAULT 'standard' NOT NULL,
rerouting_allowed tinyint(1) unsigned DEFAULT '1' NOT NULL,
auto_model_switch tinyint(1) unsigned DEFAULT '1' NOT NULL,
grading_enabled tinyint(1) unsigned DEFAULT '0' NOT NULL,
judge_configuration_uid int(11) unsigned DEFAULT '0' NOT NULL,
grading_rubric text,
system_prompt_addition text
);
CREATE TABLE tx_aim_usage_budget (
uid int(11) unsigned NOT NULL auto_increment,
user_id int(11) unsigned DEFAULT '0' NOT NULL,
period_start int(11) unsigned DEFAULT '0' NOT NULL,
period_type varchar(20) DEFAULT 'monthly' NOT NULL,
tokens_used int(11) unsigned DEFAULT '0' NOT NULL,
cost_used decimal(10,6) DEFAULT '0.000000' NOT NULL,
requests_used int(11) unsigned DEFAULT '0' NOT NULL,
PRIMARY KEY (uid),
KEY user_period (user_id, period_type)
);
CREATE TABLE tx_aim_request_log (
uid int(11) unsigned NOT NULL auto_increment,
crdate int(11) unsigned DEFAULT '0' NOT NULL,
request_type varchar(255) DEFAULT '' NOT NULL,
provider_identifier varchar(255) DEFAULT '' NOT NULL,
configuration_uid int(11) unsigned DEFAULT '0' NOT NULL,
model_requested varchar(255) DEFAULT '' NOT NULL,
model_used varchar(255) DEFAULT '' NOT NULL,
extension_key varchar(255) DEFAULT '' NOT NULL,
success tinyint(1) unsigned DEFAULT '0' NOT NULL,
prompt_tokens int(11) unsigned DEFAULT '0' NOT NULL,
completion_tokens int(11) unsigned DEFAULT '0' NOT NULL,
cached_tokens int(11) unsigned DEFAULT '0' NOT NULL,
reasoning_tokens int(11) unsigned DEFAULT '0' NOT NULL,
total_tokens int(11) unsigned DEFAULT '0' NOT NULL,
cost decimal(10,6) DEFAULT '0.000000' NOT NULL,
duration_ms int(11) unsigned DEFAULT '0' NOT NULL,
system_fingerprint varchar(255) DEFAULT '' NOT NULL,
error_message text,
metadata text,
raw_usage text,
user_id int(11) unsigned DEFAULT '0' NOT NULL,
request_prompt text,
request_system_prompt text,
response_content text,
complexity_score decimal(5,4) DEFAULT '0.0000' NOT NULL,
complexity_label varchar(20) DEFAULT '' NOT NULL,
complexity_reason text,
rerouted tinyint(1) unsigned DEFAULT '0' NOT NULL,
reroute_type varchar(20) DEFAULT '' NOT NULL,
reroute_reason varchar(255) DEFAULT '' NOT NULL,
grade_status varchar(20) DEFAULT 'none' NOT NULL,
grade_score decimal(5,4) DEFAULT '0.0000' NOT NULL,
grade_label varchar(20) DEFAULT '' NOT NULL,
grade_reason text,
judge_model varchar(255) DEFAULT '' NOT NULL,
judge_cost decimal(10,6) DEFAULT '0.000000' NOT NULL,
grade_duration_ms int(11) unsigned DEFAULT '0' NOT NULL,
grade_error varchar(500) DEFAULT '' NOT NULL,
PRIMARY KEY (uid),
KEY crdate (crdate),
KEY provider_identifier (provider_identifier),
KEY extension_key (extension_key),
KEY configuration_uid (configuration_uid),
KEY user_id (user_id),
KEY model_used (model_used),
KEY request_type (request_type),
KEY grade_status (grade_status)
);