shensuming commited on
Commit
7fa19ec
·
verified ·
1 Parent(s): 24d1667

Update main.py

Browse files
Files changed (1) hide show
  1. main.py +2 -2
main.py CHANGED
@@ -718,7 +718,7 @@ async def chat_endpoint(payload: ChatPayload, background_tasks: BackgroundTasks,
718
 
719
  if combined_total_tokens > 0:
720
  # 铁血公式对总 Token 算账
721
- points_to_deduct = math.ceil((combined_total_tokens * 1.2) / 441)
722
  if points_to_deduct < 1: points_to_deduct = 1
723
  else:
724
  points_to_deduct = 0
@@ -779,7 +779,7 @@ async def chat_endpoint(payload: ChatPayload, background_tasks: BackgroundTasks,
779
  # 修复 Bug 4:使用 orchestrator 传递过来的正确字段名 frontdesk_tokens
780
  actual_total_tokens = result.get("used_tokens", 0) or result.get("frontdesk_tokens", 0)
781
  if actual_total_tokens > 0:
782
- points_to_deduct = math.ceil((actual_total_tokens * 1.2) / 441)
783
  if points_to_deduct < 1: points_to_deduct = 1
784
 
785
  def _deduct_frontdesk_bill():
 
718
 
719
  if combined_total_tokens > 0:
720
  # 铁血公式对总 Token 算账
721
+ points_to_deduct = math.ceil((combined_total_tokens * 1.2) / 150)
722
  if points_to_deduct < 1: points_to_deduct = 1
723
  else:
724
  points_to_deduct = 0
 
779
  # 修复 Bug 4:使用 orchestrator 传递过来的正确字段名 frontdesk_tokens
780
  actual_total_tokens = result.get("used_tokens", 0) or result.get("frontdesk_tokens", 0)
781
  if actual_total_tokens > 0:
782
+ points_to_deduct = math.ceil((actual_total_tokens * 1.2) / 150)
783
  if points_to_deduct < 1: points_to_deduct = 1
784
 
785
  def _deduct_frontdesk_bill():