V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
Reid
V2EX  ›  OpenAI

为什么 openai api 提示配额不足

  •  
  •   Reid · 91 天前 · 468 次点击
    这是一个创建于 91 天前的主题,其中的信息可能已经有所发展或是发生改变。

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

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

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

    或者你打开 /settings/organization/billing/overview 直接就能看账号还有多少余额了。
    Reid
        5
    Reid  
    OP
       91 天前
    感谢,看到了,过期了。现在没有免费的 API 额度了吗?
    zhhmax
        6
    zhhmax  
       91 天前
    @Reid #5 现在需要充值才能用了,不给送免费额度了,如果充值有困难可以试试我这边的中转 https://luee.net
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   1826 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 01:28 · PVG 09:28 · LAX 18:28 · JFK 21:28
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.