feat: show_llms_cards_by_provider 添加定价展示 + 优化批量查询
1. get_llms_sort_by_provider: 添加 ppid 批量查询和 pricing_display 2. get_llms_by_catelog: N+1 查询改为批量 ppid 查询,性能优化 3. show_llms_cards_by_provider.ui: 添加 pricing-box 展示区块 4. 两个函数都处理 get_pricing_display 返回 None 的情况
This commit is contained in:
parent
c15cb0416e
commit
c90cd88dd4
BIN
wwwroot/.nfs00000000031a8fbc00027cf2
Normal file
BIN
wwwroot/.nfs00000000031a8fbc00027cf2
Normal file
Binary file not shown.
@ -25,7 +25,7 @@
|
||||
"options":{
|
||||
"css":"card plaza-card",
|
||||
"cwidth":25,
|
||||
"cheight":12
|
||||
"cheight":16
|
||||
},
|
||||
"subwidgets":[
|
||||
{
|
||||
@ -56,6 +56,25 @@
|
||||
"wrap":true,
|
||||
"halign":"left"
|
||||
}
|
||||
},
|
||||
{
|
||||
"widgettype":"Filler",
|
||||
"options":{
|
||||
"css":"pricing-box"
|
||||
},
|
||||
"subwidgets":[
|
||||
{% for pricing_text in llm.pricing_display %}
|
||||
{
|
||||
"widgettype":"Text",
|
||||
"options":{
|
||||
"text":{{json.dumps(pricing_text, ensure_ascii=False)}},
|
||||
"wrap":true,
|
||||
"halign":"left",
|
||||
"css":"pricing-text"
|
||||
}
|
||||
}{% if not loop.last %},{% endif %}
|
||||
{% endfor %}
|
||||
]
|
||||
}
|
||||
],
|
||||
"binds":[
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user