go-openai icon indicating copy to clipboard operation
go-openai copied to clipboard

when the apikey is use out money it return EOF?

Open hcws opened this issue 1 year ago • 1 comments

maybe then you use out money ,it should return error ,like You exceeded your current quota, please check your plan and billing details.

this is a apikey for test : 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

hcws avatar Feb 25 '23 10:02 hcws

encounter the same problem

tsingroo avatar Mar 19 '23 08:03 tsingroo

I think this might be resolved by https://github.com/sashabaranov/go-openai/pull/248

I was getting the exceeded quota error which would cause this library to panic with error, json: cannot unmarshal number into Go struct field APIError.error.code of type string, but the library now parses the error correctly.

young-steveo avatar Apr 14 '23 18:04 young-steveo

I'm closing this because it appears to have already been resolved.

vvatanabe avatar Jul 01 '23 21:07 vvatanabe