Skip to main content
本指南提供了开始使用 Cerebras 聊天模型. 有关所有 ChatCerebras 功能和配置的详细文档,请前往 API reference. At Cerebras, we’ve developed the world’s largest and fastest AI processor, the Wafer-Scale Engine-3 (WSE-3). The Cerebras CS-3 system, powered by the 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. Want to experience the power of Cerebras? Check out our website for more resources and explore options for accessing our technology through the Cerebras Cloud or on-premise deployments! For more information about Cerebras Cloud, visit cloud.cerebras.ai. Our API reference is available at inference-docs.cerebras.ai.

概述

集成详情

模型功能

设置

凭证

Get an API Key from cloud.cerebras.ai and add it to your environment variables:
要启用模型调用的自动追踪,请设置您的 LangSmith API key:

安装

LangChain 的 Cerebras 集成位于 langchain-cerebras 包中:

实例化

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

调用

流式输出

异步

Async streaming


API 参考

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