查询余额接口支持跨域请求 (#61)

* 查询余额接口支持跨域请求
* 改正智谱倍率
This commit is contained in:
moondie 2024-02-02 12:18:26 +08:00 committed by GitHub
parent 48f9ed29e8
commit 6f3b8ed997
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 2 deletions

View File

@ -84,8 +84,8 @@ func init() {
"chatglm_std": {0.3572, ChannelTypeZhipu}, // ¥0.005 / 1k tokens
"chatglm_lite": {0.1429, ChannelTypeZhipu}, // ¥0.002 / 1k tokens
"glm-3-turbo": {0.3572, ChannelTypeZhipu}, // ¥0.005 / 1k tokens
"glm-4": {0.7143, ChannelTypeZhipu}, // ¥0.01 / 1k tokens
"glm-4v": {0.7143, ChannelTypeZhipu}, // ¥0.01 / 1k tokens
"glm-4": {7.143, ChannelTypeZhipu}, // ¥0.1 / 1k tokens
"glm-4v": {7.143, ChannelTypeZhipu}, // ¥0.1 / 1k tokens
"embedding-2": {0.0357, ChannelTypeZhipu}, // ¥0.0005 / 1k tokens
"cogview-3": {17.8571, ChannelTypeZhipu}, // ¥0.25 / 1张图片
"qwen-turbo": {0.5715, ChannelTypeAli}, // ¥0.008 / 1k tokens // https://help.aliyun.com/zh/dashscope/developer-reference/tongyi-thousand-questions-metering-and-billing

View File

@ -8,6 +8,7 @@ import (
)
func SetDashboardRouter(router *gin.Engine) {
router.Use(middleware.CORS())
apiRouter := router.Group("/")
apiRouter.Use(gzip.Gzip(gzip.DefaultCompression))
apiRouter.Use(middleware.GlobalAPIRateLimit())