小天管理 发表于 7月3日 Share 发表于 7月3日 一开始用 llama-index 的 package , 提示 429 ,检查官网还是有配额的,用了官方的代码示例还是说不行,请问有人知道怎么回事吗? openai.RateLimitError: Error code: 429 - {'error': {'message': 'You exceeded your current quota, please check your plan and billing details. For more information on this error, read the docs: https://platform.openai.com/docs/guides/error-codes/api-errors.', 'type': 'insufficient_quota', 'param': None, 'code': 'insufficient_quota'}} python 代码如下 def openai(): from openai import OpenAI os.environ["OPENAI_API_KEY"] = ( "sk-proj-xxxxxxxxxxxx" ) client = OpenAI() stream = client.chat.completions.create( model="gpt-3.5-turbo", messages=[{"role": "user", "content": "Say this is a test"}], stream=True, ) for chunk in stream: if chunk.choices[0].delta.content is not None: print(chunk.choices[0].delta.content, end="") 去官网查看之后明明是有配额的?请问这是怎么回事? 引用 意见的链接 分享到其他网站 More sharing options...
已推荐帖子
加入讨论
您现在可以发表并稍后注册. 如果您是会员,请现在登录来参与讨论.