From 2d49ff9968893071e630c3e22bcf8043ba189a9b Mon Sep 17 00:00:00 2001 From: yumoqing Date: Fri, 24 Jul 2026 16:48:45 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E4=B8=8A=E7=BA=BF=E6=A3=80=E6=9F=A5?= =?UTF-8?q?=E8=AE=A1=E8=B4=B9=E6=B5=8B=E8=AF=95=E6=98=BE=E7=A4=BA=E5=AE=8C?= =?UTF-8?q?=E6=95=B4=E4=BB=B7=E6=A0=BC=E5=AD=97=E6=AE=B5=E6=98=8E=E7=BB=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wwwroot/api/llm_launch_check_api.dspy | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/wwwroot/api/llm_launch_check_api.dspy b/wwwroot/api/llm_launch_check_api.dspy index c1391dc..2323d1d 100644 --- a/wwwroot/api/llm_launch_check_api.dspy +++ b/wwwroot/api/llm_launch_check_api.dspy @@ -72,10 +72,13 @@ elif action == 'check_charging': total = 0 for p in prices: amount = getattr(p, 'amount', 0) or 0 - name = getattr(p, 'timing_name', '') or '' + name = getattr(p, 'name', '') or getattr(p, 'timing_name', '') or getattr(p, 'item', '') or '' + # 显示所有可用字段 + fields = [f' {k}={getattr(p,k,"")}' for k in dir(p) if not k.startswith('_') and k not in ('jinja_pass_arg',)] total += amount - lines.append(f'{name}: {amount}') - lines.append(f'合计: {total}') + lines.append(f'{name}: ¥{amount}' + ('\n' + '\n'.join(fields) if fields else '')) + lines.append(f'─────────────────') + lines.append(f'合计: ¥{total}') return json.dumps({'widgettype':'Message','options':{'text':f'计费测试通过\n' + chr(10).join(lines)}}, ensure_ascii=False) except Exception as e: return json.dumps({'widgettype':'Error','options':{'text':f'计费测试失败: {e}'}}, ensure_ascii=False)