Class: Contai::Providers::N8N
- Defined in:
- lib/contai/providers/n8n.rb
Instance Method Summary collapse
-
#initialize(options = {}) ⇒ N8N
constructor
A new instance of N8N.
Methods inherited from HTTP
Methods inherited from Base
Constructor Details
#initialize(options = {}) ⇒ N8N
Returns a new instance of N8N.
4 5 6 7 8 9 10 11 12 13 |
# File 'lib/contai/providers/n8n.rb', line 4 def initialize( = {}) webhook_url = [:webhook_url] || raise(ArgumentError, "N8N provider requires :webhook_url") super({ url: webhook_url, method: :post, body_template: { prompt: "{{prompt}}" }, response_path: [:response_path] || "output" }.merge()) end |