增加即梦图片5.0和视频2.5的能力
This commit is contained in:
1 parent
542246e4ce
commit
88a4268d40
55 files changed
+1412
-200
No files matched your search
@@ -77,7 +77,7 @@ func (p *SettlementProcessor) Advance(ctx context.Context, job jobs.Job) (jobs.J
|
||||
resolution := seedanceResolution(charge.raw)
|
||||
inputVideo := seedanceRequestHasInputVideo(advanced.RequestPayload)
|
||||
actualAmount, err := billing.CalculateSeedanceActualAmountFen(billing.SeedanceActualAmountInput{
|
||||
Resolution: resolution, InputVideo: inputVideo, CompletionTokens: completionTokens,
|
||||
Model: advanced.ReqKey, Resolution: resolution, InputVideo: inputVideo, CompletionTokens: completionTokens,
|
||||
MarkupMultiplier: numberOrZero(charge.raw["markupMultiplier"]),
|
||||
})
|
||||
if err != nil {
|
||||
@@ -104,7 +104,7 @@ func (p *SettlementProcessor) Advance(ctx context.Context, job jobs.Job) (jobs.J
|
||||
Metadata: map[string]any{
|
||||
"operation": "seedance_actual_settlement", "reservedAmountFen": reservedAmount,
|
||||
"chargedAmountFen": charge.AmountFen, "actualAmountFen": actualAmount,
|
||||
"completionTokens": completionTokens, "inputVideo": inputVideo, "resolution": resolution,
|
||||
"completionTokens": completionTokens, "inputVideo": inputVideo, "resolution": resolution, "model": advanced.ReqKey,
|
||||
},
|
||||
})
|
||||
if postErr != nil {
|
||||
@@ -125,8 +125,8 @@ func (p *SettlementProcessor) Advance(ctx context.Context, job jobs.Job) (jobs.J
|
||||
delete(charge.raw, "settlementLedgerEntryId")
|
||||
}
|
||||
charge.raw["providerUsage"] = map[string]any{
|
||||
"completionTokens": completionTokens, "resolution": resolution, "inputVideo": inputVideo,
|
||||
"tokenPriceFenPerMillion": billing.SeedanceTokenPriceFenPerMillion(resolution, inputVideo),
|
||||
"completionTokens": completionTokens, "resolution": resolution, "inputVideo": inputVideo, "model": advanced.ReqKey,
|
||||
"tokenPriceFenPerMillion": billing.SeedanceTokenPriceFenPerMillion(advanced.ReqKey, resolution, inputVideo),
|
||||
}
|
||||
return p.write(ctx, advanced, charge.raw)
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user