node-red-contrib-ollama 0.6.1 → 0.6.2
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/.github/workflows/deploy-site.yml +38 -0
- package/CHANGELOG.md +6 -0
- package/CLAUDE.md +18 -0
- package/examples/Example.json +76 -0
- package/package.json +1 -1
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
name: Deploy site
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
paths:
|
|
7
|
+
- "site/**"
|
|
8
|
+
- ".github/workflows/deploy-site.yml"
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions:
|
|
12
|
+
contents: read
|
|
13
|
+
pages: write
|
|
14
|
+
id-token: write
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: pages
|
|
18
|
+
cancel-in-progress: false
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v4
|
|
25
|
+
- uses: withastro/action@v3
|
|
26
|
+
with:
|
|
27
|
+
path: site
|
|
28
|
+
node-version: 22
|
|
29
|
+
deploy:
|
|
30
|
+
needs: build
|
|
31
|
+
runs-on: ubuntu-latest
|
|
32
|
+
environment:
|
|
33
|
+
name: github-pages
|
|
34
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
35
|
+
steps:
|
|
36
|
+
- name: Deploy to GitHub Pages
|
|
37
|
+
id: deployment
|
|
38
|
+
uses: actions/deploy-pages@v4
|
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
6
6
|
|
|
7
|
+
## [0.6.2] - 2026-09-15
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Added `ollama-ps` and `ollama-abort` to the bundled example flow (`examples/Example.json`) — they were the only two action nodes not demonstrated in any example, which the Node-RED flow library scorecard flags as missing example coverage.
|
|
12
|
+
|
|
7
13
|
## [0.6.1] - 2026-09-13
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/CLAUDE.md
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Code notes for this repo
|
|
2
|
+
|
|
3
|
+
Node-RED plugin wrapping the `ollama` JS client library as configurable nodes. Each node type is declared in `package.json` (`node-red.nodes`) as an `.html` + `.js` pair under `nodes/`.
|
|
4
|
+
|
|
5
|
+
## Node categories
|
|
6
|
+
|
|
7
|
+
- **Config nodes** (no direct output, referenced by action nodes via `config.server`/etc.): `ollama-config-server` (host/port, or Ollama Cloud + API key credential), `ollama-config-options`, `ollama-config-format`, `ollama-config-tools`.
|
|
8
|
+
- **Action nodes** (12): `ollama-chat`, `ollama-generate`, `ollama-embed`, `ollama-list`, `ollama-show`, `ollama-ps`, `ollama-pull`, `ollama-push`, `ollama-create`, `ollama-copy`, `ollama-delete`, `ollama-abort` — each wraps one `ollama.js` client method.
|
|
9
|
+
|
|
10
|
+
## Shared patterns (present in every action node — keep them in sync when touching one)
|
|
11
|
+
|
|
12
|
+
- **Host resolution**: with a local server configured, `msg.payload.host` may override the configured host. With Ollama Cloud (`server.useCloud`), the configured host is always used and `msg.payload.host` is **never** allowed to override it — an override would let the configured API key leak to an arbitrary host. See `ollama-chat.js` for the canonical implementation.
|
|
13
|
+
- **Param resolution**: `model` and other per-call params read from `msg.payload.<field>` first, falling back to the node's own config value — respecting the field's configured type (`str` literal vs `msg` property lookup).
|
|
14
|
+
- **Streaming** (`stream: true`): the node consumes the response with `for await` and emits one cloned `msg` per chunk on `payload` — never pass a raw `AbortableAsyncIterator` out to `msg.payload`.
|
|
15
|
+
|
|
16
|
+
## Style
|
|
17
|
+
|
|
18
|
+
- 4-space indentation, a space inside parens in declarations/conditions (`function( RED )`, `if( config.model )`) — match this in new code, even though it's an unusual style choice.
|
package/examples/Example.json
CHANGED
|
@@ -403,5 +403,81 @@
|
|
|
403
403
|
"c74ec4ac9b76d0f4"
|
|
404
404
|
]
|
|
405
405
|
]
|
|
406
|
+
},
|
|
407
|
+
{
|
|
408
|
+
"id": "f1a2b3c4d5e6f708",
|
|
409
|
+
"type": "ollama-ps",
|
|
410
|
+
"z": "3bccaf6e46d3dbf5",
|
|
411
|
+
"name": "Running models",
|
|
412
|
+
"x": 450,
|
|
413
|
+
"y": 700,
|
|
414
|
+
"wires": [
|
|
415
|
+
[
|
|
416
|
+
"03ee0eeb510c4079"
|
|
417
|
+
]
|
|
418
|
+
]
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
"id": "a1b2c3d4e5f60718",
|
|
422
|
+
"type": "inject",
|
|
423
|
+
"z": "3bccaf6e46d3dbf5",
|
|
424
|
+
"name": "Trigger",
|
|
425
|
+
"props": [
|
|
426
|
+
{
|
|
427
|
+
"p": "payload"
|
|
428
|
+
}
|
|
429
|
+
],
|
|
430
|
+
"repeat": "",
|
|
431
|
+
"crontab": "",
|
|
432
|
+
"once": false,
|
|
433
|
+
"onceDelay": 0.1,
|
|
434
|
+
"topic": "",
|
|
435
|
+
"payload": "",
|
|
436
|
+
"payloadType": "date",
|
|
437
|
+
"x": 270,
|
|
438
|
+
"y": 700,
|
|
439
|
+
"wires": [
|
|
440
|
+
[
|
|
441
|
+
"f1a2b3c4d5e6f708"
|
|
442
|
+
]
|
|
443
|
+
]
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"id": "b2c3d4e5f6071829",
|
|
447
|
+
"type": "ollama-abort",
|
|
448
|
+
"z": "3bccaf6e46d3dbf5",
|
|
449
|
+
"name": "Abort",
|
|
450
|
+
"x": 430,
|
|
451
|
+
"y": 760,
|
|
452
|
+
"wires": [
|
|
453
|
+
[
|
|
454
|
+
"03ee0eeb510c4079"
|
|
455
|
+
]
|
|
456
|
+
]
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"id": "c3d4e5f607182930",
|
|
460
|
+
"type": "inject",
|
|
461
|
+
"z": "3bccaf6e46d3dbf5",
|
|
462
|
+
"name": "Trigger",
|
|
463
|
+
"props": [
|
|
464
|
+
{
|
|
465
|
+
"p": "payload"
|
|
466
|
+
}
|
|
467
|
+
],
|
|
468
|
+
"repeat": "",
|
|
469
|
+
"crontab": "",
|
|
470
|
+
"once": false,
|
|
471
|
+
"onceDelay": 0.1,
|
|
472
|
+
"topic": "",
|
|
473
|
+
"payload": "",
|
|
474
|
+
"payloadType": "date",
|
|
475
|
+
"x": 270,
|
|
476
|
+
"y": 760,
|
|
477
|
+
"wires": [
|
|
478
|
+
[
|
|
479
|
+
"b2c3d4e5f6071829"
|
|
480
|
+
]
|
|
481
|
+
]
|
|
406
482
|
}
|
|
407
483
|
]
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "node-red-contrib-ollama",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.2",
|
|
4
4
|
"description": "Add AI functionality to your flows! This module includes a set of nodes that enable easy communication with Ollama, enriching your projects with intelligent solutions.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|