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

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