bugfix
This commit is contained in:
parent
46259314f0
commit
72239535e2
@ -11,7 +11,7 @@ async def llm_charging(sor, ppid, llmusage):
|
||||
env = ServerEnv()
|
||||
prices = await env.pricing_program_charging(sor, ppid, llmusage.usage)
|
||||
if prices is None:
|
||||
e = Exception(f'{ppid=}, {llmusage.usage=} env.pricing_program_charging() return None')
|
||||
e = Exception(f'{ppid=}, {llmusage.usage=}{llmusage.id=} env.pricing_program_charging() return None')
|
||||
exception(f'{e}')
|
||||
raise e
|
||||
return None
|
||||
|
||||
@ -9,11 +9,10 @@ async with get_sor_context(env, 'llmage') as sor:
|
||||
e = Exception(f'{r.llmid=} not found in llm')
|
||||
exception(f'{e}')
|
||||
raise e
|
||||
prices = await llm_charging(sor, llms[0].ppid, r)
|
||||
if not prices:
|
||||
e = Exception(f'{llms[0].ppid=}{r=} not price')
|
||||
exception(f'{e}')
|
||||
raise e
|
||||
try:
|
||||
prices = await llm_charging(sor, llms[0].ppid, r)
|
||||
except:
|
||||
continue
|
||||
|
||||
r.amount = prices.amount
|
||||
r.cost = prices.cost
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user