Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

diagflow hotel booking iOS app #46

Open
efuaaa opened this issue Jan 19, 2019 · 0 comments
Open

diagflow hotel booking iOS app #46

efuaaa opened this issue Jan 19, 2019 · 0 comments

Comments

@efuaaa
Copy link

efuaaa commented Jan 19, 2019

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant