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

@@ -62,7 +62,7 @@ func getOpenAIConfig(baseURL string) base.ProviderConfig {
// 请求错误处理
func RequestErrorHandle(resp *http.Response) *types.OpenAIError {
var errorResponse *types.OpenAIErrorResponse
errorResponse := &types.OpenAIErrorResponse{}
err := json.NewDecoder(resp.Body).Decode(errorResponse)
if err != nil {
return nil