Skip to main content
In online mode, which is the default, Curator sends each request to the provider as soon as it can and gets the response right away. This guide generates poem topics and then poems, and shows the settings that control how fast Curator sends requests.

Prerequisites

  • Python 3.10 or later.
  • Curator, installed with pip install bespokelabs-curator.
  • An API key for an LLM provider. This guide uses OpenAI.
1

Define the response formats

2

Generate topics

This LLM subclass generates a list of topics.
3

Write poems about the topics

This subclass writes two poems for each topic.
The output looks like this.

Rate limit settings

Pass these keys in backend_params to control how fast Curator sends requests.
If you do not set the limits, Curator tries to read them from the provider’s response headers. If it cannot, it uses 200 requests per minute and 100,000 tokens per minute. The API reference lists the settings that apply to every backend, e.g., max_retries and request_timeout.