I have an intent rent example:
Me: I want to rent a house in Madrid with 2 bedrooms
Bot: Which type? House, duplex...
Me: Duplex
Bot: You want a house in Madrid with 2 bedrooms, there are some examples
Me: And with 3 bedrooms?
Bot: You want a house in Madrid with 3 bedrooms, there are some examples
How I implement the last part? How I can keep the context of the last intent and answer with the new entity provided by the user.
The solution I found is using rasa interactive and add them manually. With the intent inform
Related
Closed. This question needs details or clarity. It is not currently accepting answers.
Want to improve this question? Add details and clarify the problem by editing this post.
Closed 6 days ago.
Improve this question
Given input:
"Client Name:--Client PIN: --Interaction ID: ------Below is the transcript of your chat session you initiated on Tuesday, :: PM EDT----=============================================================================-- Assistant : Here’s a disclosure about our chat feature if you�d like to read it while I connect you to a Live Chat agent. This chat may be monitored and recorded for quality purposes. Individual & Institutional Services, ABC is a registered broker dealer, member of HWV and XYZ.-- Assistant : ABC does not provide tax or legal advice. Your plan document controls plan operations and administration. Consult your plan document and a qualified tax advisor or attorney regarding your specific situation.-- Assistant : This chat may be monitored and recorded for quality purposes. Individual & Institutional Services, ABC is a registered broker-dealer, member of HWV and XYZ.-- Susan : Greetings from Charlotte. My name is Susan . How may I assist you today?-- Ana : Hi Susan , i spoke to you on friday about my claim. i just wanted to know if anyone has responded to your email you were supposed to send to the employer-- Susan : Hello, Ms. Jenny One moment please while I look into that previous claim. -- Ana: ok-- Susan : Thank you for your patience, Ms. Jenny. I recall we spoke about the turnaround time for the plan sponsor approval and a coaching request for the previous representative. My apologies, but I do not recall saying that I would reach out to the employer directly. I can only reach out to the CSM who can make additional outreach to the employer. At this time, we still have not received that response from the employer. ----==============================================================================
"
expected output:
"Susan : Greetings from Charlotte. My name is Susan . How may I assist you today?-- Ana : Hi Susan , i spoke to you on friday about my claim. i just wanted to know if anyone has responded to your email you were supposed to send to the employer-- Susan : Hello, Ms. Jenny One moment please while I look into that previous claim. -- Ana: ok-- Susan : Thank you for your patience, Ms. Jenny. I recall we spoke about the turnaround time for the plan sponsor approval and a coaching request for the previous representative. My apologies, but I do not recall saying that I would reach out to the employer directly. I can only reach out to the CSM who can make additional outreach to the employer. At this time, we still have not received that response from the employer."
I need help to clear all the by-default chat session details which is
using regex pattern in python and only returns the expected output.
I tried using regex function but failed, as it was not generalize enough. I am expecting the "given input" to be transformed to "expected output".
I made a web app which consists of two categories(let's say A and B) of users and there is a common board upon which they can both post something. Now if a person(John) from category A is suggested that his best match is person(wick) from category B by a django card, how can I make something that notifies both of them.
Suppose JOHN like what WICK is offering and there is a book button he sees on WICK's card(mini profile). Now I want to notify Wick that JOHN is interested in you when JOHN clicks on the Book button.
example data
Manufacturer
M_ID From To M_Type T_Type T_Length T_Weight #Trucks
JOHN A B Boxes Open 12-Tyre 22 3
BLAKE C D Cylinders Trailer HIGH 23 2
GREG G H Scrap Open 14-Tyre 25 5
Transporter
T_ID From To T_Type T_Length T_Weight #Trucks Price
WICK A B Open 12-Tyre 22 5 1500
PATEL G H Open 14-Tyre 25 10 1200
NICK A B Open 12-Tyre 22 7 1900
The algo returns data in this format
Manufacturer Best Match Second Best
JOHN WICK NICK
GREG PATEL -
I can show JOHN that his best matches are WICK and NICK( and when he clicks on them their mini profile will be shown to him with a BOOK option but what do I do next to make something happen(alert WICK/NICK) when he clicks on the book button??
It's a rather broad question, but here goes.
JOHN clicks, and the processing of the request will either do something immediately (such as sending an e-mail to NICK), or it will store something in the database which will be brought to NICK's attention the next time NICK interacts with the application.
Perhaps a notifications table with foreign keys for JOHN (notifier), NICK (notifiee --yuk ), and associated data.
Something like this latter is how I will see at the top of the stackoverflow page, when you up-vote this post or add a comment. If I don't come back to stackoverflow for a month, I'll see it then, or you might include an expiry date with what you store so that after that period of time has passed, the notification will be considered stale and deleted on the fly without NICK ever becoming aware of it.
I expect you can find something that somebody else has written to implement most of this, somewhere out there. Probably, a form of middleware, if it is to be checked on literally every interaction rather than just at log-in. Sorry, I can't offer any pointers.
You shouldn't talk in SQL tables when in reality you work on Django ORM level of abstraction.
All you need is a ManyToMany field. You'll add that m2m field and show new ones to user offering was made for (maybe merge Manufacturer and Transporter to one Model (table) to not duplicate this functionality).
Instead of using auto m2m, I suggest you use through model to add extra field, such as Boolean has_been_seen. Or you can make a guess instance has been seen if user's last_activity is bigger than datetime that instance was created at.
My App consists of a notification module. If the notifications are consecutively arrived from a same user, I would like to show "n notifications from john doe".
eg:
5 notifications from john doe
2 notification from james
4 notofications from john doe
How would I count these consecutive rows with same value in a column using django orm?
Suppose You have a model Notifications and another model named User. Then you can group by user_id
q=Notifications.objects.filter(user__id=1).values('user__first_name', 'user_id').annotate(c=Count('user__id'))
Just as Shafikur's answer above but I suppose you will have something to denote that the notification is new or hasn't been read. So let's add one more piece to the filter:
q=Notification.objects.filter(user__id=1, status='new').values('user__first_name', 'user_id').annotate(c=Count('user__id'))
It's not certain how you track the new notifications in your model, so this is just a rough guess which you should be able to apply to your particular case
I want to set some record rules to restrict employees to view only their profile and their subordinates profiles. No one else out of a particular employee's subordinate hierarchy should be displayed to him. For example, this is my employee hierarchy.
Group One:
Ned
Cat
sansa
arya
Group Two
Robert
cersi
jammi
jofery
When Ned logged in, he should see cat,sansa and arya employee record but not Robert record.
Likewise when robert logged in, he should see cersi, jammi, jofery employee record.
The relation is sansa is reporting to cat whereas Cat is reporting to Ned.
What I get is:
When I logged in as Ned, I can able to see the Cat record only
When I logged in as Cat, I can able to see the Sansa and arya records
But When I log in as ned, I want to see his subordinate as well cat subordinate records too.
Thanks in advance
There is one important operator is there for such kind of the condition exact like your requirement is : child_of
You need to manage your rules like below.
['|',('parent_id.user_id','child_of',[user.id]),('user_id','=',user.id)]
or
['|',('parent_id.user_id','child_of',[user.id]),('user_id','child_of',[user.id])]
I hope this will resolve your issue and fit in your requirement.
Given an id of any facebook group, using FQL I can fetch all the members of that group, if I am a member of that group. I can also see who of my friends is in the same group as me, that is also not a problem. Now, I need to see of all of the group members, who of them is friends, I mean, if there are 2 group members in the same group as me, but they are not my friends, is there any way to see if those 2 are friends?
Without each of those friends giving you access to view who their friends are, it's impossible. If Facebook allowed this to happen without a friend granting you that access, then I'm going go scream from the hills about a HUGE security hole.