agentsociety.commercial.billing.models¶
账户系统模型,包含用户账户、消费记录、充值记录等
Module Contents¶
Classes¶
账单项目枚举 |
|
账户记录 |
|
实验计费配置 |
|
账单记录,未完成支付的充值不进入账单 |
|
账户记录 |
|
账单记录,未完成支付的充值不进入账单 |
Data¶
API¶
- agentsociety.commercial.billing.models.__all__¶
[‘Bill’, ‘ApiBill’, ‘Account’, ‘ApiAccount’, ‘ItemEnum’]
- class agentsociety.commercial.billing.models.ItemEnum¶
-
账单项目枚举
Initialization
Initialize self. See help(type(self)) for accurate signature.
- RECHARGE¶
‘recharge’
- LLM_INPUT_TOKEN¶
‘llm_input_token’
- LLM_OUTPUT_TOKEN¶
‘llm_output_token’
- RUNTIME¶
‘run_time’
- class agentsociety.commercial.billing.models.Account¶
Bases:
agentsociety.webapi.models._base.Base账户记录
- __tablename__¶
None
- balance: sqlalchemy.orm.Mapped[agentsociety.webapi.models._base.MoneyDecimal]¶
‘mapped_column(…)’
余额,单位:元,保留6位小数
- created_at: sqlalchemy.orm.Mapped[datetime.datetime]¶
‘mapped_column(…)’
创建时间
- updated_at: sqlalchemy.orm.Mapped[datetime.datetime]¶
‘mapped_column(…)’
- class agentsociety.commercial.billing.models.ExperimentBillConfig¶
Bases:
agentsociety.webapi.models._base.Base实验计费配置
- __tablename__¶
None
- class agentsociety.commercial.billing.models.Bill¶
Bases:
agentsociety.webapi.models._base.Base账单记录,未完成支付的充值不进入账单
- __tablename__¶
None
‘mapped_column(…)’
关联实验ID
- amount: sqlalchemy.orm.Mapped[agentsociety.webapi.models._base.MoneyDecimal]¶
‘mapped_column(…)’
账单金额,单位:元,保留6位小数,负值为消费,正值为充值
- unit_price: sqlalchemy.orm.Mapped[agentsociety.webapi.models._base.MoneyDecimal]¶
‘mapped_column(…)’
单价,单位:元,保留6位小数
- created_at: sqlalchemy.orm.Mapped[datetime.datetime]¶
‘mapped_column(…)’
创建时间
- __table_args__¶
()
- class agentsociety.commercial.billing.models.ApiAccount¶
Bases:
pydantic.BaseModel账户记录
- balance: decimal.Decimal¶
None
余额,单位:元,保留2位小数
- created_at: pydantic.AwareDatetime¶
None
创建时间
- updated_at: pydantic.AwareDatetime¶
None
更新时间
- class agentsociety.commercial.billing.models.ApiBill¶
Bases:
pydantic.BaseModel账单记录,未完成支付的充值不进入账单
None
关联实验ID
- amount: decimal.Decimal¶
None
账单金额,单位:元,保留6位小数,负值为消费,正值为充值
- unit_price: decimal.Decimal¶
None
单价,单位:元,保留6位小数
- created_at: pydantic.AwareDatetime¶
None
创建时间