You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to consume the webhook response in my iOS client. I have added "data" and "displayText" elements in web hook and I am trying to use the same in iOS client. However, when I try to use these elements, I get compile time error that these elements don't exist in Fulfillment struct. When I checked the API.AI SDK, I found that only elements available in Fulfillment are "speech" and "messages".
Has anyone faced this issue? Any advice on this will be much appreciated.
Thanks,
Nishant
The text was updated successfully, but these errors were encountered:
I had to replace bellow function
func serialize(_ source: [String : Any]) throws -> QueryResponse {
let identifier: String = try objectForKey("id", dict: source)
let dateFormatter = DateFormatter()
dateFormatter.locale = Locale(identifier: "en_US")
dateFormatter.dateFormat = "yyyy-MM-dd'T'HH:mm:ss.SSS'Z'"
guard let timestamp: Date = dateFormatter.date(from: try objectForKey("timestamp", dict: source)) else {
throw SerializeError.typeMismatch("timestamp")
}
let result = try ResultSerializer().serialize(try objectForKey("result", dict: source))
return Destination(
identifier: identifier,
timestamp: timestamp,
result: result
)
}
Hi,
I am trying to consume the webhook response in my iOS client. I have added "data" and "displayText" elements in web hook and I am trying to use the same in iOS client. However, when I try to use these elements, I get compile time error that these elements don't exist in Fulfillment struct. When I checked the API.AI SDK, I found that only elements available in Fulfillment are "speech" and "messages".
Has anyone faced this issue? Any advice on this will be much appreciated.
Thanks,
Nishant
The text was updated successfully, but these errors were encountered: