feat: support zhipu new API (#44)

This commit is contained in:
Buer
2024-01-19 22:14:30 +08:00
committed by GitHub
parent 0be687905f
commit b42d4d44aa
15 changed files with 344 additions and 128 deletions

View File

@@ -41,7 +41,7 @@ func getConfig() base.ProviderConfig {
// 请求错误处理
func requestErrorHandle(resp *http.Response) *types.OpenAIError {
var aliError *AliError
aliError := &AliError{}
err := json.NewDecoder(resp.Body).Decode(aliError)
if err != nil {
return nil