bugfix
This commit is contained in:
parent
74ab62a3b1
commit
46259314f0
@ -10,10 +10,11 @@ from accounting.getaccount import getCustomerBalance
|
|||||||
async def llm_charging(sor, ppid, llmusage):
|
async def llm_charging(sor, ppid, llmusage):
|
||||||
env = ServerEnv()
|
env = ServerEnv()
|
||||||
prices = await env.pricing_program_charging(sor, ppid, llmusage.usage)
|
prices = await env.pricing_program_charging(sor, ppid, llmusage.usage)
|
||||||
if len(prices) == 0:
|
if prices is None:
|
||||||
d = DictObject()
|
e = Exception(f'{ppid=}, {llmusage.usage=} env.pricing_program_charging() return None')
|
||||||
d.original_amount = d.amount = d.cost = 0.00
|
exception(f'{e}')
|
||||||
return d
|
raise e
|
||||||
|
return None
|
||||||
amount = 0
|
amount = 0
|
||||||
cost = 0
|
cost = 0
|
||||||
for p in prices:
|
for p in prices:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user