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"],
|
"editexclouded": ["id", "created_at", "updated_at"],
|
||||||
"editable": {
|
"editable": {
|
||||||
"new_data_url": "{{entire_url('../api/llm_create.dspy')}}",
|
"new_data_url": "{{entire_url('./add_llm.dspy')}}",
|
||||||
"update_data_url": "{{entire_url('../api/llm_update.dspy')}}",
|
"update_data_url": "{{entire_url('./update_llm.dspy')}}",
|
||||||
"delete_data_url": "{{entire_url('../api/llm_delete.dspy')}}"
|
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}"
|
||||||
},
|
},
|
||||||
"confidential_fields": ["api_key"]
|
"confidential_fields": ["api_key"]
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,43 +1,187 @@
|
|||||||
|
|
||||||
{
|
{
|
||||||
"widgettype": "Tabular",
|
"widgettype":"VBox",
|
||||||
"id": "llm_tbl",
|
"options":{"height":"100%","width":"100%"},
|
||||||
"options": {
|
"subwidgets":[
|
||||||
"width": "100%",
|
{
|
||||||
"title": "大模型管理",
|
"id":"llm_tbl",
|
||||||
"css": "card",
|
"widgettype":"Tabular",
|
||||||
"data_url": "{{entire_url('./get_llms.dspy')}}",
|
"options":{
|
||||||
"data_method": "GET",
|
"width":"100%",
|
||||||
"editable": {
|
"height":"100%",
|
||||||
"new_data_url": "{{entire_url('./create_llm.dspy')}}",
|
|
||||||
"update_data_url": "{{entire_url('./update_llm.dspy')}}",
|
|
||||||
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}"
|
"title":"大语言模型表",
|
||||||
},
|
|
||||||
"browserfields": {
|
|
||||||
"exclouded": ["id", "api_key"],
|
|
||||||
"alters": {
|
|
||||||
"status": {
|
"css":"card",
|
||||||
"uitype": "code",
|
|
||||||
"data": [
|
|
||||||
{"value": "active", "text": "启用"},
|
"editable":{
|
||||||
{"value": "inactive", "text": "停用"}
|
|
||||||
]
|
"new_data_url": "{{entire_url('./add_llm.dspy')}}",
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
"delete_data_url": "{{entire_url('./delete_llm.dspy')}}",
|
||||||
"editexclouded": ["id", "created_at", "updated_at"],
|
|
||||||
"confidential_fields": ["api_key"],
|
|
||||||
"fields": [
|
"update_data_url": "{{entire_url('./update_llm.dspy')}}"
|
||||||
{"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},
|
"data_url":"{{entire_url('./get_llm.dspy')}}",
|
||||||
{"name": "max_tokens", "title": "最大Token", "type": "str", "cwidth": 10},
|
|
||||||
{"name": "status", "title": "状态", "type": "str", "cwidth": 8},
|
"data_method":"GET",
|
||||||
{"name": "description", "title": "描述", "type": "str", "cwidth": 16},
|
"data_params":{{json.dumps(params_kw, indent=4, ensure_ascii=False)}},
|
||||||
{"name": "created_at", "title": "创建时间", "type": "str", "cwidth": 14},
|
"row_options":{
|
||||||
{"name": "updated_at", "title": "更新时间", "type": "str", "cwidth": 14}
|
|
||||||
]
|
|
||||||
|
|
||||||
|
"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