feat(product): 产线模型产品化接入——product_accounting_generic暴露到env(独立记账进程调用)+resource_module种子加pipeline_llm
This commit is contained in:
parent
f2e828c7b6
commit
8f3bd268ad
@ -125,7 +125,8 @@
|
|||||||
{"id": "billing_mode_2", "parentid": "billing_mode", "k": "2", "v": "超额按量"},
|
{"id": "billing_mode_2", "parentid": "billing_mode", "k": "2", "v": "超额按量"},
|
||||||
|
|
||||||
{"id": "resource_module_llmage", "parentid": "resource_module", "k": "llmage", "v": "大模型管理"},
|
{"id": "resource_module_llmage", "parentid": "resource_module", "k": "llmage", "v": "大模型管理"},
|
||||||
{"id": "resource_module_supplychain", "parentid": "resource_module", "k": "supplychain", "v": "供应链管理"}
|
{"id": "resource_module_supplychain", "parentid": "resource_module", "k": "supplychain", "v": "供应链管理"},
|
||||||
|
{"id": "resource_module_pipeline_llm", "parentid": "resource_module", "k": "pipeline_llm", "v": "产线模型治理"}
|
||||||
],
|
],
|
||||||
"_note_product_category": "产品类别树由每个 reseller (org_id) 自行管理,不在 init/data.json 中预设全局数据。新机构注册时自动创建根类别。"
|
"_note_product_category": "产品类别树由每个 reseller (org_id) 自行管理,不在 init/data.json 中预设全局数据。新机构注册时自动创建根类别。"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -139,6 +139,15 @@ async def product_accounting(llmusage):
|
|||||||
return await manager.product_accounting(llmusage)
|
return await manager.product_accounting(llmusage)
|
||||||
|
|
||||||
|
|
||||||
|
async def product_accounting_generic(product_id, usage_data, userorgid, userid,
|
||||||
|
providerid=None, ownerid=None, tenantid=None):
|
||||||
|
"""通用商品计费落账(模型/账号/存储通用,供独立记账进程调用)。"""
|
||||||
|
manager = get_manager()
|
||||||
|
return await manager.product_accounting_generic(
|
||||||
|
product_id, usage_data, userorgid, userid,
|
||||||
|
providerid=providerid, ownerid=ownerid, tenantid=tenantid)
|
||||||
|
|
||||||
|
|
||||||
async def account_resource_accounting(usage_record):
|
async def account_resource_accounting(usage_record):
|
||||||
"""账号用量计费落账(acctres_usage → 通用计费落账)。"""
|
"""账号用量计费落账(acctres_usage → 通用计费落账)。"""
|
||||||
manager = get_manager()
|
manager = get_manager()
|
||||||
@ -182,6 +191,7 @@ def load_product_management():
|
|||||||
env.sync_llm_product = sync_llm_product
|
env.sync_llm_product = sync_llm_product
|
||||||
# Product accounting
|
# Product accounting
|
||||||
env.product_accounting = product_accounting
|
env.product_accounting = product_accounting
|
||||||
|
env.product_accounting_generic = product_accounting_generic
|
||||||
env.account_resource_accounting = account_resource_accounting
|
env.account_resource_accounting = account_resource_accounting
|
||||||
env.storage_resource_accounting = storage_resource_accounting
|
env.storage_resource_accounting = storage_resource_accounting
|
||||||
env.backend_accounting = backend_accounting
|
env.backend_accounting = backend_accounting
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user