为什么 openai api 提示配额不足

91 天前
 Reid

一开始用 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="")

去官网查看之后明明是有配额的?请问这是怎么回事?

468 次点击
所在节点    OpenAI
6 条回复
Reid
91 天前
为什么总是图裂了。
https://imgur.com/FNlFcwl
![img]( https://imgur.com/FNlFcwl)
zhhmax
91 天前
这个提示意思就是你帐号没钱了,你但凡把图稍微截大一点,就能看到帐号上到底还要多少余额了,你截图里面显示的不代表你有那么多钱可以用。
Reid
91 天前
@zhhmax
这样截图吗? 我看这个不是还有 18$ 呢吗
zhhmax
91 天前
点右边下面的那个箭头,出来的新页面右边,Credit Grants

或者你打开 /settings/organization/billing/overview 直接就能看账号还有多少余额了。
Reid
91 天前
感谢,看到了,过期了。现在没有免费的 API 额度了吗?
zhhmax
91 天前
@Reid #5 现在需要充值才能用了,不给送免费额度了,如果充值有困难可以试试我这边的中转 https://luee.net

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/1054866

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX