Documentation
¶
Index ¶
- Constants
- Variables
- func AddNewMissingRatio(oldRatio string) string
- func CompletionRatio2JSONString() string
- func GetCompletionRatio(name string, channelType int) float64
- func GetGroupRatio(name string) float64
- func GetModelRatio(name string, channelType int) float64
- func GroupRatio2JSONString() string
- func ModelRatio2JSONString() string
- func UpdateCompletionRatioByJSONString(jsonStr string) error
- func UpdateGroupRatioByJSONString(jsonStr string) error
- func UpdateModelRatioByJSONString(jsonStr string) error
Constants ¶
View Source
const ( USD2RMB = 7 USD = 500 // $0.002 = 1 -> $1 = 500 RMB = USD / USD2RMB )
Variables ¶
View Source
var ( DefaultModelRatio map[string]float64 DefaultCompletionRatio map[string]float64 )
View Source
var CompletionRatio = map[string]float64{
"llama3-8b-8192(33)": 0.0006 / 0.0003,
"llama3-70b-8192(33)": 0.0035 / 0.00265,
}
View Source
var GroupRatio = map[string]float64{
"default": 1,
"vip": 1,
"svip": 1,
}
View Source
var ImageGenerationAmounts = map[string][2]int{
"dall-e-2": {1, 10},
"dall-e-3": {1, 1},
"ali-stable-diffusion-xl": {1, 4},
"ali-stable-diffusion-v1.5": {1, 4},
"wanx-v1": {1, 4},
"cogview-3": {1, 1},
"step-1x-medium": {1, 1},
}
View Source
var ImageOriginModelName = map[string]string{
"ali-stable-diffusion-xl": "stable-diffusion-xl",
"ali-stable-diffusion-v1.5": "stable-diffusion-v1.5",
}
View Source
var ImagePromptLengthLimitations = map[string]int{
"dall-e-2": 1000,
"dall-e-3": 4000,
"ali-stable-diffusion-xl": 4000,
"ali-stable-diffusion-v1.5": 4000,
"wanx-v1": 4000,
"cogview-3": 833,
"step-1x-medium": 4000,
}
View Source
var ImageSizeRatios = map[string]map[string]float64{
"dall-e-2": {
"256x256": 1,
"512x512": 1.125,
"1024x1024": 1.25,
},
"dall-e-3": {
"1024x1024": 1,
"1024x1792": 2,
"1792x1024": 2,
},
"ali-stable-diffusion-xl": {
"512x1024": 1,
"1024x768": 1,
"1024x1024": 1,
"576x1024": 1,
"1024x576": 1,
},
"ali-stable-diffusion-v1.5": {
"512x1024": 1,
"1024x768": 1,
"1024x1024": 1,
"576x1024": 1,
"1024x576": 1,
},
"wanx-v1": {
"1024x1024": 1,
"720x1280": 1,
"1280x720": 1,
},
"step-1x-medium": {
"256x256": 1,
"512x512": 1,
"768x768": 1,
"1024x1024": 1,
"1280x800": 1,
"800x1280": 1,
},
}
View Source
var ModelRatio = map[string]float64{}/* 288 elements not displayed */
ModelRatio https://platform.openai.com/docs/models/model-endpoint-compatibility https://cloud.baidu.com/doc/WENXINWORKSHOP/s/Blfmc9dlf https://openai.com/pricing 1 === $0.002 / 1K tokens 1 === ¥0.014 / 1k tokens
Functions ¶
func AddNewMissingRatio ¶
func CompletionRatio2JSONString ¶
func CompletionRatio2JSONString() string
func GetCompletionRatio ¶
func GetGroupRatio ¶
func GetModelRatio ¶
func GroupRatio2JSONString ¶
func GroupRatio2JSONString() string
func ModelRatio2JSONString ¶
func ModelRatio2JSONString() string
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.