@activepieces/piece-localai 0.0.2 → 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,19 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@activepieces/piece-localai",
|
|
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
|
"openai": "4.17.5",
|
|
12
12
|
"semver": "7.5.4",
|
|
13
|
-
"@activepieces/pieces-common": "0.2.
|
|
14
|
-
"@activepieces/pieces-framework": "0.7.
|
|
15
|
-
"@activepieces/shared": "0.10.
|
|
16
|
-
"tslib": "2.6.
|
|
13
|
+
"@activepieces/pieces-common": "0.2.8",
|
|
14
|
+
"@activepieces/pieces-framework": "0.7.14",
|
|
15
|
+
"@activepieces/shared": "0.10.66",
|
|
16
|
+
"tslib": "2.6.2"
|
|
17
17
|
},
|
|
18
18
|
"main": "./src/index.js",
|
|
19
19
|
"type": "commonjs"
|
package/src/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export declare const localaiAuth: import("@activepieces/pieces-framework").CustomAuthProperty<
|
|
1
|
+
export declare const localaiAuth: import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
base_url: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
access_token: import("@activepieces/pieces-framework").
|
|
3
|
+
access_token: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
4
|
}>;
|
|
5
|
-
export declare const openai: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<
|
|
5
|
+
export declare const openai: import("@activepieces/pieces-framework").Piece<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
6
6
|
base_url: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
7
|
-
access_token: import("@activepieces/pieces-framework").
|
|
7
|
+
access_token: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
8
8
|
}>>;
|
package/src/index.js
CHANGED
|
@@ -3,18 +3,19 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.openai = exports.localaiAuth = void 0;
|
|
4
4
|
const pieces_framework_1 = require("@activepieces/pieces-framework");
|
|
5
5
|
const send_prompt_1 = require("./lib/actions/send-prompt");
|
|
6
|
+
const pieces_common_1 = require("@activepieces/pieces-common");
|
|
6
7
|
exports.localaiAuth = pieces_framework_1.PieceAuth.CustomAuth({
|
|
7
8
|
props: {
|
|
8
9
|
base_url: pieces_framework_1.Property.ShortText({
|
|
9
|
-
displayName:
|
|
10
|
-
description:
|
|
10
|
+
displayName: 'Server URL',
|
|
11
|
+
description: 'LocalAI Instance URL',
|
|
11
12
|
required: true,
|
|
12
13
|
}),
|
|
13
|
-
access_token: pieces_framework_1.
|
|
14
|
-
displayName:
|
|
15
|
-
description:
|
|
14
|
+
access_token: pieces_framework_1.Property.ShortText({
|
|
15
|
+
displayName: 'Access Token',
|
|
16
|
+
description: 'LocalAI Access Token',
|
|
16
17
|
required: false,
|
|
17
|
-
})
|
|
18
|
+
}),
|
|
18
19
|
},
|
|
19
20
|
required: true,
|
|
20
21
|
});
|
|
@@ -24,8 +25,17 @@ exports.openai = (0, pieces_framework_1.createPiece)({
|
|
|
24
25
|
minimumSupportedRelease: '0.5.0',
|
|
25
26
|
logoUrl: 'https://cdn.activepieces.com/pieces/localai.jpeg',
|
|
26
27
|
auth: exports.localaiAuth,
|
|
27
|
-
actions: [
|
|
28
|
+
actions: [
|
|
29
|
+
send_prompt_1.askLocalAI,
|
|
30
|
+
(0, pieces_common_1.createCustomApiCallAction)({
|
|
31
|
+
baseUrl: (auth) => auth.base_url,
|
|
32
|
+
auth: exports.localaiAuth,
|
|
33
|
+
authMapping: (auth) => ({
|
|
34
|
+
Authorization: `Bearer ${auth.access_token || ''}`,
|
|
35
|
+
}),
|
|
36
|
+
}),
|
|
37
|
+
],
|
|
28
38
|
authors: ['hboujrida'],
|
|
29
|
-
triggers: []
|
|
39
|
+
triggers: [],
|
|
30
40
|
});
|
|
31
41
|
//# 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/localai/src/index.ts"],"names":[],"mappings":";;;AAAA,qEAIwC;AACxC,2DAAuD;AACvD,+DAAwE;AAE3D,QAAA,WAAW,GAAG,4BAAS,CAAC,UAAU,CAAC;IAC9C,KAAK,EAAE;QACL,QAAQ,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC3B,WAAW,EAAE,YAAY;YACzB,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,IAAI;SACf,CAAC;QACF,YAAY,EAAE,2BAAQ,CAAC,SAAS,CAAC;YAC/B,WAAW,EAAE,cAAc;YAC3B,WAAW,EAAE,sBAAsB;YACnC,QAAQ,EAAE,KAAK;SAChB,CAAC;KACH;IACD,QAAQ,EAAE,IAAI;CACf,CAAC,CAAC;AACU,QAAA,MAAM,GAAG,IAAA,8BAAW,EAAC;IAChC,WAAW,EAAE,SAAS;IACtB,WAAW,EAAE,8BAA8B;IAC3C,uBAAuB,EAAE,OAAO;IAChC,OAAO,EAAE,kDAAkD;IAC3D,IAAI,EAAE,mBAAW;IACjB,OAAO,EAAE;QACP,wBAAU;QACV,IAAA,yCAAyB,EAAC;YACxB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE,CAAE,IAA6B,CAAC,QAAQ;YAC1D,IAAI,EAAE,mBAAW;YACjB,WAAW,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;gBACtB,aAAa,EAAE,UACZ,IAAiC,CAAC,YAAY,IAAI,EACrD,EAAE;aACH,CAAC;SACH,CAAC;KACH;IACD,OAAO,EAAE,CAAC,WAAW,CAAC;IACtB,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export declare const askLocalAI: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<
|
|
1
|
+
export declare const askLocalAI: import("@activepieces/pieces-framework").IAction<import("@activepieces/pieces-framework").CustomAuthProperty<{
|
|
2
2
|
base_url: import("@activepieces/pieces-framework").ShortTextProperty<true>;
|
|
3
|
-
access_token: import("@activepieces/pieces-framework").
|
|
3
|
+
access_token: import("@activepieces/pieces-framework").ShortTextProperty<false>;
|
|
4
4
|
}>, {
|
|
5
5
|
model: import("@activepieces/pieces-framework").DropdownProperty<string, true>;
|
|
6
6
|
prompt: import("@activepieces/pieces-framework").LongTextProperty<true>;
|
|
@@ -9,5 +9,5 @@ export declare const askLocalAI: import("@activepieces/pieces-framework").IActio
|
|
|
9
9
|
topP: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
10
10
|
frequencyPenalty: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
11
11
|
presencePenalty: import("@activepieces/pieces-framework").NumberProperty<false>;
|
|
12
|
-
roles: import("
|
|
12
|
+
roles: import("../../../../../../../dist/packages/pieces/community/framework/src/lib/property/input/json-property").JsonProperty<false>;
|
|
13
13
|
}>;
|
|
@@ -34,66 +34,66 @@ exports.askLocalAI = (0, pieces_framework_1.createAction)({
|
|
|
34
34
|
return {
|
|
35
35
|
disabled: true,
|
|
36
36
|
placeholder: 'Enter your api key first',
|
|
37
|
-
options: []
|
|
37
|
+
options: [],
|
|
38
38
|
};
|
|
39
39
|
}
|
|
40
40
|
try {
|
|
41
41
|
const response = yield pieces_common_1.httpClient.sendRequest({
|
|
42
|
-
url: auth.base_url + '/
|
|
42
|
+
url: auth.base_url + '/models',
|
|
43
43
|
method: pieces_common_1.HttpMethod.GET,
|
|
44
44
|
authentication: {
|
|
45
45
|
type: pieces_common_1.AuthenticationType.BEARER_TOKEN,
|
|
46
|
-
token: auth.access_token
|
|
47
|
-
}
|
|
46
|
+
token: auth.access_token,
|
|
47
|
+
},
|
|
48
48
|
});
|
|
49
49
|
return {
|
|
50
50
|
disabled: false,
|
|
51
51
|
options: response.body.data.map((model) => {
|
|
52
52
|
return {
|
|
53
53
|
label: model.id,
|
|
54
|
-
value: model.id
|
|
54
|
+
value: model.id,
|
|
55
55
|
};
|
|
56
|
-
})
|
|
56
|
+
}),
|
|
57
57
|
};
|
|
58
58
|
}
|
|
59
59
|
catch (error) {
|
|
60
60
|
return {
|
|
61
61
|
disabled: true,
|
|
62
62
|
options: [],
|
|
63
|
-
placeholder: "Couldn't Load Models"
|
|
63
|
+
placeholder: "Couldn't Load Models",
|
|
64
64
|
};
|
|
65
65
|
}
|
|
66
|
-
})
|
|
66
|
+
}),
|
|
67
67
|
}),
|
|
68
68
|
prompt: pieces_framework_1.Property.LongText({
|
|
69
69
|
displayName: 'Question',
|
|
70
|
-
required: true
|
|
70
|
+
required: true,
|
|
71
71
|
}),
|
|
72
72
|
temperature: pieces_framework_1.Property.Number({
|
|
73
73
|
displayName: 'Temperature',
|
|
74
74
|
required: false,
|
|
75
75
|
description: 'Controls randomness: Lowering results in less random completions. As the temperature approaches zero, the model will become deterministic and repetitive.',
|
|
76
|
-
validators: [pieces_framework_1.Validators.minValue(0), pieces_framework_1.Validators.maxValue(1.0)]
|
|
76
|
+
validators: [pieces_framework_1.Validators.minValue(0), pieces_framework_1.Validators.maxValue(1.0)],
|
|
77
77
|
}),
|
|
78
78
|
maxTokens: pieces_framework_1.Property.Number({
|
|
79
79
|
displayName: 'Maximum Tokens',
|
|
80
80
|
required: false,
|
|
81
|
-
description: "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)"
|
|
81
|
+
description: "The maximum number of tokens to generate. Requests can use up to 2,048 or 4,096 tokens shared between prompt and completion, don't set the value to maximum and leave some tokens for the input. The exact limit varies by model. (One token is roughly 4 characters for normal English text)",
|
|
82
82
|
}),
|
|
83
83
|
topP: pieces_framework_1.Property.Number({
|
|
84
84
|
displayName: 'Top P',
|
|
85
85
|
required: false,
|
|
86
|
-
description: '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 10% probability mass are considered.'
|
|
86
|
+
description: '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 10% probability mass are considered.',
|
|
87
87
|
}),
|
|
88
88
|
frequencyPenalty: pieces_framework_1.Property.Number({
|
|
89
89
|
displayName: 'Frequency penalty',
|
|
90
90
|
required: false,
|
|
91
|
-
description: "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."
|
|
91
|
+
description: "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.",
|
|
92
92
|
}),
|
|
93
93
|
presencePenalty: pieces_framework_1.Property.Number({
|
|
94
94
|
displayName: 'Presence penalty',
|
|
95
95
|
required: false,
|
|
96
|
-
description: "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."
|
|
96
|
+
description: "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.",
|
|
97
97
|
}),
|
|
98
98
|
roles: pieces_framework_1.Property.Json({
|
|
99
99
|
displayName: 'Roles',
|
|
@@ -101,15 +101,15 @@ exports.askLocalAI = (0, pieces_framework_1.createAction)({
|
|
|
101
101
|
description: 'Array of roles to specify more accurate response',
|
|
102
102
|
defaultValue: [
|
|
103
103
|
{ role: 'system', content: 'You are a helpful assistant.' },
|
|
104
|
-
]
|
|
105
|
-
})
|
|
104
|
+
],
|
|
105
|
+
}),
|
|
106
106
|
},
|
|
107
107
|
run({ auth, propsValue }) {
|
|
108
108
|
var _a, _b, _c, _d, _e, _f;
|
|
109
109
|
return tslib_1.__awaiter(this, void 0, void 0, function* () {
|
|
110
110
|
const openai = new openai_1.default({
|
|
111
111
|
baseURL: auth.base_url,
|
|
112
|
-
apiKey: auth.access_token
|
|
112
|
+
apiKey: auth.access_token,
|
|
113
113
|
});
|
|
114
114
|
let billingIssue = false;
|
|
115
115
|
let unaurthorized = false;
|
|
@@ -147,7 +147,7 @@ exports.askLocalAI = (0, pieces_framework_1.createAction)({
|
|
|
147
147
|
}
|
|
148
148
|
return {
|
|
149
149
|
role: item.role,
|
|
150
|
-
content: item.content
|
|
150
|
+
content: item.content,
|
|
151
151
|
};
|
|
152
152
|
});
|
|
153
153
|
const maxRetries = 4;
|
|
@@ -161,14 +161,14 @@ exports.askLocalAI = (0, pieces_framework_1.createAction)({
|
|
|
161
161
|
...roles,
|
|
162
162
|
{
|
|
163
163
|
role: 'user',
|
|
164
|
-
content: propsValue['prompt']
|
|
165
|
-
}
|
|
164
|
+
content: propsValue['prompt'],
|
|
165
|
+
},
|
|
166
166
|
],
|
|
167
167
|
temperature: temperature,
|
|
168
168
|
max_tokens: maxTokens,
|
|
169
169
|
top_p: topP,
|
|
170
170
|
frequency_penalty: frequencyPenalty,
|
|
171
|
-
presence_penalty: presencePenalty
|
|
171
|
+
presence_penalty: presencePenalty,
|
|
172
172
|
}))) === null || _a === void 0 ? void 0 : _a.choices[0]) === null || _b === void 0 ? void 0 : _b.message) === null || _c === void 0 ? void 0 : _c.content) === null || _d === void 0 ? void 0 : _d.trim();
|
|
173
173
|
break; // Break out of the loop if the request is successful
|
|
174
174
|
}
|
|
@@ -201,7 +201,7 @@ exports.askLocalAI = (0, pieces_framework_1.createAction)({
|
|
|
201
201
|
}
|
|
202
202
|
return response;
|
|
203
203
|
});
|
|
204
|
-
}
|
|
204
|
+
},
|
|
205
205
|
});
|
|
206
206
|
function sleep(ms) {
|
|
207
207
|
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"send-prompt.js","sourceRoot":"","sources":["
|
|
1
|
+
{"version":3,"file":"send-prompt.js","sourceRoot":"","sources":["../../../../../../../../packages/pieces/community/localai/src/lib/actions/send-prompt.ts"],"names":[],"mappings":";;;;AAAA,qEAIwC;AACxC,4DAA4B;AAC5B,+DAIqC;AACrC,6BAAoC;AAGpC,MAAM,mBAAmB,GAAG;;;;;;yCAMa,CAAC;AAE1C,MAAM,oBAAoB,GAAG;;;CAG5B,CAAC;AAEW,QAAA,UAAU,GAAG,IAAA,+BAAY,EAAC;IACrC,IAAI,EAAE,eAAW;IACjB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,aAAa;IAC1B,WAAW,EAAE,gCAAgC;IAC7C,KAAK,EAAE;QACL,KAAK,EAAE,2BAAQ,CAAC,QAAQ,CAAC;YACvB,WAAW,EAAE,OAAO;YACpB,QAAQ,EAAE,IAAI;YACd,WAAW,EACT,+HAA+H;YACjI,UAAU,EAAE,EAAE;YACd,YAAY,EAAE,eAAe;YAC7B,OAAO,EAAE,CAAO,EAAE,IAAI,EAAE,EAAE,EAAE;gBAC1B,IAAI,CAAC,IAAI,EAAE;oBACT,OAAO;wBACL,QAAQ,EAAE,IAAI;wBACd,WAAW,EAAE,0BAA0B;wBACvC,OAAO,EAAE,EAAE;qBACZ,CAAC;iBACH;gBACD,IAAI;oBACF,MAAM,QAAQ,GAAG,MAAM,0BAAU,CAAC,WAAW,CAE1C;wBACD,GAAG,EAAQ,IAAK,CAAC,QAAQ,GAAG,SAAS;wBACrC,MAAM,EAAE,0BAAU,CAAC,GAAG;wBACtB,cAAc,EAAE;4BACd,IAAI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