Comments (11)
Maybe we can use the role
to create a unique variable name.
Example:
{name: "city", role: "departure"}
- the output will be
{"city_departure":{"value":"Berlin", "confidence": 0.9977127313613892}}
This will not a a breaking change but will not be obvious for a user, so we have to document it with big
from opsdroid.
I checked the rasanlu matcher and found the issue.
That's what happening:
- The entity extraction in rasanlu matcher is happening here
- which calls the entity update function
- which overwrites the key
city
inmessage.entities
This is common to Opsdroid in general, thatmessage.entities
is a dictionary. A dictionary cannot contain duplicate entries.
Any ideas how to fix this without breaking every skill depending on it?
from opsdroid.
Here's the test for it: oleg-fiksel@962ecfa
from opsdroid.
This will also apply, when using "groups" in Rasa.
from opsdroid.
I checked the rasanlu matcher and found the issue.
That's what happening:
- The entity extraction in rasanlu matcher is happening here
- which calls the entity update function
- which overwrites the key
city
inmessage.entities
This is common to Opsdroid in general, that
message.entities
is a dictionary. A dictionary cannot contain duplicate entries.Any ideas how to fix this without breaking every skill depending on it?
Well is it possible, that if we found multiple same entities we can return list of values & confidence?
from opsdroid.
I checked the rasanlu matcher and found the issue.
That's what happening:
- The entity extraction in rasanlu matcher is happening here
- which calls the entity update function
- which overwrites the key
city
inmessage.entities
This is common to Opsdroid in general, that
message.entities
is a dictionary. A dictionary cannot contain duplicate entries.
Any ideas how to fix this without breaking every skill depending on it?Well is it possible, that if we found multiple same entities we can return list of values & confidence?
Can you provide an example how will the result look like?
from opsdroid.
I checked the rasanlu matcher and found the issue.
That's what happening:
- The entity extraction in rasanlu matcher is happening here
- which calls the entity update function
- which overwrites the key
city
inmessage.entities
This is common to Opsdroid in general, that
message.entities
is a dictionary. A dictionary cannot contain duplicate entries.
Any ideas how to fix this without breaking every skill depending on it?Well is it possible, that if we found multiple same entities we can return list of values & confidence?
Can you provide an example how will the result look like?
yes, This is how it will look like.
{'city': {'value': ['Berlin', 'San Fransisco'], 'confidence': [0.9633104801177979, 0.7566294074058533]}}
from opsdroid.
I checked the rasanlu matcher and found the issue.
That's what happening:
- The entity extraction in rasanlu matcher is happening here
- which calls the entity update function
- which overwrites the key
city
inmessage.entities
This is common to Opsdroid in general, that
message.entities
is a dictionary. A dictionary cannot contain duplicate entries.
Any ideas how to fix this without breaking every skill depending on it?Well is it possible, that if we found multiple same entities we can return list of values & confidence?
Can you provide an example how will the result look like?
yes, This is how it will look like.
{'city': {'value': ['Berlin', 'San Fransisco'], 'confidence': [0.9633104801177979, 0.7566294074058533]}}
Ok, I understand. This is possible but it will be a change, which will most probably break every skill depending that value
is not an array. 😕
from opsdroid.
I tried to reproduce your issue but after some time figured out that I need to adjust intents.yml
.
version: "3.1"
intents:
- greetings
- bye
- help
- travel
entities:
- city:
roles:
- departure
- destination
nlu:
- intent: greetings
examples: |
- Hey
- Hi
- hey there
- hello
- intent: bye
examples: |
- googbye
- bye
- ciao
- see you
- intent: travel
examples: |
- I want to fly from [Berlin]{"entity": "city","role":"departure"} to [San Francisco]{"entity": "city","role":"destination"}
- I want to go from [Berlin]{"entity": "city","role":"departure"} to [San Francisco]{"entity": "city","role":"destination"}
- I want to travel from [Berlin]{"entity": "city","role":"departure"} to [San Francisco]{"entity": "city","role":"destination"}
In your intents.yml
nlu:
was missing and additional examples of intens.
https://docs.opsdroid.dev/en/stable/skills/matchers/rasanlu.html#example1
Note - Rasa NLU requires an intent to have at least three training examples in the list. There must also be a minimum of two intents in your file for Rasa to train.
😉
from opsdroid.
What Rasa version are you using and how do you run it?
from opsdroid.
What Rasa version are you using and how do you run it?
Rasa Version : 3.3.1 Minimum Compatible Version: 3.0.0 Rasa SDK Version : 3.3.0 Python Version : 3.9.15
well, I'm training rasa model separately with rasa. and then using this model in opsdroid.
In rasa,
we can simply use rasa train
command to train the model.
from opsdroid.
Related Issues (20)
- conversations.list getting caught with ratelimited error in v0.27/v0.28 (v0.26 is fine) HOT 2
- Compatibility with Rasa >= 3.0 HOT 1
- Docker build failing in CI
- Rasa intents multilanguage support
- Opsdroid exits with a weird error when Rasa is not reachable
- [maybe Matrix related] constraints.py, line 34, in constraint_callback 'NoneType' object has no attribute 'connector' HOT 2
- [Feature request] I would like to configure matchers through configuration.yaml
- Handle rate limits in slack connector method`search_history_messages`
- Idea for connector HOT 3
- Help with configure file HOT 4
- [python upgrade request]upgrade python to 3.11 HOT 4
- latency issue with multi-workspace slack channel
- Attachments in encrypted rooms are not automatically decrypted HOT 4
- Two Matrix connector tests fail on 'main' branch HOT 3
- Matrix connector is not correctly ignoring messages before the bot starts
- Putting room_ids in the matrix connector rooms config doesn't work
- Does opsdroid support respond to a message which is only visible to the user only? HOT 4
- Telegram Get Chat Id Issue
- Failed to change default editor for Windows HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opsdroid.