DeepSeek
Generate text and code completions using DeepSeek models.
Connect
Auth type: API key (secret_text). Pass the provider's API key or token as the connection's credential. It is sealed at rest and only opened on the server when an action runs.
- From your agent: integrations {action: "connect", piece, credentials, env} stores the credentials for dev, prod or all. Answers name the fields, never the values.
- Or set the integration's project secrets with the secrets tool (SLACK_BOT_TOKEN, DISCORD_WEBHOOK_URL, TELEGRAM_BOT_TOKEN, TWILIO_ACCOUNT_SID and TWILIO_AUTH_TOKEN …): a call uses the connection, else those secrets. integrations {action: "catalog", piece} lists which ones work.
- Try one action now with integrations {action: "call", piece, piece_action, input}. It really sends.
Call it from a workflow
step.ctx.integrations.invoke("deepseek", action, input) resolves with the provider's answer and rejects when DeepSeek isn't connected or refuses. Wrap it in step.run so a retry sends once. See step.ctx. Its actions run through the integration runner, which the server's operator turns on: integrations {action: "catalog", piece: "deepseek"} says whether yours can call it.
// workflows/notify.ts: call DeepSeek when a booking is confirmed
import { on } from "@appbricx/workflows";
export const tellDeepseek = on.transition("booking", "status", "confirmed", async (_event, step) => {
// Recorded once: a retry doesn't send it twice. Rejects when DeepSeek isn't connected.
const output = await step.run("DeepSeek", () =>
step.ctx.integrations.invoke("deepseek", "ask_deepseek", {
"model": "<model>",
"prompt": "<question>",
"maxTokens": 1,
"responseFormat": "text"
}),
);
step.ctx.log("DeepSeek answered", output);
});{
"name": "integrations",
"arguments": {
"project_id": "<project-id>",
"action": "call",
"piece": "deepseek",
"piece_action": "ask_deepseek",
"input": {
"model": "<model>",
"prompt": "<question>",
"maxTokens": 1,
"responseFormat": "text"
},
"env": "dev"
}
}curl -X POST "$APP_ORIGIN/__appbricx/connector-proxy/deepseek/ask_deepseek" \
-H "Authorization: Bearer $APP_KEY" \
-H "content-type: application/json" \
-d '{"props":{"model":"<model>","prompt":"<question>","maxTokens":1,"responseFormat":"text"}}'Actions
ask_deepseek
Ask Deepseek. Ask Deepseek anything you want!
| Input | Type | Description |
|---|---|---|
modelrequired | id (picked from your account) | The model which will generate the completion. |
promptrequired | long text | Question |
frequencyPenaltyoptional | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on their existing frequency in the text so far, decreasing the model's likelihood to repeat the same line verbatim. |
maxTokensrequired | number | The maximum number of tokens to generate. Possible values are between 1 and 8192. |
presencePenaltyoptional | number | Number between -2.0 and 2.0. Positive values penalize new tokens based on whether they appear in the text so far, increasing the mode's likelihood to talk about new topics. |
responseFormatrequired | one of "text" | "json_object" | The format of the response. IMPORTANT: When using JSON Output, you must also instruct the model to produce JSON yourself |
temperatureoptional | number | Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive. Between 0 and 2. We generally recommend alter… |
topPoptional | number | An alternative to sampling with temperature, called nucleus sampling, where the model considers the results of the tokens with top_p probability mass. So 0.1 means only the tokens comprising the top … |
memoryKeyoptional | text | A memory key that will keep the chat history shared across runs and flows. Keep it empty to leave Deepseek without memory of previous messages. |
rolesoptional | JSON | Array of roles to specify more accurate response |
Details
- Id
deepseek- Category
- AI and ML
- Tags
- ai, deepseek, llm, code-generation
- Package
@activepieces/piece-deepseek@0.1.3- Runs
- Through the integration runner