feat(model):优化模型价格设置功能
This commit is contained in:
1 parent
add95ca5ab
commit
ee96a5b866
10 files changed
+181
-11
No files matched your search
@@ -128,6 +128,10 @@ type PricingGetReq struct {
|
||||
type PricingGetRes struct {
|
||||
List []PricingItem `json:"list"`
|
||||
TimeSegments []TimeSegmentItem `json:"time_segments" dc:"时段定价列表(锚点行 time_segments)"`
|
||||
// 以下为锚点行展示字段(仅 min_tokens=0 行生效)
|
||||
PriceNote string `json:"price_note" dc:"价格说明(仅管理后台可见的内部备注)"`
|
||||
DiscountLabel string `json:"discount_label" dc:"折扣标签(对外展示,如 7折起)"`
|
||||
PriceChangeNote string `json:"price_change_note" dc:"价格调整说明(对外展示,提示价格有变动)"`
|
||||
}
|
||||
|
||||
// PricingSetReq 设置模型定价(全量替换)
|
||||
@@ -136,6 +140,10 @@ type PricingSetReq struct {
|
||||
ModelID int64 `json:"model_id" in:"path" v:"required" dc:"模型ID"`
|
||||
Items []PricingItem `json:"items" v:"required" dc:"定价列表"`
|
||||
TimeSegments []TimeSegmentItem `json:"time_segments" dc:"时段定价(可选,全量替换;空数组清除时段配置)"`
|
||||
// 以下为锚点行展示字段(全量替换语义:空=清除;price_note 不透出到租户端)
|
||||
PriceNote string `json:"price_note" dc:"价格说明(仅内部可见)"`
|
||||
DiscountLabel string `json:"discount_label" dc:"折扣标签(对外展示)"`
|
||||
PriceChangeNote string `json:"price_change_note" dc:"价格调整说明(对外展示)"`
|
||||
}
|
||||
|
||||
type PricingSetRes struct{}
|
||||
|
||||
@@ -60,6 +60,10 @@ type TenantAvailableModelItem struct {
|
||||
PricingTiers []PricingTierItem `json:"pricing_tiers"`
|
||||
// TimePrices 时段价目(平台配置了时段定价的模型才有;价格为换算后的展示价)
|
||||
TimePrices []TimePriceItem `json:"time_prices"`
|
||||
// DiscountLabel 折扣标签(平台定价锚点行配置的营销展示文案,如"7折起";NULL=不展示)
|
||||
DiscountLabel *string `json:"discount_label"`
|
||||
// PriceChangeNote 价格调整说明(对外提示价格有变动;NULL=不展示)
|
||||
PriceChangeNote *string `json:"price_change_note"`
|
||||
// AsyncImage 图片模型异步端点是否可用(提交 /v1/images/generations/async 后轮询取图)。
|
||||
// 仅图片分类模型有意义;真异步厂商,或同步厂商且「同步图片异步化」开关开启时为 true。
|
||||
AsyncImage bool `json:"async_image"`
|
||||
|
||||
Reference in new issue
Block a user