Skip to content

diagflow hotel booking iOS app #46

Open
@efuaaa

Description

@efuaaa

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?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions