DeepSeek
Generate text and code completions using DeepSeek models.
Connect
Auth type: API key (secret_text). Paste the API key (or token) from the provider's settings into the connect dialog. It is encrypted at rest and only decrypted on the server when an action runs.
- In the editor: Backend panel, Integrations tab, then Connect. This connects it for the project.
- For every project in a workspace: Workspace settings, Integrations.
- Owners and admins choose which integrations members may connect in the admin panel (Integrations tab), and can attach their own OAuth app there.
Call it from a workflow
Pass the action name and its input. The call resolves with { success, output, error? }; a missing connection resolves with success false and the reason. See ctx.integrations.invoke and ctx.integrations.call.
// .workflow.js (native ctx)
export async function run(ctx) {
const res = await ctx.integrations.invoke("deepseek", "ask_deepseek", {
"model": "<model>",
"prompt": "<question>",
"maxTokens": 1,
"responseFormat": "text"
});
if (!res.success) throw new Error(res.error);
ctx.log.info("DeepSeek answered", { output: res.output });
}// defineWorkflow module (@app/sdk ctx)
import { defineWorkflow } from "@app/sdk";
export default defineWorkflow({
id: "deepseek-ask-deepseek",
name: "DeepSeek: Ask Deepseek",
description: "Calls DeepSeek when a row is created.",
trigger: { type: "entity_event", entity: "tickets", event: "created" },
async run(ctx, event) {
const res = await ctx.integrations.call("deepseek", {
"action": "ask_deepseek",
"model": "<model>",
"prompt": "<question>",
"maxTokens": 1,
"responseFormat": "text"
}) as { success: boolean; error?: string };
if (!res.success) throw new Error(res.error);
},
});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_deepseekin catalog
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- Tier
- Built in