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
Click to show internal directories.
Click to hide internal directories.