curator.LLM
curator.LLM is the main class for prompting LLMs in Curator. Calling an LLM object returns a CuratorResponse.
Constructor parameters
Class attributes
Call parameters
prompt()
- A string, which Curator sends as a single user message.
- A list of messages, each a dictionary with
roleandcontent. - A tuple of text and a
curator.types.Image, for multimodal prompts.
parse()
response_format if you set one, or a dictionary if return_completions_object is True.
Backends
To use any other API that is compatible with the OpenAI API, set
backend="openai" and pass base_url and api_key in backend_params. The Hugging Face Inference Providers guide shows an example.
Backend parameters
backend_params is a dictionary. The keys you can use depend on the mode.
Common parameters
These work with every backend.Online parameters
These work in online mode, which is the default.Batch parameters
These work whenbatch=True.
Offline parameters
These work with thevllm backend.
CuratorResponse
EveryLLM call returns a CuratorResponse with these attributes.