I do not have access to the online Wit.ai API from my localhost
Eliuvis opened this issue · 1 comments
Eliuvis commented
I am trying to develop a chatbot using wit.ai to mount it on my website, but from my localhost I do not have access to the online API ... I use Ruby on Rails and when I try the basic example of the repository Git the answer is' SocketError: Failed to open TCP connection to api.wit.ai:443 (getaddrinfo: Temporary failure in name resolution) ', use the' savon 'gem to verify if it had connection and it works for me, I do not know why wit does not do it. This is the example:
require 'wit'
def call
client = Wit.new(access_token: 'Y3Q......')
rsp = client.message('cuestion???')
puts("Yay, got Wit.ai response: #{rsp}")
end
Then in my console:
$ rails c
Running via Spring preloader in process 5322
Loading development environment (Rails 5.1.5)
2.3.1 :001 > obj = MessageController.new
=> #<MessageController:0x00000003624280 @_action_has_layout=true, @_routes=nil, @_request=nil, @_response=nil>
2.3.1 :002 > obj.call
SocketError: Failed to open TCP connection to api.wit.ai:443 (getaddrinfo: Temporary failure in name resolution)
from app/controllers/message_controller.rb:9:in `call'
from (irb):2
2.3.1 :003 >