Closed ruipfmendes closed 1 year ago
@ruipfmendes is it not necessary to add logic to the parser to return sentiment results?
@ruipfmendes is it not necessary to add logic to the parser to return sentiment results?
it seems that logic is already implemented in the parser here
I tested and got this result json in my logs which contains the sentiment_analysis_result
:
mod_dialogflow.c:26 json payload for type dialogflow::intent:
{
...
"query_result":{
...
"sentiment_analysis_result":{
"query_text_sentiment":{
"score":0.89999997615814209,
"magnitude":0.89999997615814209
}
},
...
}
Description
Why
What
StreamingDetectIntent request ( https://cloud.google.com/dialogflow/es/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.StreamingDetectIntentRequest ) allows sending query params:
The query parameters (see here: https://cloud.google.com/dialogflow/es/docs/reference/rpc/google.cloud.dialogflow.v2beta1#google.cloud.dialogflow.v2beta1.QueryParameters ) can allow to set fields such as sentiment_analysis_request_config (enables sentiment analysis)
Tests
dialogflow-project-id:environment:region
for example still worksdialogflow-project-id:environment:region:speakingRate:pitch:volume:voice-name:voice-gender:effect:sentiment-analysis