Introducing structured outputs with Cerebras Inference
What's Cerebras?
Cerebras offers the fastest inference on the market, 20x faster than on GPUs.
Sign up for a Cerebras Inference API key here at cloud.cerebras.ai.
Basic Usage
To get guaranteed structured outputs with Cerebras Inference, you
- Create a new Instructor client with the
from_cerebras
method - Define a Pydantic model to pass into the
response_model
parameter - Get back a validated response exactly as you would expect
You'll also need to install the Cerebras SDK to use the client. You can install it with the command below.