Skip to main content
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 ChatCerebras chat models. For detailed documentation of all ChatCerebras features and configurations head to the API reference.

概述

集成详情

模型功能

请参阅下表标题中的链接,了解如何使用特定功能。

设置

要访问 ChatCerebras models,你需要create a Cerebras account, get an API key, and install the @langchain/cerebras integration package.

凭证

Get an API Key from cloud.cerebras.ai and add it to your environment variables:
如果你想要自动追踪模型调用,还可以设置你的 LangSmith API 密钥,取消注释以下内容:

安装

LangChain 的 ChatCerebras 集成位于 @langchain/cerebras 包中:

实例化

现在我们可以实例化模型对象并生成聊天补全:

调用

Json invocation


API 参考

有关所有 ChatCerebras 功能和配置的详细文档,请前往 API 参考