View as Markdown
Cerebras icon

Cerebras ACTION

Create Chat Completion

Create a chat completion with Cerebras AI. See the documentation
  • Action
  • Writes data
  • API key
  • SDK
  • MCP

IMPLEMENTATION

Call this tool

Connect a user's Cerebras account once, then configure and run Create Chat Completion from your backend or agent.

import { PipedreamClient } from "@pipedream/sdk"

const pd = new PipedreamClient({
  projectId: process.env.PIPEDREAM_PROJECT_ID!,
  clientId: process.env.PIPEDREAM_CLIENT_ID!,
  clientSecret: process.env.PIPEDREAM_CLIENT_SECRET!,
  projectEnvironment: "production",
})

const result = await pd.actions.run({
  id: "cerebras-create-chat-completion",
  externalUserId: "{external_user_id}", // any stable ID for this user in your system
  configuredProps: {
    cerebras: { authProvisionId: "apn_xxxxxxx" },
    model: "Model",
    message: "Message",
  },
})

console.log(result)

SCHEMA

Inputs

Pipedream supplies the connected account. Your application provides the operation-specific values below. Dynamic inputs are resolved against that user's account.

Create Chat Completion inputs
Property Type Description
model Model string
The model to use for the request
Required Dynamic
message Message string
The message to send to the model
Required
maxCompletionTokens Max Completion Tokens integer
The maximum number of tokens that can be generated in the completion. The total length of input tokens and generated tokens is limited by the model's context length.
Optional
stream Stream boolean
If set, partial message deltas will be sent. Tokens will be sent as data-only server-sent events as they become available
Optional
seed Seed integer
If specified, our system will make a best effort to sample deterministically, such that repeated requests with the same seed and parameters should return the same result
Optional
stop Stop string
Up to 4 sequences, separated by commas, where the API will stop generating further tokens. The returned text will not contain the stop sequence
Optional
temperature Temperature string
What sampling temperature to use, between 0 and 1.5. Higher values (e.g., 0.8) will make the output more random, while lower values (e.g., 0.2) will make it more focused and deterministic
Optional
topP Top P string
An alternative to sampling with temperature, called nucleus sampling, where the model considers the tokens with top_p probability mass
Optional
toolChoice Tool Choice string
Controls which (if any) tool is called by the model
Optional
tools Tools object
A list of tools the model may call. See the documentation for more information
Optional
user User string
A unique identifier representing your end-user, which can help Cerebras to monitor and detect abuse
Optional
logprobs Log Probabilities boolean
Whether to return log probabilities of the output tokens or not
Optional
topLogprobs Top Log Probabilities integer
An integer between 0 and 20 specifying the number of most likely tokens to return at each token position, each with an associated log probability
Optional

REFERENCE

Tool details

Behavior hints are published with the component in the Pipedream registry and surface as MCP tool annotations, so an agent can reason about a tool before it calls it.

Registry key
cerebras-create-chat-completion
Version
0.0.2
App
Cerebras
Authentication
API key
Read-only
No
Destructive
No
Open world
Yes