- 将llmusage_ioinfo_display.ui和llmusage_usages_display.ui从Jinja模板改为.dspy脚本 - 在utils.py中添加get_llmusage_by_id和read_ioinfo_content两个函数 - 重写get_llmusage.dspy,避免sqlPaging子查询包装,分离count和data查询 - 为llmusage表添加use_time索引提升排序性能 - 更新load_path.py和json/llmusage.json引用新的.dspy文件
65 lines
2.1 KiB
JSON
65 lines
2.1 KiB
JSON
{
|
|
"tblname": "llmusage",
|
|
"title": "模型使用",
|
|
"params": {
|
|
"sortby": "use_time desc",
|
|
"toolbar": {
|
|
"tools": [
|
|
{
|
|
"name": "show_usages",
|
|
"label": "使用信息",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/database.svg')}}"
|
|
},
|
|
{
|
|
"name": "show_ioinfo",
|
|
"label": "交互内容",
|
|
"selected_row": true,
|
|
"icon": "{{entire_url('/bricks/imgs/chat-user.svg')}}"
|
|
}
|
|
]
|
|
},
|
|
"binds": [
|
|
{
|
|
"wid": "self",
|
|
"event": "show_usages",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "使用信息",
|
|
"width": "70%",
|
|
"height": "70%"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('../llmusage_usages_display.dspy')}}?id=${id}$"
|
|
}
|
|
},
|
|
{
|
|
"wid": "self",
|
|
"event": "show_ioinfo",
|
|
"actiontype": "urlwidget",
|
|
"target": "PopupWindow",
|
|
"popup_options": {
|
|
"title": "交互内容",
|
|
"width": "70%",
|
|
"height": "70%"
|
|
},
|
|
"options": {
|
|
"url": "{{entire_url('../llmusage_ioinfo_display.dspy')}}?id=${id}$"
|
|
}
|
|
}
|
|
],
|
|
"browserfields": {
|
|
"exclouded": ["id", "usages", "ioinfo"],
|
|
"alters": {}
|
|
},
|
|
"editexclouded": ["id", "usages", "ioinfo"],
|
|
"editable": {
|
|
"get_data_url": "{{entire_url('get_llmusage.dspy')}}?pagerows=50",
|
|
"new_data_url": "{{entire_url('../api/llmusage_create.dspy')}}",
|
|
"update_data_url": "{{entire_url('../api/llmusage_update.dspy')}}",
|
|
"delete_data_url": "{{entire_url('../api/llmusage_delete.dspy')}}"
|
|
}
|
|
}
|
|
}
|