Skip to content
Merged
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,27 @@
import altTextGeneratorAi from "../../alt_text_generator_ai.app.mjs";

export default {
key: "alt_text_generator_ai-generate-alt-text",
name: "Generate Alt Text",
description: "Generate alt text for an image. [See the documentation](https://alttextgeneratorai.com/api-docs)",
version: "0.0.1",
type: "action",
props: {
altTextGeneratorAi,
image: {
type: "string",
label: "Image URL",
description: "The URL of the image to generate alt text for",
},
},
async run({ $ }) {
const response = await this.altTextGeneratorAi.generateAltText({
$,
data: {
image: this.image,
},
});
$.export("$summary", `Successfully generated alt text for ${this.image}`);
return response;
},
};
17 changes: 14 additions & 3 deletions components/alt_text_generator_ai/alt_text_generator_ai.app.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,22 @@
import { axios } from "@pipedream/platform";

export default {
type: "app",
app: "alt_text_generator_ai",
propDefinitions: {},
methods: {
// this.$auth contains connected account data
authKeys() {
console.log(Object.keys(this.$auth));
generateAltText({
$ = this, data, ...opts
}) {
return axios($, {
url: "https://alttextgeneratorai.com/api/wp",
method: "POST",
data: {
...data,
wpkey: `${this.$auth.api_key}`,
},
...opts,
});
},
},
};
7 changes: 5 additions & 2 deletions components/alt_text_generator_ai/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@pipedream/alt_text_generator_ai",
"version": "0.0.1",
"version": "0.1.0",
"description": "Pipedream Alt Text Generator AI Components",
"main": "alt_text_generator_ai.app.mjs",
"keywords": [
Expand All @@ -11,5 +11,8 @@
"author": "Pipedream <[email protected]> (https://pipedream.com/)",
"publishConfig": {
"access": "public"
},
"dependencies": {
"@pipedream/platform": "^3.1.0"
}
}
}
17 changes: 10 additions & 7 deletions pnpm-lock.yaml

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

Loading