Explorar o código

feat: 添加对 Zhipu v4 渠道获取模型列表的支持

RedwindA hai 5 meses
pai
achega
c25f487c8f
Modificáronse 1 ficheiros con 2 adicións e 0 borrados
  1. 2 0
      controller/channel.go

+ 2 - 0
controller/channel.go

@@ -188,6 +188,8 @@ func FetchUpstreamModels(c *gin.Context) {
 		url = fmt.Sprintf("%s/v1beta/openai/models", baseURL) // Remove key in url since we need to use AuthHeader
 	case constant.ChannelTypeAli:
 		url = fmt.Sprintf("%s/compatible-mode/v1/models", baseURL)
+	case constant.ChannelTypeZhipu_v4:
+		url = fmt.Sprintf("%s/api/paas/v4/models", baseURL)
 	default:
 		url = fmt.Sprintf("%s/v1/models", baseURL)
 	}