Documentation
¶
Overview ¶
package db is a package for database
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Billing ¶
type Billing struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` BillingType BillingType `bson:"type" json:"type"` Username string `bson:"username" json:"username"` // UsedQuota how many quotes used totally, 1usd = 500000 quotes UsedQuota Price `bson:"used_quota" json:"used_quota"` }
Billing billing for user
type BillingType ¶
type BillingType string
BillingType billing type
const (
BillTypeTxt2Image BillingType = "txt2image"
)
type OpenaiConservation ¶
type OpenaiConservation struct { ID primitive.ObjectID `bson:"_id,omitempty" json:"id,omitempty"` Model string `bson:"model" json:"model"` MaxTokens uint `bson:"max_tokens" json:"max_tokens"` Prompt []OpenaiMessage `bson:"prompt" json:"prompt"` Completion string `bson:"completion" json:"completion"` }
OpenaiConservation save each conservation of openai
type OpenaiMessage ¶
OpenaiMessage message from openai
type Price ¶
type Price int
Price how many quotes for 1 usd
const ( // PriceTxt2Image how many quotes for txt2image PriceTxt2Image Price = 20000 // 0.04 usd // PriceTxt2ImageFluxPro is the price for txt2image flux pro // // https://replicate.com/pricing PriceTxt2ImageFluxPro Price = 27500 // 0.055 usd PriceTxt2ImageSchnell Price = 1500 // 0.003 usd PriceUploadFile Price = 2500 // 0.005 usd PriceTTS Price = 20 // 0.00004 usd PriceUSD Price = 500000 // 1 usd PriceRMB Price = 500000 / 8 // 1 rmb )
Click to show internal directories.
Click to hide internal directories.