@activepieces/piece-llmrails 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-llmrails",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.4",
|
|
4
4
|
"dependencies": {
|
|
5
5
|
"@sinclair/typebox": "0.26.8",
|
|
6
|
-
"axios": "^1.6.
|
|
6
|
+
"axios": "^1.6.3",
|
|
7
7
|
"dayjs": "1.11.9",
|
|
8
8
|
"is-base64": "1.1.0",
|
|
9
9
|
"lodash": "4.17.21",
|
|
10
10
|
"nanoid": "3.3.6",
|
|
11
11
|
"semver": "7.5.4",
|
|
12
|
-
"@activepieces/pieces-common": "0.2.
|
|
13
|
-
"@activepieces/pieces-framework": "0.7.
|
|
14
|
-
"@activepieces/shared": "0.10.
|
|
15
|
-
"tslib": "
|
|
12
|
+
"@activepieces/pieces-common": "0.2.8",
|
|
13
|
+
"@activepieces/pieces-framework": "0.7.14",
|
|
14
|
+
"@activepieces/shared": "0.10.66",
|
|
15
|
+
"tslib": "2.6.2"
|
|
16
16
|
},
|
|
17
17
|
"main": "./src/index.js",
|
|
18
18
|
"type": "commonjs"
|
package/src/index.js
CHANGED
|
@@ -4,6 +4,7 @@ exports.llmrails = exports.llmrailsAuth = void 0;
|
|
|
4
4
|
const tslib_1 = require("tslib");
|
|
5
5
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
6
6
|
const datastore_search_1 = require("./lib/actions/datastore-search");
|
|
7
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
7
8
|
const markdownDescription = `
|
|
8
9
|
Follow these instructions to get your LLMRails API Key:
|
|
9
10
|
|
|
@@ -23,17 +24,26 @@ exports.llmrailsAuth = pieces_framework_1.PieceAuth.SecretText({
|
|
|
23
24
|
}
|
|
24
25
|
return {
|
|
25
26
|
valid: false,
|
|
26
|
-
error: 'Invalid Api Key'
|
|
27
|
+
error: 'Invalid Api Key',
|
|
27
28
|
};
|
|
28
|
-
})
|
|
29
|
+
}),
|
|
29
30
|
});
|
|
30
31
|
exports.llmrails = (0, pieces_framework_1.createPiece)({
|
|
31
|
-
displayName:
|
|
32
|
+
displayName: 'LLMRails',
|
|
32
33
|
minimumSupportedRelease: '0.5.0',
|
|
33
|
-
logoUrl:
|
|
34
|
-
authors: [
|
|
34
|
+
logoUrl: 'https://cdn.activepieces.com/pieces/llmrails.png',
|
|
35
|
+
authors: ['w95'],
|
|
35
36
|
auth: exports.llmrailsAuth,
|
|
36
|
-
actions: [
|
|
37
|
-
|
|
37
|
+
actions: [
|
|
38
|
+
datastore_search_1.datastoreSearch,
|
|
39
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
40
|
+
baseUrl: () => 'https://api.llmrails.com/v1',
|
|
41
|
+
auth: exports.llmrailsAuth,
|
|
42
|
+
authMapping: (auth) => ({
|
|
43
|
+
'X-API-KEY': auth,
|
|
44
|
+
}),
|
|
45
|
+
}),
|
|
46
|
+
],
|
|
47
|
+
triggers: [],
|
|
38
48
|
});
|
|
39
49
|
//# sourceMappingURL=index.js.map
|
package/src/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../../packages/pieces/community/llmrails/src/index.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,qEAAiE;AACjE,+DAAwE;AAExE,MAAM,mBAAmB,GAAG;;;;;;CAM3B,CAAC;AAEW,QAAA,YAAY,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC/C,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,mBAAmB;IAChC,QAAQ,EAAE,IAAI;IACd,QAAQ,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,EAAE;QAC3B,IAAI,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE;YAC3B,OAAO;gBACL,KAAK,EAAE,IAAI;aACZ,CAAC;SACH;QACD,OAAO;YACL,KAAK,EAAE,KAAK;YACZ,KAAK,EAAE,iBAAiB;SACzB,CAAC;IACJ,CAAC,CAAA;CACF,CAAC,CAAC;AAEU,QAAA,QAAQ,GAAG,IAAA,8BAAW,EAAC;IAClC,WAAW,EAAE,UAAU;IACvB,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,kDAAkD;IAC3D,OAAO,EAAE,CAAC,KAAK,CAAC;IAChB,IAAI,EAAE,oBAAY;IAClB,OAAO,EAAE;QACP,kCAAe;QACf,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,GAAG,EAAE,CAAC,6BAA6B;YAC5C,IAAI,EAAE,oBAAY;YAClB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACtB,WAAW,EAAE,IAAc;aAC5B,CAAC;SACH,CAAC;KACH;IACD,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -13,25 +13,25 @@ exports.datastoreSearch = (0, pieces_framework_1.createAction)({
|
|
|
13
13
|
props: {
|
|
14
14
|
datastoreId: pieces_framework_1.Property.ShortText({
|
|
15
15
|
displayName: 'Datastore ID',
|
|
16
|
-
required: true
|
|
16
|
+
required: true,
|
|
17
17
|
}),
|
|
18
18
|
text: pieces_framework_1.Property.ShortText({
|
|
19
19
|
displayName: 'Text',
|
|
20
20
|
required: true,
|
|
21
|
-
description: 'Search query'
|
|
21
|
+
description: 'Search query',
|
|
22
22
|
}),
|
|
23
23
|
hybrid: pieces_framework_1.Property.Checkbox({
|
|
24
24
|
displayName: 'Hybrid search',
|
|
25
25
|
description: 'Hybrid search is combining dense and sparse embeddings.',
|
|
26
26
|
required: true,
|
|
27
|
-
defaultValue: true
|
|
27
|
+
defaultValue: true,
|
|
28
28
|
}),
|
|
29
29
|
summarize: pieces_framework_1.Property.Checkbox({
|
|
30
30
|
displayName: 'Summarize',
|
|
31
31
|
description: 'Summarizes the datastore search results',
|
|
32
32
|
required: true,
|
|
33
|
-
defaultValue: true
|
|
34
|
-
})
|
|
33
|
+
defaultValue: true,
|
|
34
|
+
}),
|
|
35
35
|
},
|
|
36
36
|
run(context) {
|
|
37
37
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
@@ -42,16 +42,16 @@ exports.datastoreSearch = (0, pieces_framework_1.createAction)({
|
|
|
42
42
|
body: {
|
|
43
43
|
text: context.propsValue.text,
|
|
44
44
|
summarize: context.propsValue.summarize,
|
|
45
|
-
hybrid: context.propsValue.hybrid
|
|
45
|
+
hybrid: context.propsValue.hybrid,
|
|
46
46
|
},
|
|
47
47
|
headers: {
|
|
48
48
|
'X-API-KEY': context.auth,
|
|
49
|
-
Accept: 'application/json'
|
|
50
|
-
}
|
|
49
|
+
Accept: 'application/json',
|
|
50
|
+
},
|
|
51
51
|
};
|
|
52
52
|
const response = yield pieces_common_1.httpClient.sendRequest(request);
|
|
53
53
|
return response.body;
|
|
54
54
|
});
|
|
55
|
-
}
|
|
55
|
+
},
|
|
56
56
|
});
|
|
57
57
|
//# sourceMappingURL=datastore-search.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"datastore-search.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"datastore-search.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/llmrails/src/lib/actions/datastore-search.ts"],"names":[],"mappings":";;;;AAAA,qEAAwE;AACxE,+DAIqC;AACrC,6BAAqC;AAExB,QAAA,eAAe,GAAG,IAAA,+BAAY,EAAC;IAC1C,IAAI,EAAE,gBAAY;IAClB,IAAI,EAAE,QAAQ;IACd,WAAW,EAAE,kBAAkB;IAC/B,WAAW,EAAE,qBAAqB;IAClC,KAAK,EAAE;QACL,WAAW,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC9B,WAAW,EAAE,cAAc;YAC3B,QAAQ,E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