Class: WaveDispatch::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/wave_dispatch.rb

Instance Method Summary collapse

Constructor Details

#initialize(license = ENV["WAVE_LICENSE"], endpoint: "https://dispatch.wave.online") ⇒ Client

Returns a new instance of Client.



11
12
13
14
# File 'lib/wave_dispatch.rb', line 11

def initialize(license = ENV["WAVE_LICENSE"], endpoint: "https://dispatch.wave.online")
  @license = license
  @endpoint = endpoint
end

Instance Method Details

#execute(prompt) ⇒ Object

Classify and run on the edge if your plan allows it.



20
# File 'lib/wave_dispatch.rb', line 20

def execute(prompt) = post({ prompt: prompt, execute: true })

#route(prompt) ⇒ Object

Classify a prompt (no execution) -> “probability”, “margin”, “forward”



17
# File 'lib/wave_dispatch.rb', line 17

def route(prompt) = post({ prompt: prompt })