wit-ai / wit-ios

Wit.ai iOS client
Other
222 stars 71 forks source link

simple way to mark requests? #52

Closed bubakazouba closed 7 years ago

bubakazouba commented 9 years ago

I am trying to use mark my messages using the "msg_id" parameter that can be sent to wit and wit will send it back again. (see: https://wit.ai/docs/http/20141022#get-intent-via-speech-link).

I can see that in WitUploader.m --> startRequestWithContext, the url being formed would only contain the "context" (if it wasn't nil), is there something am I missing? Or is there just an easier way to "mark" my messages?

dudu13 commented 9 years ago

I am also having the same problem, that would be great if you added it to the sdk.

tielur commented 9 years ago

I haven't used it but would the start method with the customData work?

- (void)start: (id)customData;

According to the API

Same as the start method but allow a custom object to be passed, which will be passed back as an argument of the [self.delegate witDidGraspIntent:… customData:(id)customData]. This is how you should link a request to a response, if needed.

bubakazouba commented 9 years ago

customData is always the WITMicButton (line 238/243 WITMicButton.m)

hactar commented 7 years ago

When using the new converseAPI you can use the WitSession's customData to pass around data that you do not want sent to the server, so you could use this to mark your query.