dialogflow-apple-client icon indicating copy to clipboard operation
dialogflow-apple-client copied to clipboard

diagflow hotel booking iOS app

Open efuaaa opened this issue 6 years ago • 0 comments

I tried this - let request = ApiAI.shared().textRequest()

    if let text = self.messageField.text, text != "" {
        request?.query = text
    } else {
        return
    }
    
    request?.setMappedCompletionBlockSuccess({ (request, response) in
        let response = response as! AIResponse
        if let textResponse = response.result.fulfillment.messages {
            let textRespoArray = textResponse [ 0 ] as NSDictionary
            print(textResponse)
            self.speechAndText(text:textRespoArray.value(forKey: "speech") as! String)
        }
    }, failure: { (request, error) in
        print(error!)
    })
    
    ApiAI.shared().enqueue(request)
    messageField.text = ""
    

and it worked perfectly until a couple of days ago now anytime I make the request . it returns this error

finished with error - code: -1001

2019-01-18 17:16:28.189377+0000 Chip- Hotel Booking Chatbot[628:7511] Task .<1> HTTP load failed (error code: -999 [1:89])

Error Domain=NSURLErrorDomain Code=-1001 "The request timed out." UserInfo={NSUnderlyingError=0x604000245070 {Error Domain=kCFErrorDomainCFNetwork Code=-1001 "(null)" UserInfo={_kCFStreamErrorCodeKey=-2102, _kCFStreamErrorDomainKey=4}}, NSErrorFailingURLStringKey=https://api.api.ai/v1/query..., NSErrorFailingURLKey=https://api.api.ai/v1/query..., _kCFStreamErrorDomainKey=4, _kCFStreamErrorCodeKey=-2102, NSLocalizedDescription=The request timed out.}

any help?

efuaaa avatar Jan 19 '19 04:01 efuaaa