Closed brunobrandes closed 8 years ago
Hi, @brunobrandes Thanks for the suggestion!
I think, we will be able to add such field to the response data in upcoming update of API.AI. So, it will be available in about a week. I will notify you about the release.
Thanks, Danil.
Hello @xVir Thanks for this. The api.ai already returns sessionId property?
Hi, @brunobrandes No, but this field will be available soon and then I will update .NET lib in Nuget. Thanks!
Hi, @brunobrandes Api.ai now updated. Now you can get sessionId from response. Please check it.
Thanks!
@xVir It's working :) Now, I can finish my project 'Alice'.
Thank you very much!
Great, Feel free to ask any questions :)
i am receiving warning in api.ai "IMPORTANT: Please use unique session ID for each client. Otherwise you may experience unstable behaviour"
what i need to do?
Hi, @umashankarpandey Did you get this message from SDK?
Yes i got this message but now working fine after
var request = appai.textRequest(query);
request.sessionId="Your Client session ID"
request.on('response', function(response) {});
Yes, but I think it will be better to use some sort of unique identifier, UUID for example
let session = uuid.v1();
let request = apiaiService.textRequest(messageText, { sessionId: session });
request.on('response', function(response) {
console.log(response);
});
request.on('error', function(error) {
console.log(error);
});
OK Thanks for your help i will use it
Hello. i´m very very noob in programming... I´m search for some time now to request thru fulfillment, the sessionId to store on Firebase to control the user login. I tried the code above without success. Since it´s been 3 years now, does it still work the same way, or there´s another way of retrieving the sessionId?
Hello, My name is Bruno Brandes and I love learning about api.ai. I developed Alice. Alice is a insurance travel BOT using api.ai, Microsoft Bot Framework and Messaging Hub2.
My Agent in api.ai is configured to use webhook but when receives a call in my endpoint, I cant relate the request with my session because query response dosent contain sessionId passed query request :frowning:
My alternative for this problem was create a intents and context in api.ai for receiving text with "create session @sys.any:sessionId" and force my application call the api.ai in first user contact then finaly receiving query response with parameter sessionId.
I wonder... Contains another way to do this?