All - Activity - tonysinghmss - Rasa Community Forum
Execute custom actions on server initialization or startup
Sorry the code I am working on cannot be shared due to company policy. You can go through this link
Call this service from your program to check what conversation has already taken place between your bot and user of the bot, and based on your logic you can either take the old conversation ahead or...
Failed building wheel for httptools in installing rasa in windows10
httptools wheel file is now available on PyPi website. So it should not be a problem for Python 3.6, 3.7 and 3.8 users. If you are using other versions of python then please do the following steps:
- Activate the venv of your project in command line.
- Set the INCLUDE and LIB variable from command line...
Slot not set from button
I am also facing a similar issue. The slot value is not being set even though I am passing it correctly from my custom action.
My story is as follows:
story_02
- intent_2
- action_03
intent_2 is getting invoked from an action through button...
Facing problem in httptools for RASA X
This httptools is one of the dependencies of rasa. When we do pip install rasa, htttptools source is downloaded and then built using MS VC++. But somehow in Windows 10, it doesn’t happen. It fails miserably. I am also facing this issue. Any help would be much appreciated...
Wrong policy used to predict next action
I am busy with another task. I will try to do it and then get back to you.
Wrong policy used to predict next action
I am using rasa==1.1.8 and rasa-sdk==1.1.1 Every time the tracker store has close to 150 items, the predictions of bot go haywire and it is unable to recognize the intents properly. Once I clean the tracker store (events table) from database, it starts working fine. This happens mainly due to wrong...
Replace/Update tracker object inside custom action
No I couldn’t achieve it and had to abandon whatever I was doing.
Problem in invoking HTTP API to execute action from Postman app
I am trying to execute an action using HTTP API from the Postman app. I am storing my tracker using the PostgreSQL tracker store.
Rasa version used: 1.1.8
POST API: http://127.0.0.1:5005/conversations/myid/execute Header: Content-Type="application/json"
JSON body:
{
"name": "action_http"
}
...
How do you test Custom Actions before using them with a bot?
Hi @akelad. Can you give a link to the script that you have mentioned here? I also want to ensure my action classes don’t break due to some intermittent changes hence I want to write unit tests for them.
Feedback to Rasa bot
Hello @tyd. Thank you so much for your valuable insights. I will incorporate it in my project. You made me realize a serious blunder that I was trying to implement in my chatbot.
Failed to extract slot
Please go through the documentation of Form. You can use other methods like from_entity and from_intent in a chained manner. For reference please read rasa blog.
Feedback to Rasa bot
Can we give feedback to Rasa during the normal chat through some means and then use that feedback to train the bot next time? If I show a thumbs up/thumbs down icon and connect them to a custom action to store positive/negative feedback of the user in a database, can I use that data afterward to re...
Failed to extract slot
Where is your slot_mappings method in the FormAction class? That method is used to fill the slots from the user messages.
MappingPolicy doesn't get triggered
I cannot reproduce this issue right now. I have lowered my nlu_threshold to 0.5 and everything seems to work fine. Maybe the messages were not meeting the threshold at the time. Is there any way to find the optimal values of nlu and core threshold in Rasa based on the stories and nlu data?
[Solved]Retrieving conversation from Mongotrackerstore/Redistrackerstore and continuing with the previous conversation
Hi @JialiuXu, If you have given the details of tracker_store database in endpoints.yml, metadata of your conversation will get stored against the sender property that you use while sending messages to Rasa server.
{
"message": "Hi there!",
"sender": "JialiuXu"
}
This sender or rather sender_id...
Greedy intent?
If this helps, mark it as solution. A solved issue helps other newcomers to discern the posts easily.
Greedy intent?
Hello @sten, It seems you can use a FormAction here to capture the answer. Once the answer is captured, you can call process_action.
Form deactivation inside validate function
I deactivate my forms in the following way:
- Create a deactivate_intent with NLU data.
- Create a custom form_deactivation_action.
- Create a story for deactivation only using deactivate_intent and form_deactivation_action.
It is easy to create one single intent for all the cases where you want to inv...
Problem in retrieving an end-to-end story in HTTP API
I am using a normal tracker store using postgresql. Somehow this issue got resolved. If I face it again, I will let you know. Thanks.
Single line story is not performing good
@Ghostvv Can you explain a bit more on this?? Is the nlu confidence threshold mentioned somewhere in domain.yml?
Failed to extract slot
Your problem is very generic. Give us some code or details of your work to answer. Slot extraction can fail for a number of reasons. User may have not given the correct message. The NLU and Story data may not be supporting extraction of that particular slot. The slots definition may be missing auto...
Access to the sender name from rasa
If I pass another parameter friend in the message like this
{
"sender": "tony",
"message": "Hello",
"friend": "fuih"
}
Can I access the friend parameter from tracker just like we can access sender_id ?
Access to the sender name from rasa
So the conversation_id used in HTTP API is the same as sender_id.
Access to the sender name from rasa
Are the sender_id and the conversation_id the same thing?
Access to the sender name from rasa
I am using BotUI js for my UI. What are you using for creating the UI?
Access to the sender name from rasa
I was also facing issues in a similar vein. I resolved it using HTTP API. I created a slot to store the sender’s name and fired the above-mentioned API to set the slot as the first thing while starting the bot.
var http_set_event = "http://localhost:5005/conversations/tonysingh/tracker/events"
...
Slots for querying from a database
Yes looks good to me. Now from angular, you can hit the REST API http://localhost:5055/webhooks/rest/webhook with your messages in the following format:
{
"sender": "Sanjay",
"message": "Hi there!"
}
Problem in retrieving an end-to-end story in HTTP API
@btotharye Can you please look into this issue?
Slots for querying from a database
Even to access slots you need the tracker object in the run method of action class. To set the slot, you can return the event SlotSet("slot_name", "slot_value") from the custom action.
Slots for querying from a database
It will be invoked from the story you will write. The intent of the user message will invoke the particular story and your custom action will be invoked as a consequence.
pandas story
* ask_bill_amount
- action_calculate_bill_amount
Slots for querying from a database
I think console.py is not the right place to do such calculations. You can invoke a custom action and write your pandas logic there. Action class has a dispatcher that will enable you to dispatch the message to user. For integration with Angular you can use the webhook REST API. i.e. POST /webhooks...
Slots for querying from a database
If pandas part is over, then you can dispatch the bill amount to the user. What is your exact requirement with slots?
Handling API exceptions in Rasa action server
Can you put a log of your actions.py? That will help in better understanding of your issue.
Slots for querying from a database
Why do you want to use pandas when you can directly extract the details (e.g. bill amount) from the query result and dispatch it to the user as a message?
Handling API exceptions in Rasa action server
Inside the run method of your Action class, you can use requests to make an API call like this:
try:
log.debug(f'URL for API: {_url}')
resp = requests.get(_url)
except requests.exceptions.RequestException as e:
s = getattr(e,'message', str(e))
log.error(f'U...')
Handling API exceptions in Rasa action server
How are you making API calls from actions.py? If you are using the requests package, then it should be quite easy.
Problem in retrieving an end-to-end story in HTTP API
I am using HTTP API to obtain the story executed so far during a conversation.
http://localhost:5005/conversations/{conversation_id}/story When database details are present in endpoints.yml to save conversations in tracker store, fragments of the story obtained from the...
Single line story is not performing good
I am facing a similar issue. Rasa isn’t able to predict the action for the intent present in single line story and invokes the TwoStageFallbackPolicy. Policies in my config.yml is as follows:
policies:
- name: MemoizationPolicy
max_history: 3
- name: KerasPolicy
featurizer:
name: MaxHistoryTrail...
MappingPolicy doesn't get triggered
Actually I am pushing an action every time the chat session begins. This action was returning a blank event list. After I returned ActionReverted() in the event list, it seems to work. But now some of my short stories are not getting recognized and TwoStageFallbackPolicy is getting invoked.