You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: app/models/agents/sentiment_value_agent.rb
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -3,30 +3,32 @@
3
3
moduleAgents
4
4
classSentimentValueAgent < Agent
5
5
description<<-MD
6
-
The SentimentValueAgent generates `good-bad` (psychological valence or happiness index),`active-passive` (arousal), and `strong-weak` (dominance) score. It will output a value between 1 and 9. Make sure the content this agent is running on have sufficient length.
7
-
Add more stuff
6
+
The SentimentValueAgent generates `good-bad` (psychological valence or happiness index), `active-passive` (arousal), and `strong-weak` (dominance) score. It will output a value between 1 and 9. Make sure the content this agent is analyzing have sufficient length to get respectable results.
7
+
8
+
Provide a JSONPath in `content` field where content is residing and set `expected_receive_period_in_days` to the maximum number of days you would allow to be passed between events being received by this agent.
8
9
MD
9
10
10
11
event_description<<-MD
11
12
Events look like:
12
13
{
13
-
:content => "The quick brown fox jumps over the lazy dog."
14
-
:valence => 6.199999
15
-
:arousal => 5.432212
16
-
:dominance => 4.346312
14
+
:content => "The quick brown fox jumps over the lazy dog.",
errors.add(:base,"content and expected_receive_period_in_days must be present")unlessoptions[:content].present? && options[:expected_receive_period_in_days].present?
0 commit comments