完善生图5.0的功能
This commit is contained in:
1 parent
88a4268d40
commit
678d213f40
31 files changed
+3281
-107
No files matched your search
@@ -82,6 +82,17 @@ func (s *Service) Quote(ctx context.Context, command QuoteCommand) (*Quote, erro
|
||||
return quote, err
|
||||
}
|
||||
if command.Provider == "seedream" && IsSeedreamBillingModel(command.ReqKey) {
|
||||
layerDecomposition, _ := parameters["layerDecomposition"].(bool)
|
||||
if layerDecomposition {
|
||||
quote.ReservedAmountFen = quote.AmountFen
|
||||
quote.SettlementStatus = "pending"
|
||||
if quote.Parameters == nil {
|
||||
quote.Parameters = Parameters{}
|
||||
}
|
||||
quote.Parameters["layerDecomposition"] = true
|
||||
quote.Parameters["maximumOutputCount"] = float64(17)
|
||||
return quote, nil
|
||||
}
|
||||
referenceImageCount := 0
|
||||
if count, ok := number(parameters["referenceImageCount"]); ok {
|
||||
referenceImageCount = int(math.Ceil(count))
|
||||
|
||||
Reference in new issue
Block a user