You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: "Allows you to create a new media file and associate it to an attribute value of a given product or product model. [See the docs](https://api.akeneo.com/api-reference.html#post_media_files)",
13
13
props: {
@@ -32,18 +32,15 @@ export default {
32
32
},
33
33
filename: {
34
34
type: "string",
35
-
label: "File",
36
-
description: "The file to be uploaded, please provide a file from `/tmp`. To upload a file to `/tmp` folder, please follow the doc [here](https://pipedream.com/docs/code/nodejs/working-with-files/#writing-a-file-to-tmp)",
35
+
label: "File Path or URL",
36
+
description: "The file to be uploaded. Provide either the path to a file in the `/tmp` directory (e.g. `/tmp/myFile.ext`) or a file URL. [See the documentation on working with files](https://pipedream.com/docs/workflows/building-workflows/code/nodejs/working-with-files/)",
37
37
},
38
38
},
39
39
asyncrun({ $ }){
40
40
if(!this.productId&&!this.productModelCode){
41
41
thrownewConfigurationError("Either `Product Identifier` or `Product Model Code` should be set!");
42
42
}
43
-
constpath=utils.checkTmp(this.filename);
44
-
if(!fs.existsSync(path)){
45
-
thrownewConfigurationError("File does not exist!");
Copy file name to clipboardExpand all lines: components/llmwhisperer/actions/extract-text/extract-text.mjs
+14-37Lines changed: 14 additions & 37 deletions
Original file line number
Diff line number
Diff line change
@@ -1,11 +1,11 @@
1
-
importfsfrom"fs";
1
+
import{getFileStream}from"@pipedream/platform";
2
2
importappfrom"../../llmwhisperer.app.mjs";
3
3
4
4
exportdefault{
5
5
key: "llmwhisperer-extract-text",
6
6
name: "Extract Text",
7
7
description: "Convert your PDF/scanned documents to text format which can be used by LLMs. [See the documentation](https://docs.unstract.com/llm_whisperer/apis/llm_whisperer_text_extraction_api)",
8
-
version: "0.0.1",
8
+
version: "0.1.0",
9
9
type: "action",
10
10
props: {
11
11
app,
@@ -91,40 +91,18 @@ export default {
91
91
description: "Factor by which a horizontal stretch has to applied. It defaults to `1.0`. A stretch factor of `1.1` would mean at 10% stretch factor applied. Normally this factor need not be adjusted. You might want to use this parameter when multi column layouts back into each other. For example in a two column layout, the two columns get merged into one.",
92
92
optional: true,
93
93
},
94
-
urlInPost: {
95
-
type: "boolean",
96
-
label: "URL In Post",
97
-
description: "If set to `true`, the headers will be set to `text/plain`. If set to `false`, the headers will be set to `application/octet-stream`.",
98
-
reloadProps: true,
99
-
default: true,
94
+
data: {
95
+
type: "string",
96
+
label: "File Path or URL",
97
+
description: "The document to process. Provide either the path to a file in the `/tmp` directory (e.g. `/tmp/myFile.ext`) or a file URL. [See the documentation on working with files](https://pipedream.com/docs/workflows/building-workflows/code/nodejs/working-with-files/)",
100
98
},
101
99
},
102
-
additionalProps(){
103
-
const{ urlInPost }=this;
104
-
return{
105
-
data: {
106
-
type: "string",
107
-
label: urlInPost
108
-
? "Document URL"
109
-
: "Document Path",
110
-
description: urlInPost
111
-
? "The URL of the document to process."
112
-
: "Document path of the file previously downloaded in Pipedream E.g. (`/tmp/my-file.txt`). [Download a file to the `/tmp` directory](https://pipedream.com/docs/code/nodejs/http-requests/#download-a-file-to-the-tmp-directory)",
0 commit comments