翻篇收录说明
翻篇网页快照

Cerebras LLM plugin guide | LiveKit Documentation

https://docs.livekit.io/agents/models/llm/cerebras/

最近抓取:2026-12-05 02:00:27(北京时间)

最近内容变化:2026-12-02 13:28:43(北京时间)

这是最近一次有效抓取的文本快照,不含网页脚本、图片和动态交互内容。实际网页可能已更新。

访问原网页

页面简介

How to use the Cerebras inference with LiveKit Agents.

正文摘录

Available inPython|Node.jsOverviewThis plugin allows you to use Cerebras as an LLM provider for your voice agents. Both the Python and Node.js plugins include built-in payload optimization via gzip compression and msgpack encoding for reduced TTFT on large prompts.LiveKit InferenceSome Cerebras models are also available in LiveKit Inference, with billing and integration handled automatically. See the docs for more information.UsageInstall the plugin:PythonNode.jsuv add "livekit-agents[cerebras]~=1.8"pnpm add @livekit/agents-plugin-cerebras@1.xSet the following environment variable in your .env file:CEREBRAS_API_KEY=<your-cerebras-api-key>Create a Cerebras LLM:PythonNode.jsfrom livekit.plugins import cerebras session = AgentSession( llm=cerebras.LLM( model="llama3.1-8b", ), # ... tts, stt, vad, turn_handling, etc.)import { LLM } from '@livekit/agents-plugin-cerebras'; const session = new voice.AgentSession({ llm: new LLM({ model: "llama3.1-8b", }), // ... tts, stt, vad, turnHandling, etc.});ParametersThis section describes some of the available parameters. See the plugin reference links in the Additional resources section for a complete list of all available parameters.modelstr | CerebrasChatModelsDefault: llama3.1-8bModel to use for inference. To learn more, see supported models .gzip_compressionboolDefault: trueWhen enabled, request payloads are gzip-compressed before sending, which can reduce TTFT for requests with large prompts. To learn more, see payload optimization .msgpack_encodingboolDefault: trueWhen enabled, request payloads are encoded with msgpack binary format instead of JSON for additional payload size reduction.temperaturefloatDefault: 1.0Sampling temperature that controls the randomness of the model's output. Higher values make the output more random, while lower values make it more focused and deterministic. Range of valid values can vary by model.Valid values are between 0 and 1.5. To learn more, see the Cerebras documentation .parallel_tool_callsboolControls whether the model can make multiple tool calls in parallel. When enabled, the model can make multiple tool calls simultaneously, which can improve performance for complex tasks.tool_choiceToolChoice | Literal['auto', 'required', 'none']Default: autoControls how the model uses tools. String options are as follows:'auto': Let the model decide.'required': Force tool usage.'none': Disable tool usage.Additional resources The following links provide more information about the Cerebras LLM integration.Python pluginReferenceGitHubPyPINode.js pluginReferenceGitHubNPMCerebras docsCerebras inference docs.Voice AI quickstartGet started with LiveKit Agents and Cerebras.On this pageOverviewUsageParametersAdditional resources