python openai API token超限制
目录
一、消息token超限
二、解决办法
三、token访问限制
1、速率限制
2、TOKEN LIMITS REQUEST AND OTHER LIMITS BATCH QUEUE LIMITS 这三个的定义:
1. Token Limits
2. Request and Other Limits
3. Batch Queue Limits
一、消息token超限
raise Exception("Run Failed. Error: ", run.last_error)
Exception: ('Run Failed. Error: ', LastError(code='rate_limit_exceeded', message='Request too large for gpt-4o in organization on tokens per min (TPM): Limit 30000, Requested 32028. The input or output tokens must be reduced in order to run successfully. Visit https://platform.openai.com/account/rate-limits to learn more.'))
二、解决办法
https://platform.openai.com/account/rate-limits to learn more.
通过查阅官网,能够看到。
不同的模型每分钟token使用是有限制的