ターゲットによってはローカルでやらざるを得ないこともあるだろうし
実際のところ
外観

n8nのdocker
まず、lobechatとollamaを実験したときのネットワーク名を
$ docker inspect ollama | jq '.[0].NetworkSettings.Networks | keys' [ "lobe-net" ]
この名前をネットワーク名として変数に保存
NETWORK_NAME="lobe-net"
$ docker run -d \ --name n8n_docker \ --network $NETWORK_NAME \ -p 5678:5678 \ -v n8n_data:/home/node/.n8n \ --restart unless-stopped \ n8nio/n8n:1.100.1
ollama
openaiのときと同様、認証してモデル選択をします

HTTPリクエスト

key
{{ $json.text }}
受け手のnetcat
$ nc -l -w 3 -p 9999
POST / HTTP/1.1
Accept: application/json,text/html,application/xhtml+xml,application/xml,text/*;q=0.9, image/*;q=0.8, */*;q=0.7
Content-Type: application/json
User-Agent: axios/1.8.3
Content-Length: 278
Accept-Encoding: gzip, compress, deflate, br
Host: 172.17.0.1:9999
Connection: close
{"value":"Awesome! That's great to hear. Local n8n and local Ollama can be really powerful – and cool! \n\nSo, what's the test about? Are you running the test with a specific dataset in Ollama and configuring the workflow in n8n?\n\nLet's go! 😊 \n\nHow's it going so far?"}