Use this file to discover all available pages before exploring further.
Cerebras is a model provider that serves open source models with an emphasis on speed. The Cerebras CS-3 system, powered by the Wafer-Scale Engine-3 (WSE-3), represents a new class of AI supercomputer that sets the standard for generative AI training and inference with unparalleled performance and scalability.With Cerebras as your inference provider, you can:
Achieve unprecedented speed for AI inference workloads
Build commercially with high throughput
Effortlessly scale your AI workloads with our seamless clustering technology
Our CS-3 systems can be quickly and easily clustered to create the largest AI supercomputers in the world, making it simple to place and run the largest models. Leading corporations, research institutions, and governments are already using Cerebras solutions to develop proprietary models and train popular open-source models.This will help you getting started with ChatCerebraschat models. For detailed documentation of all ChatCerebras features and configurations head to the API reference.
const aiMsg = await llm.invoke([ { role: "system", content: "You are a helpful assistant that translates English to French. Translate the user sentence.", }, { role: "user", content: "I love programming." },])aiMsg
const messages = [ { role: "system", content: "You are a math tutor that handles math exercises and makes output in json in format { result: number }.", }, { role: "user", content: "2 + 2" },];const aiInvokeMsg = await llm.invoke(messages, { response_format: { type: "json_object" } });// if you want not to pass response_format in every invoke, you can bind it to the instanceconst llmWithResponseFormat = llm.bind({ response_format: { type: "json_object" } });const aiBindMsg = await llmWithResponseFormat.invoke(messages);// they are the sameconsole.log({ aiInvokeMsgContent: aiInvokeMsg.content, aiBindMsg: aiBindMsg.content });