Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
import app from "../../stealthgpt.app.mjs";

export default {
key: "stealthgpt-generate-content",
name: "Generate or Rephrase Content",
description: "Generates or rephrases content based on the provided prompt. [See the documentation](https://docs.stealthgpt.ai/api-requests-and-parameters)",
version: "0.0.1",
type: "action",
props: {
app,
prompt: {
propDefinition: [
app,
"prompt",
],
},
rephrase: {
type: "boolean",
label: "Rephrase",
description: "A boolean value (`true` or `false`) that indicates whether the API should rephrase the content or generate new content based on the prompt. Set to `true` for rephrasing and `false` for content generation.",
},
tone: {
type: "string",
label: "Tone",
description: "Specifies the desired tone for the response. For example, `Casual`, `Academic`, etc.",
optional: true,
},
mode: {
type: "string",
label: "Mode",
description: "Indicates the detail level of the response: `High`, `Medium`, or `Low`.",
optional: true,
options: [
"High",
"Medium",
"Low",
],
},
business: {
type: "boolean",
label: "Business",
description: "A boolean flag to indicate if the request is related to a business context. Setting this to `true` uses a model 10x more powerful than the standard StealthGPT engine, making the content far more undetectable and coherent but also consuming more tokens.",
optional: true,
},
},
methods: {
generateContent(args = {}) {
return this.app.post({
path: "/stealthify",
...args,
});
},
},
async run({ $ }) {
const {
generateContent,
prompt,
rephrase,
tone,
mode,
business,
} = this;

const response = await generateContent({
$,
data: {
prompt,
rephrase,
tone,
mode,
business,
},
});

$.export("$summary", "Successfully generated content.");
return response;
},
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
import app from "../../stealthgpt.app.mjs";

export default {
key: "stealthgpt-generate-undetectable-content",
name: "Generate Undetectable Content",
description: "Generates full, undetectable blog articles with relevant images in markdown.",
version: "0.0.1",
type: "action",
props: {
app,
prompt: {
description: "The input text or question for which you want the StealthGPT to generate content.",
propDefinition: [
app,
"prompt",
],
},
withImages: {
type: "boolean",
label: "With Images",
description: "A boolean value indicating whether to include images in the generated content. Default is `true`.",
optional: true,
},
size: {
type: "string",
label: "Size",
description: "The desired length of the generated article. Can be `small`, `medium`, or `long`. Default is `small`.",
optional: true,
options: [
"small",
"medium",
"long",
],
},
},
methods: {
generateUndetectableContent(args = {}) {
return this.app.post({
path: "/stealthify/articles",
...args,
});
},
},
async run({ $ }) {
const {
generateUndetectableContent,
prompt,
size,
withImages,
} = this;

const response = await generateUndetectableContent({
$,
data: {
prompt,
size,
withImages,
},
});

$.export("$summary", "Successfully generated undetectable content.");
return response;
},
};
7 changes: 5 additions & 2 deletions components/stealthgpt/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/stealthgpt",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream StealthGPT Components",
"main": "stealthgpt.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "3.0.3"
}
}
}
39 changes: 34 additions & 5 deletions components/stealthgpt/stealthgpt.app.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "stealthgpt",
propDefinitions: {},
propDefinitions: {
prompt: {
type: "string",
label: "Prompt",
description: "The prompt to be used as the basis for content generation, or the content to be rephrased.",
},
},
methods: {
// this.$auth contains connected account data
authKeys() {
console.log(Object.keys(this.$auth));
getUrl(path) {
return `https://stealthgpt.ai/api${path}`;
},
getHeaders(headers) {
return {
...headers,
"Content-Type": "application/json",
"api-token": this.$auth.api_key,
};
},
_makeRequest({
$ = this, path, headers, ...args
} = {}) {
return axios($, {
...args,
url: this.getUrl(path),
headers: this.getHeaders(headers),
});
},
post(args = {}) {
return this._makeRequest({
method: "POST",
...args,
});
},
},
};
};
5 changes: 4 additions & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading