Chat with pdf

如果您在使用专有模型(如 OpenAI 模型)时遇到被限制速率的问题,我们提供了设置 exponential_backoff=True 的选项,并将 delay_between_retries 的值更改为秒(默认为 1 秒)。

例如:

from agno.agent import Agent
from agno.models.openai import OpenAIChat

agent = Agent(
    model=OpenAIChat(id="gpt-4o"),
    description="You are an enthusiastic news reporter with a flair for storytelling!",
    markdown=True,
    exponential_backoff=True,
    delay_between_retries=2
)
agent.print_response("Tell me about a breaking news story from New York.", stream=True)

有关速率限制的具体信息,请参阅我们的 模型文档

对于 OpenAI,它们有基于级别的速率限制。有关更多信息,请参见 文档