Rasa NLU response parsing error
See original GitHub issueHi
When trying to integrate RASA NLU, an exception is thrown when the NLU training set contains entities that are resolved.
(From the console): jaicf.activator.rasa.api.RasaApi - Cannot parse RasaParseMessageRequest(text=…, messageId=30eed22e-e5e8-4960-a979-6485d5295f45) kotlinx.serialization.MissingFieldException: Field ‘confidence’ is required, but it was missing
From RASA output (using rasa train shell), we see a structure like this:
{
"entity": "frequency",
"start": 9,
"end": 18,
"confidence_entity": 0.9578643441200256,
"value": "7",
"extractor": "DIETClassifier",
"processors": [
"EntitySynonymMapper"
]
}
But the mapping in RasaParseMessageResponse.kt contains:
@Serializable
data class Entity(
val start: Int,
val end: Int,
val confidence: Float,
val value: String,
val entity: String
)
Maybe the confidence field should be renamed ‘confidence_entity’ to map correctly the output?
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
Error in HTTP POST requests - RESTfulAPI - Rasa Open Source
Error: Failed when parsing body as json","reason":"ParsingError","details":{},"help":null,"code":500}. And I found this in the container ...
Read more >NLU server - ParsingError · Issue #4024 · RasaHQ/rasa - GitHub
The issue appears when I try to reach the "/model/parse" endpoint on the NLU server to get predictions. If the cURL command is...
Read more >Failed when parsing body as json - call Rasa API with request ...
I found the solution: Only need to use json.dumps() the object, because object in Python is different than object in json.
Read more >Cannot get intent from Rasa server - Rhasspy Voice Assistant
Hi! I installed rasa on the same directory that I have rhasspy and I started running the server. The problem is that I...
Read more >How to use the rasa.core.channels.channel.UserMessage ...
To help you get started, we've selected a few rasa.core.channels.channel. ... async def test_parsing(default_processor: MessageProcessor): message ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
We’ll definitely look into it when it’s released and when we are ready to move on the next major Kotlin release.
As for now, we will release 1.2.4 version with the fix in a few days.
Thanks!
We’ve added default
null
s to all nullable properties. Now Rasa model classes should fully conform official API Spec. To deal with custom classifier’s fields we’ve added additional propertyrawResponse
toRasaActivatorContext
in JAICF 1.2.3 release. So now you should be able to access all of the custom fields from response throughRasaActivatorContext#rawResponse
property and Kotlin extension properties can help to build a fluent API, hiding all underlying JSON manipulations. You can find sample test hereSo with such a fix I think using different classifiers won’t be a big problem, will it?