dialogflow-android-client
dialogflow-android-client copied to clipboard
I am setting the session id in AIRequest object but its giving some other session id in response
`AIRequest request = new AIRequest();
request.setQuery(message);
request.setSessionId(MyData.getInstance(MyApplication.getInstance()).getGatewayId() + "_" +
MyData.getInstance(MyApplication.getInstance()).getUsername());
return aiService.textRequest(request);`
and when i get AIResponse object it gives me some different session id. How can i set my custom session id for a particular user.
You may try to build Java client library from the "sessionid-workaround" branch:
git clone -b sessionid-workaround https://github.com/api-ai/apiai-java-client.git
cd apiai-java-client/
mvn install
then clean and rebuild your Android project and try again.
I am already using the libai-1.4.9 after building it using mvn and installed it in my android project as module dependency
I am using two dependency compile project(':libai-1.4.9') and compile 'ai.api:sdk:2.0.6@aar'
Now what to do?
On Sat, Jul 8, 2017 at 2:29 PM, folomeev [email protected] wrote:
You may try to build Java client library from the "sessionid-workaround" branch:
git clone -b sessionid-workaround https://github.com/api-ai/apiai-java-client.gitcd apiai-java-client/ mvn install
then clean and rebuild your Android project and try again.
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313844088, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKcR8JAQcHDoRA2qC4Kh4ATaqt0Hztgks5sL0TYgaJpZM4OPetO .
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
- Checkout libai source from sessionid-workaround branch
- It will bring you libai-1.5.10 sources
- Build it and install into your local repository using mvn
- Change dependency version in the Android project from 1.4.9 to 1.5.10
- Clean and rebuild Android project
Thanks for the help, there are two dependency that i got one is libai-1.5.10 sources.jar and other is libai-1.5.10.jar which one to use
On Sat, Jul 8, 2017 at 3:23 PM, folomeev [email protected] wrote:
- Checkout libai source from sessionid-workaround branch
- It will bring you libai-1.5.10 sources
- Build it and install into your local repository using mvn
- Change dependency version in the Android project from 1.4.9 to 1.5.10
- Clean and rebuild Android project
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313846287, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKcRw8FkB9WsEt7NDOw6pouRBrzNIkrks5sL1GWgaJpZM4OPetO .
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
I am using libai-1.5.10.jar and i am getting this error java.lang.NoClassDefFoundError: org.slf4j.LoggerFactory while initialising AIService object
On Sat, Jul 8, 2017 at 6:43 PM, Siddhant Panhalkar < [email protected]> wrote:
Thanks for the help, there are two dependency that i got one is libai-1.5.10 sources.jar and other is libai-1.5.10.jar which one to use
On Sat, Jul 8, 2017 at 3:23 PM, folomeev [email protected] wrote:
- Checkout libai source from sessionid-workaround branch
- It will bring you libai-1.5.10 sources
- Build it and install into your local repository using mvn
- Change dependency version in the Android project from 1.4.9 to 1.5.10
- Clean and rebuild Android project
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313846287, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKcRw8FkB9WsEt7NDOw6pouRBrzNIkrks5sL1GWgaJpZM4OPetO .
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25'
compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
Hi, I did all these things with the updated library but still i am getting unauthenticated request. Any thing that I can do to fix this. Thanks
On Sat, Jul 8, 2017 at 11:50 PM, folomeev [email protected] wrote:
Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313872856, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKcR9xS2J4RgGSVQI002M_L7NMULE_Pks5sL8h8gaJpZM4OPetO .
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
Hi, I am using api.ai speech recogniser so could you please tell me how can I set the session Id in this request, below is my code that I am using. I am using AIService startlistening method. Please let me know how can i do it.
final List<AIContext> contexts = Collections.singletonList(new AIContext (MyData.getInstance(MyApplication.getInstance()).getGatewayId() + "_" + MyData.getInstance(MyApplication.getInstance()).getUsername())); final RequestExtras requestExtras = new RequestExtras(contexts, null); aiService.startListening(requestExtras);
Thanks
On Mon, Jul 10, 2017 at 2:55 PM, Siddhant Panhalkar < [email protected]> wrote:
Hi, I did all these things with the updated library but still i am getting unauthenticated request. Any thing that I can do to fix this. Thanks
On Sat, Jul 8, 2017 at 11:50 PM, folomeev [email protected] wrote:
Try to add to dependency:
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.25' compile group: 'com.google.code.gson', name: 'gson', version: '2.8.1'
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/api-ai/apiai-android-client/issues/48#issuecomment-313872856, or mute the thread https://github.com/notifications/unsubscribe-auth/AbKcR9xS2J4RgGSVQI002M_L7NMULE_Pks5sL8h8gaJpZM4OPetO .
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
-- Siddhant Panhalkar Senior Android Developer Cosine Labs https://cosinelabs.com/
Please update your reference up to latest release (compile 'ai.api:sdk:2.0.7@aar') and run again the code you gave in first comment.
@folomeev I tried your solution.Not able to change the session ID. Did anybody find a solution?