fix: llm CRUD json URLs match generated dspy names; rebuild llm index.ui
This commit is contained in:
parent
7288eb5ba8
commit
0b01c58534
@ -9,9 +9,9 @@
|
||||
},
|
||||
"editexclouded": ["id", "created_at", "updated_at"],
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('../api/llm_create.dspy')}}",
|
||||
"update_data_url": "{{entire_url('../api/llm_update.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('../api/llm_delete.dspy')}}"
|
||||
"new_data_url": "{{entire_url('./add_llm.dspy')}}",
|
||||
"update_data_url": "{{entire_url('./update_llm.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}"
|
||||
},
|
||||
"confidential_fields": ["api_key"]
|
||||
}
|
||||
|
||||
@ -1,43 +1,187 @@
|
||||
|
||||
{
|
||||
"widgettype": "Tabular",
|
||||
"id": "llm_tbl",
|
||||
"options": {
|
||||
"width": "100%",
|
||||
"title": "大模型管理",
|
||||
"css": "card",
|
||||
"data_url": "{{entire_url('./get_llms.dspy')}}",
|
||||
"data_method": "GET",
|
||||
"editable": {
|
||||
"new_data_url": "{{entire_url('./create_llm.dspy')}}",
|
||||
"update_data_url": "{{entire_url('./update_llm.dspy')}}",
|
||||
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}"
|
||||
},
|
||||
"browserfields": {
|
||||
"exclouded": ["id", "api_key"],
|
||||
"alters": {
|
||||
"status": {
|
||||
"uitype": "code",
|
||||
"data": [
|
||||
{"value": "active", "text": "启用"},
|
||||
{"value": "inactive", "text": "停用"}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"editexclouded": ["id", "created_at", "updated_at"],
|
||||
"confidential_fields": ["api_key"],
|
||||
"fields": [
|
||||
{"name": "id", "title": "ID", "type": "str", "cwidth": 0},
|
||||
{"name": "name", "title": "模型名称", "type": "str", "cwidth": 18},
|
||||
{"name": "provider", "title": "供应商", "type": "str", "cwidth": 12},
|
||||
{"name": "model_id", "title": "模型标识", "type": "str", "cwidth": 18},
|
||||
{"name": "api_base", "title": "API地址", "type": "str", "cwidth": 20},
|
||||
{"name": "api_key", "title": "API密钥", "type": "str", "cwidth": 14},
|
||||
{"name": "max_tokens", "title": "最大Token", "type": "str", "cwidth": 10},
|
||||
{"name": "status", "title": "状态", "type": "str", "cwidth": 8},
|
||||
{"name": "description", "title": "描述", "type": "str", "cwidth": 16},
|
||||
{"name": "created_at", "title": "创建时间", "type": "str", "cwidth": 14},
|
||||
{"name": "updated_at", "title": "更新时间", "type": "str", "cwidth": 14}
|
||||
]
|
||||
"widgettype":"VBox",
|
||||
"options":{"height":"100%","width":"100%"},
|
||||
"subwidgets":[
|
||||
{
|
||||
"id":"llm_tbl",
|
||||
"widgettype":"Tabular",
|
||||
"options":{
|
||||
"width":"100%",
|
||||
"height":"100%",
|
||||
|
||||
|
||||
"title":"大语言模型表",
|
||||
|
||||
|
||||
|
||||
|
||||
"css":"card",
|
||||
|
||||
|
||||
"editable":{
|
||||
|
||||
"new_data_url": "{{entire_url('./add_llm.dspy')}}",
|
||||
|
||||
|
||||
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}",
|
||||
|
||||
|
||||
"update_data_url": "{{entire_url('./update_llm.dspy')}}"
|
||||
|
||||
|
||||
},
|
||||
|
||||
|
||||
"data_url":"{{entire_url('./get_llm.dspy')}}",
|
||||
|
||||
"data_method":"GET",
|
||||
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
||||
"row_options":{
|
||||
|
||||
|
||||
|
||||
"browserfields": {
|
||||
"exclouded": [
|
||||
"id",
|
||||
"api_key"
|
||||
],
|
||||
"cwidth": {}
|
||||
},
|
||||
|
||||
|
||||
"editexclouded":[
|
||||
"id",
|
||||
"created_at",
|
||||
"updated_at"
|
||||
],
|
||||
|
||||
"fields":[
|
||||
{
|
||||
"name": "id",
|
||||
"title": "主键",
|
||||
"type": "str",
|
||||
"length": 32,
|
||||
"nullable": "no",
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "主键"
|
||||
},
|
||||
{
|
||||
"name": "name",
|
||||
"title": "模型名称",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"nullable": "no",
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "模型名称"
|
||||
},
|
||||
{
|
||||
"name": "provider",
|
||||
"title": "供应商",
|
||||
"type": "str",
|
||||
"length": 50,
|
||||
"nullable": "no",
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "供应商"
|
||||
},
|
||||
{
|
||||
"name": "model_id",
|
||||
"title": "模型标识",
|
||||
"type": "str",
|
||||
"length": 100,
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "模型标识"
|
||||
},
|
||||
{
|
||||
"name": "api_base",
|
||||
"title": "API地址",
|
||||
"type": "str",
|
||||
"length": 500,
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "API地址"
|
||||
},
|
||||
{
|
||||
"name": "api_key",
|
||||
"title": "API密钥",
|
||||
"type": "str",
|
||||
"length": 500,
|
||||
"cwidth": 18,
|
||||
"uitype": "password",
|
||||
"datatype": "str",
|
||||
"label": "API密钥"
|
||||
},
|
||||
{
|
||||
"name": "max_tokens",
|
||||
"title": "最大Token",
|
||||
"type": "int",
|
||||
"default": "8192",
|
||||
"length": 0,
|
||||
"uitype": "int",
|
||||
"datatype": "int",
|
||||
"label": "最大Token"
|
||||
},
|
||||
{
|
||||
"name": "status",
|
||||
"title": "状态",
|
||||
"type": "str",
|
||||
"length": 20,
|
||||
"default": "active",
|
||||
"cwidth": 18,
|
||||
"uitype": "str",
|
||||
"datatype": "str",
|
||||
"label": "状态"
|
||||
},
|
||||
{
|
||||
"name": "description",
|
||||
"title": "描述",
|
||||
"type": "text",
|
||||
"length": 0,
|
||||
"uitype": "text",
|
||||
"datatype": "text",
|
||||
"label": "描述"
|
||||
},
|
||||
{
|
||||
"name": "created_at",
|
||||
"title": "创建时间",
|
||||
"type": "timestamp",
|
||||
"length": 0,
|
||||
"uitype": "str",
|
||||
"datatype": "timestamp",
|
||||
"label": "创建时间"
|
||||
},
|
||||
{
|
||||
"name": "updated_at",
|
||||
"title": "更新时间",
|
||||
"type": "timestamp",
|
||||
"length": 0,
|
||||
"uitype": "str",
|
||||
"datatype": "timestamp",
|
||||
"label": "更新时间"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
"page_rows":160,
|
||||
"cache_limit":5
|
||||
}
|
||||
|
||||
,"binds":[]
|
||||
|
||||
}]
|
||||
}
|
||||
Loading…
x
Reference in New Issue
Block a user