This commit is contained in:
yumoqing 2026-03-30 08:31:26 +08:00
parent e2f6e4149c
commit be94806d91

View File

@ -10,7 +10,7 @@ from accounting.getaccount import getCustomerBalance
async def llm_charging(sor, ppid, llmusage):
env = ServerEnv()
prices = await env.pricing_program_charging(sor, ppid, llmusage.usage)
if not pricing:
if len(prics) == 0:
d = DictObject()
d.original_amount = d.amount = d.cost = 0.00
return d
@ -62,6 +62,7 @@ async def llm_accounting(request, llmusage):
e = Exception(f'llm ({llmid}) donot has a pricing_program')
exception(f'{e}')
raise e
customerid = llmusage.userorgid
resellerid = recs[0].ownerid
providerid = recs[0].providerid
trans_amount = llmusage.amount