n8n-nodes-niyoos 0.1.0
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/LICENSE +21 -0
- package/README.md +97 -0
- package/dist/credentials/NiyoosApi.credentials.d.ts +13 -0
- package/dist/credentials/NiyoosApi.credentials.js +49 -0
- package/dist/credentials/NiyoosApi.credentials.js.map +1 -0
- package/dist/credentials/niyoos.dark.svg +5 -0
- package/dist/credentials/niyoos.svg +5 -0
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.d.ts +10 -0
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js +157 -0
- package/dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js.map +1 -0
- package/dist/nodes/NiyoosChatModel/niyoos.dark.svg +5 -0
- package/dist/nodes/NiyoosChatModel/niyoos.svg +5 -0
- package/package.json +63 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Niyoos
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# n8n-nodes-niyoos
|
|
2
|
+
|
|
3
|
+
An [n8n](https://n8n.io) community node that lets you use **Niyoos-governed LLMs**
|
|
4
|
+
as a chat model inside n8n's AI features — the AI Agent, Basic LLM Chain,
|
|
5
|
+
Question and Answer Chain, and any other node that accepts a Chat Model.
|
|
6
|
+
|
|
7
|
+
[Niyoos](https://niyoos.com) is an OpenAI-compatible governance proxy that sits
|
|
8
|
+
in front of your LLM providers (Anthropic and others). Your traffic is
|
|
9
|
+
authenticated with a per-agent key and is **metered, cost-tracked, rate-limited
|
|
10
|
+
and audited centrally** — while the wire format stays standard OpenAI
|
|
11
|
+
`chat/completions`. This node drives that proxy with the proven `ChatOpenAI`
|
|
12
|
+
client pointed at your Niyoos base URL, so every call your workflow makes is
|
|
13
|
+
governed by Niyoos automatically.
|
|
14
|
+
|
|
15
|
+
[Installation](#installation) · [Getting a Niyoos agent key](#getting-a-niyoos-agent-key) · [Usage](#usage) · [Model dropdown](#model-dropdown-one-agent--one-provider) · [Known issues](#known-issues) · [License](#license)
|
|
16
|
+
|
|
17
|
+
## What this package provides
|
|
18
|
+
|
|
19
|
+
- **Credential — Niyoos API**
|
|
20
|
+
- `Agent Key` — your `sk-aiwos-…` key (stored masked).
|
|
21
|
+
- `Base URL` — defaults to `https://api.niyoos.com/proxy/v1`.
|
|
22
|
+
- The connection test calls `GET /integrations/v1/me` and passes when the key
|
|
23
|
+
resolves to an active agent.
|
|
24
|
+
- **Node — Niyoos Chat Model** (a LangChain sub-node with an `AI Language Model`
|
|
25
|
+
output; connect it to a root node such as the AI Agent)
|
|
26
|
+
- `Model` — a dropdown populated live from `GET /proxy/v1/models`.
|
|
27
|
+
- Options: `Sampling Temperature`, `Maximum Number of Tokens`, `Top P`,
|
|
28
|
+
`Timeout`, `Maximum Retries`.
|
|
29
|
+
|
|
30
|
+
## Installation
|
|
31
|
+
|
|
32
|
+
Follow the n8n [community nodes installation guide](https://docs.n8n.io/integrations/community-nodes/installation/).
|
|
33
|
+
|
|
34
|
+
**In the n8n UI (self-hosted):**
|
|
35
|
+
1. Go to **Settings → Community Nodes → Install**.
|
|
36
|
+
2. Enter `n8n-nodes-niyoos` and confirm.
|
|
37
|
+
3. Add the **Niyoos Chat Model** node to a workflow.
|
|
38
|
+
|
|
39
|
+
**Manually (npm):**
|
|
40
|
+
```bash
|
|
41
|
+
npm install n8n-nodes-niyoos
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
**Compatibility:** requires Node.js `>=20.15` and a recent n8n with the
|
|
45
|
+
LangChain/AI nodes. Tested against `n8n-workflow` 2.16.
|
|
46
|
+
|
|
47
|
+
## Getting a Niyoos agent key
|
|
48
|
+
|
|
49
|
+
1. Sign in to your Niyoos dashboard at [niyoos.com](https://niyoos.com).
|
|
50
|
+
2. Open **Agents** and create an agent (or pick an existing one). Each agent is
|
|
51
|
+
bound to exactly one provider credential (e.g. an Anthropic key).
|
|
52
|
+
3. Reveal or create the agent's **API key** — it looks like `sk-aiwos-…`.
|
|
53
|
+
4. In n8n, create a **Niyoos API** credential and paste the key. Leave the base
|
|
54
|
+
URL at its default unless you run a self-hosted or staging Niyoos deployment.
|
|
55
|
+
|
|
56
|
+
Keep the key secret; it authorizes billed LLM traffic. You can revoke and
|
|
57
|
+
rotate it from the dashboard at any time.
|
|
58
|
+
|
|
59
|
+
## Usage
|
|
60
|
+
|
|
61
|
+
1. Add an **AI Agent** (or any node with a Chat Model input) to your workflow.
|
|
62
|
+
2. From its **Chat Model** input, add a **Niyoos Chat Model** sub-node.
|
|
63
|
+
3. Select your **Niyoos API** credential.
|
|
64
|
+
4. Pick a model from the dropdown, set any options, and run.
|
|
65
|
+
|
|
66
|
+
## Model dropdown: one agent = one provider
|
|
67
|
+
|
|
68
|
+
The **Model** dropdown is populated from `GET /proxy/v1/models`, which returns
|
|
69
|
+
the catalog **for the specific agent your key belongs to**. In Niyoos, **one
|
|
70
|
+
agent is bound to exactly one provider credential** — so the dropdown is
|
|
71
|
+
inherently scoped to that agent's provider. If your key belongs to an
|
|
72
|
+
Anthropic-backed agent, you will see Claude models only; you will not see
|
|
73
|
+
another provider's models here. To use a different provider, create a separate
|
|
74
|
+
agent (and a separate Niyoos API credential) for it.
|
|
75
|
+
|
|
76
|
+
## Known issues
|
|
77
|
+
|
|
78
|
+
- **Adding the *Sampling Temperature* option breaks `claude-opus-4-8` and
|
|
79
|
+
`claude-sonnet-5`.** Anthropic has deprecated the `temperature` parameter on
|
|
80
|
+
these models, so any request that sends it is rejected upstream with an HTTP
|
|
81
|
+
400 (`temperature is deprecated for this model`). By default this node sends
|
|
82
|
+
**no** sampling parameters — the fields only take effect once you explicitly
|
|
83
|
+
add them under **Options** — so leave *Sampling Temperature* unset for those
|
|
84
|
+
models. Other models (for example `claude-haiku-4-5`) still accept it.
|
|
85
|
+
- **Dynamic connection labels are not supported.** n8n names credentials by
|
|
86
|
+
what you type; unlike some other integration platforms, it cannot label the
|
|
87
|
+
connection from the identity response. The connection test still validates the
|
|
88
|
+
key against `/integrations/v1/me`.
|
|
89
|
+
|
|
90
|
+
## Resources
|
|
91
|
+
|
|
92
|
+
- [n8n community nodes documentation](https://docs.n8n.io/integrations/community-nodes/)
|
|
93
|
+
- [Niyoos](https://niyoos.com)
|
|
94
|
+
|
|
95
|
+
## License
|
|
96
|
+
|
|
97
|
+
[MIT](./LICENSE)
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { IAuthenticateGeneric, ICredentialTestRequest, ICredentialType, INodeProperties } from 'n8n-workflow';
|
|
2
|
+
export declare class NiyoosApi implements ICredentialType {
|
|
3
|
+
name: string;
|
|
4
|
+
displayName: string;
|
|
5
|
+
documentationUrl: string;
|
|
6
|
+
icon: {
|
|
7
|
+
readonly light: "file:niyoos.svg";
|
|
8
|
+
readonly dark: "file:niyoos.dark.svg";
|
|
9
|
+
};
|
|
10
|
+
properties: INodeProperties[];
|
|
11
|
+
authenticate: IAuthenticateGeneric;
|
|
12
|
+
test: ICredentialTestRequest;
|
|
13
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NiyoosApi = void 0;
|
|
4
|
+
class NiyoosApi {
|
|
5
|
+
constructor() {
|
|
6
|
+
this.name = 'niyoosApi';
|
|
7
|
+
this.displayName = 'Niyoos API';
|
|
8
|
+
this.documentationUrl = 'https://niyoos.com/docs/integrations/n8n';
|
|
9
|
+
this.icon = {
|
|
10
|
+
light: 'file:niyoos.svg',
|
|
11
|
+
dark: 'file:niyoos.dark.svg',
|
|
12
|
+
};
|
|
13
|
+
this.properties = [
|
|
14
|
+
{
|
|
15
|
+
displayName: 'Agent Key',
|
|
16
|
+
name: 'agentApiKey',
|
|
17
|
+
type: 'string',
|
|
18
|
+
typeOptions: { password: true },
|
|
19
|
+
default: '',
|
|
20
|
+
required: true,
|
|
21
|
+
description: 'Your Niyoos agent key (starts with "sk-aiwos-"). Create one in the Niyoos dashboard under Agents.',
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
displayName: 'Base URL',
|
|
25
|
+
name: 'baseUrl',
|
|
26
|
+
type: 'string',
|
|
27
|
+
default: 'https://api.niyoos.com/proxy/v1',
|
|
28
|
+
description: 'Base URL of the Niyoos OpenAI-compatible proxy. Change this only to target a self-hosted or staging Niyoos deployment.',
|
|
29
|
+
},
|
|
30
|
+
];
|
|
31
|
+
this.authenticate = {
|
|
32
|
+
type: 'generic',
|
|
33
|
+
properties: {
|
|
34
|
+
headers: {
|
|
35
|
+
Authorization: '=Bearer {{$credentials.agentApiKey}}',
|
|
36
|
+
},
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
this.test = {
|
|
40
|
+
request: {
|
|
41
|
+
method: 'GET',
|
|
42
|
+
baseURL: '={{$credentials.baseUrl.split("/proxy")[0]}}',
|
|
43
|
+
url: '/integrations/v1/me',
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.NiyoosApi = NiyoosApi;
|
|
49
|
+
//# sourceMappingURL=NiyoosApi.credentials.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NiyoosApi.credentials.js","sourceRoot":"","sources":["../../credentials/NiyoosApi.credentials.ts"],"names":[],"mappings":";;;AAOA,MAAa,SAAS;IAAtB;QACC,SAAI,GAAG,WAAW,CAAC;QAEnB,gBAAW,GAAG,YAAY,CAAC;QAE3B,qBAAgB,GAAG,0CAA0C,CAAC;QAG9D,SAAI,GAAG;YACN,KAAK,EAAE,iBAAiB;YACxB,IAAI,EAAE,sBAAsB;SACnB,CAAC;QAEX,eAAU,GAAsB;YAC/B;gBACC,WAAW,EAAE,WAAW;gBACxB,IAAI,EAAE,aAAa;gBACnB,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,EAAE,QAAQ,EAAE,IAAI,EAAE;gBAC/B,OAAO,EAAE,EAAE;gBACX,QAAQ,EAAE,IAAI;gBACd,WAAW,EACV,mGAAmG;aACpG;YACD;gBACC,WAAW,EAAE,UAAU;gBACvB,IAAI,EAAE,SAAS;gBACf,IAAI,EAAE,QAAQ;gBACd,OAAO,EAAE,iCAAiC;gBAC1C,WAAW,EACV,wHAAwH;aACzH;SACD,CAAC;QAIF,iBAAY,GAAyB;YACpC,IAAI,EAAE,SAAS;YACf,UAAU,EAAE;gBACX,OAAO,EAAE;oBACR,aAAa,EAAE,sCAAsC;iBACrD;aACD;SACD,CAAC;QAMF,SAAI,GAA2B;YAC9B,OAAO,EAAE;gBACR,MAAM,EAAE,KAAK;gBACb,OAAO,EAAE,8CAA8C;gBACvD,GAAG,EAAE,qBAAqB;aAC1B;SACD,CAAC;IACH,CAAC;CAAA;AAxDD,8BAwDC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
+
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
+
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#FFFFFF" fill-rule="evenodd" stroke="none"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
+
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
+
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#131A2A" fill-rule="evenodd" stroke="none"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ILoadOptionsFunctions, type INodePropertyOptions, type INodeType, type INodeTypeDescription, type ISupplyDataFunctions, type SupplyData } from 'n8n-workflow';
|
|
2
|
+
export declare class NiyoosChatModel implements INodeType {
|
|
3
|
+
description: INodeTypeDescription;
|
|
4
|
+
methods: {
|
|
5
|
+
loadOptions: {
|
|
6
|
+
getModels(this: ILoadOptionsFunctions): Promise<INodePropertyOptions[]>;
|
|
7
|
+
};
|
|
8
|
+
};
|
|
9
|
+
supplyData(this: ISupplyDataFunctions, itemIndex: number): Promise<SupplyData>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.NiyoosChatModel = void 0;
|
|
4
|
+
const openai_1 = require("@langchain/openai");
|
|
5
|
+
const n8n_workflow_1 = require("n8n-workflow");
|
|
6
|
+
class NiyoosChatModel {
|
|
7
|
+
constructor() {
|
|
8
|
+
this.description = {
|
|
9
|
+
displayName: 'Niyoos Chat Model',
|
|
10
|
+
name: 'niyoosChatModel',
|
|
11
|
+
icon: {
|
|
12
|
+
light: 'file:niyoos.svg',
|
|
13
|
+
dark: 'file:niyoos.dark.svg',
|
|
14
|
+
},
|
|
15
|
+
group: ['transform'],
|
|
16
|
+
version: 1,
|
|
17
|
+
description: 'Language model served through the Niyoos governance proxy',
|
|
18
|
+
subtitle: '={{ $parameter["model"] }}',
|
|
19
|
+
defaults: {
|
|
20
|
+
name: 'Niyoos Chat Model',
|
|
21
|
+
},
|
|
22
|
+
codex: {
|
|
23
|
+
categories: ['AI'],
|
|
24
|
+
subcategories: {
|
|
25
|
+
AI: ['Language Models', 'Root Nodes'],
|
|
26
|
+
},
|
|
27
|
+
resources: {
|
|
28
|
+
primaryDocumentation: [
|
|
29
|
+
{
|
|
30
|
+
url: 'https://niyoos.com/docs/integrations/n8n',
|
|
31
|
+
},
|
|
32
|
+
],
|
|
33
|
+
},
|
|
34
|
+
},
|
|
35
|
+
inputs: [],
|
|
36
|
+
outputs: [n8n_workflow_1.NodeConnectionTypes.AiLanguageModel],
|
|
37
|
+
outputNames: ['Model'],
|
|
38
|
+
credentials: [
|
|
39
|
+
{
|
|
40
|
+
name: 'niyoosApi',
|
|
41
|
+
required: true,
|
|
42
|
+
},
|
|
43
|
+
],
|
|
44
|
+
properties: [
|
|
45
|
+
{
|
|
46
|
+
displayName: 'The model is served through your Niyoos proxy — usage, cost and audit are governed centrally by Niyoos.',
|
|
47
|
+
name: 'notice',
|
|
48
|
+
type: 'notice',
|
|
49
|
+
default: '',
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
displayName: 'Model Name or ID',
|
|
53
|
+
name: 'model',
|
|
54
|
+
type: 'options',
|
|
55
|
+
description: 'The model to use, loaded live from your Niyoos deployment (GET /proxy/v1/models). Choose from the list, or specify an ID using an <a href="https://docs.n8n.io/code/expressions/">expression</a>.',
|
|
56
|
+
typeOptions: {
|
|
57
|
+
loadOptionsMethod: 'getModels',
|
|
58
|
+
},
|
|
59
|
+
default: '',
|
|
60
|
+
required: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
displayName: 'Options',
|
|
64
|
+
name: 'options',
|
|
65
|
+
type: 'collection',
|
|
66
|
+
placeholder: 'Add Option',
|
|
67
|
+
default: {},
|
|
68
|
+
options: [
|
|
69
|
+
{
|
|
70
|
+
displayName: 'Maximum Number of Tokens',
|
|
71
|
+
name: 'maxTokens',
|
|
72
|
+
type: 'number',
|
|
73
|
+
default: -1,
|
|
74
|
+
description: 'The maximum number of tokens to generate in the completion. -1 lets the model / proxy default decide.',
|
|
75
|
+
typeOptions: { minValue: -1 },
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
displayName: 'Maximum Retries',
|
|
79
|
+
name: 'maxRetries',
|
|
80
|
+
type: 'number',
|
|
81
|
+
default: 2,
|
|
82
|
+
description: 'Maximum number of times to retry a failing request',
|
|
83
|
+
typeOptions: { minValue: 0 },
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
displayName: 'Sampling Temperature',
|
|
87
|
+
name: 'temperature',
|
|
88
|
+
type: 'number',
|
|
89
|
+
default: 0.7,
|
|
90
|
+
description: 'Controls randomness: lowering results in less random completions. As the temperature approaches zero, the model becomes deterministic and repetitive.',
|
|
91
|
+
typeOptions: { minValue: 0, maxValue: 2, numberPrecision: 2 },
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
displayName: 'Timeout (Ms)',
|
|
95
|
+
name: 'timeout',
|
|
96
|
+
type: 'number',
|
|
97
|
+
default: 60000,
|
|
98
|
+
description: 'Maximum amount of time a request is allowed to take, in milliseconds',
|
|
99
|
+
typeOptions: { minValue: 1 },
|
|
100
|
+
},
|
|
101
|
+
{
|
|
102
|
+
displayName: 'Top P',
|
|
103
|
+
name: 'topP',
|
|
104
|
+
type: 'number',
|
|
105
|
+
default: 1,
|
|
106
|
+
description: 'Controls diversity via nucleus sampling: 0.5 means half of all likelihood-weighted options are considered. We generally recommend altering this or temperature but not both.',
|
|
107
|
+
typeOptions: { minValue: 0, maxValue: 1, numberPrecision: 2 },
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
],
|
|
112
|
+
};
|
|
113
|
+
this.methods = {
|
|
114
|
+
loadOptions: {
|
|
115
|
+
async getModels() {
|
|
116
|
+
var _a;
|
|
117
|
+
const credentials = await this.getCredentials('niyoosApi');
|
|
118
|
+
const baseUrl = String((_a = credentials.baseUrl) !== null && _a !== void 0 ? _a : '').replace(/\/+$/, '');
|
|
119
|
+
const response = (await this.helpers.httpRequestWithAuthentication.call(this, 'niyoosApi', {
|
|
120
|
+
method: 'GET',
|
|
121
|
+
url: `${baseUrl}/models`,
|
|
122
|
+
json: true,
|
|
123
|
+
}));
|
|
124
|
+
const models = Array.isArray(response === null || response === void 0 ? void 0 : response.data) ? response.data : [];
|
|
125
|
+
return models
|
|
126
|
+
.map((m) => m === null || m === void 0 ? void 0 : m.id)
|
|
127
|
+
.filter((id) => typeof id === 'string' && id.length > 0)
|
|
128
|
+
.map((id) => ({ name: id, value: id }))
|
|
129
|
+
.sort((a, b) => a.name.localeCompare(b.name));
|
|
130
|
+
},
|
|
131
|
+
},
|
|
132
|
+
};
|
|
133
|
+
}
|
|
134
|
+
async supplyData(itemIndex) {
|
|
135
|
+
var _a;
|
|
136
|
+
const credentials = await this.getCredentials('niyoosApi');
|
|
137
|
+
const model = this.getNodeParameter('model', itemIndex);
|
|
138
|
+
const options = this.getNodeParameter('options', itemIndex, {});
|
|
139
|
+
const chatModel = new openai_1.ChatOpenAI({
|
|
140
|
+
apiKey: credentials.agentApiKey,
|
|
141
|
+
model,
|
|
142
|
+
configuration: {
|
|
143
|
+
baseURL: credentials.baseUrl.replace(/\/+$/, ''),
|
|
144
|
+
},
|
|
145
|
+
temperature: options.temperature,
|
|
146
|
+
maxTokens: options.maxTokens === undefined || options.maxTokens === -1 ? undefined : options.maxTokens,
|
|
147
|
+
topP: options.topP,
|
|
148
|
+
timeout: options.timeout,
|
|
149
|
+
maxRetries: (_a = options.maxRetries) !== null && _a !== void 0 ? _a : 2,
|
|
150
|
+
});
|
|
151
|
+
return {
|
|
152
|
+
response: chatModel,
|
|
153
|
+
};
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
exports.NiyoosChatModel = NiyoosChatModel;
|
|
157
|
+
//# sourceMappingURL=NiyoosChatModel.node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NiyoosChatModel.node.js","sourceRoot":"","sources":["../../../nodes/NiyoosChatModel/NiyoosChatModel.node.ts"],"names":[],"mappings":";;;AAAA,8CAA+C;AAC/C,+CAQsB;AAWtB,MAAa,eAAe;IAA5B;QACC,gBAAW,GAAyB;YACnC,WAAW,EAAE,mBAAmB;YAChC,IAAI,EAAE,iBAAiB;YACvB,IAAI,EAAE;gBACL,KAAK,EAAE,iBAAiB;gBACxB,IAAI,EAAE,sBAAsB;aAC5B;YACD,KAAK,EAAE,CAAC,WAAW,CAAC;YACpB,OAAO,EAAE,CAAC;YACV,WAAW,EAAE,2DAA2D;YACxE,QAAQ,EAAE,4BAA4B;YACtC,QAAQ,EAAE;gBACT,IAAI,EAAE,mBAAmB;aACzB;YACD,KAAK,EAAE;gBACN,UAAU,EAA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C,WAAW;YAEhC,SAAS,EAAE,OAAO,CAAC,SAAS,KAAK,SAAS,IAAI,OAAO,CAAC,SAAS,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS;YACtG,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,UAAU,EAAE,MAAA,OAAO,CAAC,UAAU,mCAAI,CAAC;SACnC,CAAC,CAAC;QAEH,OAAO;YACN,QAAQ,EAAE,SAAS;SACnB,CAAC;IACH,CAAC;CACD;AA/KD,0CA+KC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
+
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
+
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#FFFFFF" fill-rule="evenodd" stroke="none"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" width="512" height="512" viewBox="0 0 512 512" role="img" aria-label="Niyoos">
|
|
2
|
+
<g transform="translate(15.925 18.298) scale(2.712716)">
|
|
3
|
+
<path d="M 73.500 12.641 C 37.177 33.550, 23.603 41.670, 21.563 43.710 C 17.423 47.850, 16 52.202, 16 60.727 C 16 67.717, 16.273 68.908, 18.314 70.826 C 21.168 73.506, 25.975 73.651, 29.065 71.149 C 30.902 69.661, 31.437 68.042, 31.790 62.899 C 32.042 59.220, 32.864 55.778, 33.724 54.801 C 34.546 53.866, 39.228 50.821, 44.129 48.035 L 53.039 42.969 60.971 47.544 C 65.334 50.060, 69.158 52.921, 69.469 53.901 C 69.780 54.882, 71.148 56.730, 72.509 58.008 C 74.369 59.756, 76.143 60.333, 79.648 60.333 C 83.628 60.333, 84.730 59.866, 87.156 57.151 C 89.297 54.755, 90 52.959, 90 49.885 C 90 46.607, 89.388 45.231, 86.894 42.901 C 84.870 41.010, 82.725 40, 80.732 40 C 77.713 40, 69 35.646, 69 34.137 C 69 32.824, 85.521 24, 87.978 24 C 89.247 24, 95.059 26.765, 100.893 30.145 C 106.727 33.525, 117.800 39.895, 125.500 44.301 C 133.200 48.706, 140.512 53.220, 141.750 54.330 C 143.852 56.216, 144 57.157, 144 68.674 C 144 76.599, 143.626 81, 142.952 81 C 140.726 81, 137 86.321, 137 89.500 C 137 92.679, 140.726 98, 142.952 98 C 144.507 98, 144.325 117.178, 142.750 119.308 C 141.555 120.925, 127.971 129.333, 127.463 128.771 C 127.329 128.622, 127.016 113.688, 126.768 95.585 L 126.317 62.669 123.603 60.335 C 120.131 57.348, 116.840 57.373, 113.306 60.412 L 110.500 62.825 110.206 101.178 L 109.913 139.532 104.690 142.266 C 101.818 143.770, 99.138 145, 98.734 145 C 98.330 145, 98 131.762, 98 115.582 C 98 99.402, 97.720 85.435, 97.379 84.545 C 96.679 82.722, 91.944 80, 89.473 80 C 88.578 80, 86.531 81.315, 84.923 82.923 L 82 85.846 82 115.864 C 82 132.374, 81.646 146.101, 81.213 146.368 C 80.780 146.636, 78.080 145.500, 75.213 143.845 L 70 140.835 70 123.341 L 70 105.846 67.077 102.923 C 65.469 101.315, 63.465 100, 62.624 100 C 59.785 100, 56.228 102.205, 55.110 104.657 C 54.420 106.173, 54.001 114.350, 54.002 126.297 C 54.004 150.478, 53.891 150.205, 67 157.807 C 83.962 167.644, 86.591 168.433, 93.915 165.880 C 99.471 163.943, 151.341 133.935, 154.777 130.669 C 160.439 125.289, 161 121.395, 161 87.500 C 161 54.776, 160.418 50.252, 155.495 44.701 C 154.129 43.162, 142.772 35.927, 130.256 28.624 C 93.288 7.051, 95.232 7.997, 87.904 8.018 C 82.133 8.034, 80.709 8.492, 73.500 12.641 M 47.315 66.452 C 45.563 67.220, 43.436 69.191, 42.588 70.830 C 41.536 72.864, 37.651 75.828, 30.367 80.156 C 23.873 84.013, 18.952 87.676, 17.810 89.500 C 16.141 92.169, 15.965 94.284, 16.217 108.661 L 16.500 124.821 19.608 128.661 C 23.506 133.475, 32.535 138.990, 36.527 138.996 C 40.558 139.001, 43.696 136.660, 44.487 133.057 C 45.349 129.136, 43.776 126.502, 38.707 123.377 C 36.393 121.950, 33.938 120.071, 33.250 119.200 C 32.428 118.160, 32 113.987, 32 107.016 L 32 96.413 40.927 91.207 C 45.836 88.343, 50.829 86, 52.022 86 C 55.104 86, 59.640 83.086, 60.915 80.288 C 62.783 76.187, 62.197 72.242, 59.250 69.088 C 55.923 65.526, 51.600 64.572, 47.315 66.452" fill="#131A2A" fill-rule="evenodd" stroke="none"/>
|
|
4
|
+
</g>
|
|
5
|
+
</svg>
|
package/package.json
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "n8n-nodes-niyoos",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"description": "Use Niyoos-governed LLMs (Anthropic via the Niyoos proxy) as a LangChain chat model in n8n.",
|
|
5
|
+
"keywords": [
|
|
6
|
+
"n8n-community-node-package",
|
|
7
|
+
"n8n",
|
|
8
|
+
"niyoos",
|
|
9
|
+
"langchain",
|
|
10
|
+
"anthropic",
|
|
11
|
+
"claude",
|
|
12
|
+
"llm",
|
|
13
|
+
"ai"
|
|
14
|
+
],
|
|
15
|
+
"license": "MIT",
|
|
16
|
+
"homepage": "https://niyoos.com",
|
|
17
|
+
"author": {
|
|
18
|
+
"name": "Niyoos",
|
|
19
|
+
"email": "varun@niyoos.com"
|
|
20
|
+
},
|
|
21
|
+
"repository": {
|
|
22
|
+
"type": "git",
|
|
23
|
+
"url": "git+https://github.com/niyoos/aiwos.git",
|
|
24
|
+
"directory": "integrations/n8n"
|
|
25
|
+
},
|
|
26
|
+
"engines": {
|
|
27
|
+
"node": ">=20.15"
|
|
28
|
+
},
|
|
29
|
+
"packageManager": "npm@11.11.0",
|
|
30
|
+
"scripts": {
|
|
31
|
+
"build": "tsc && gulp build:icons",
|
|
32
|
+
"dev": "tsc --watch",
|
|
33
|
+
"format": "prettier nodes credentials --write",
|
|
34
|
+
"lint": "eslint nodes credentials package.json",
|
|
35
|
+
"prepublishOnly": "npm run build"
|
|
36
|
+
},
|
|
37
|
+
"files": [
|
|
38
|
+
"dist",
|
|
39
|
+
"README.md",
|
|
40
|
+
"LICENSE"
|
|
41
|
+
],
|
|
42
|
+
"n8n": {
|
|
43
|
+
"n8nNodesApiVersion": 1,
|
|
44
|
+
"credentials": [
|
|
45
|
+
"dist/credentials/NiyoosApi.credentials.js"
|
|
46
|
+
],
|
|
47
|
+
"nodes": [
|
|
48
|
+
"dist/nodes/NiyoosChatModel/NiyoosChatModel.node.js"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
"dependencies": {
|
|
52
|
+
"@langchain/core": "^0.3.66",
|
|
53
|
+
"@langchain/openai": "^0.6.14"
|
|
54
|
+
},
|
|
55
|
+
"peerDependencies": {
|
|
56
|
+
"n8n-workflow": "*"
|
|
57
|
+
},
|
|
58
|
+
"devDependencies": {
|
|
59
|
+
"gulp": "^5.0.0",
|
|
60
|
+
"n8n-workflow": "*",
|
|
61
|
+
"typescript": "^5.9.2"
|
|
62
|
+
}
|
|
63
|
+
}
|