chore: update to zhipu v4 endpoint

chore: update to zhipu v4 endpoint
This commit is contained in:
GAI Group 2024-01-17 03:36:03 +08:00 committed by GitHub
parent eed9f5fdf0
commit c41d72d850
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -191,7 +191,7 @@ func RelayTextHelper(c *gin.Context, relayMode int) *openai.ErrorWithStatusCode
if textRequest.Stream {
method = "sse-invoke"
}
fullRequestURL = fmt.Sprintf("https://open.bigmodel.cn/api/paas/v3/model-api/%s/%s", textRequest.Model, method)
fullRequestURL = fmt.Sprintf("https://open.bigmodel.cn/api/paas/v4/model-api/%s/%s", textRequest.Model, method)
case APITypeAli:
fullRequestURL = "https://dashscope.aliyuncs.com/api/v1/services/aigc/text-generation/generation"
if relayMode == constant.RelayModeEmbeddings {