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: src/main/java/net/b07z/sepia/server/core/data/Answer.java
+56-2Lines changed: 56 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,15 @@
14
14
15
15
importorg.json.simple.JSONObject;
16
16
17
+
/**
18
+
* This class contains all required info for answers given by the assistant.
19
+
* Answers can have a number of parameters like character (neutral, cool, ...), when to trigger (first time, first repetition, etc.)
20
+
* and many more. If you create a custom answer pool (e.g. inside a service) use this constructor to get a good set of parameters:<br>
21
+
* Answer(Language language, String type, String text, Character character, int repetition, int mood)
22
+
*
23
+
* @author Florian Quirin
24
+
*
25
+
*/
17
26
publicclassAnswer {
18
27
19
28
//database types to organize commands
@@ -42,26 +51,61 @@ public class Answer {
42
51
privateMap<String, Object> data; //any additional data we did not think of right now
43
52
privateStringdate;
44
53
54
+
/**
55
+
* Every answer can be assigned to a certain assistant 'character' like 'cool' or 'rude' (or 'neutral').
56
+
*/
45
57
publicenumCharacter {
46
58
neutral, rude, cool, polite
47
59
}
48
60
61
+
/**
62
+
* Usually you want to use another constructor: {@link Answer}(Language language, String type, String text, Character character, int repetition, int mood)
63
+
*/
49
64
publicAnswer() {
50
65
// needed for Jackson
51
66
}
52
67
68
+
/**
69
+
* Create an answer with default settings.
70
+
* @param language - language code for this answer
71
+
* @param type - answer key, basically an ID to find an answer in the pool
72
+
* @param text - actual answer (variables like <1>, <2> ... are supported)
* Usually you want to use another constructor: {@link Answer}(Language language, String type, String text, Character character, int repetition, int mood)
73
118
* @param isPublic is this visible for everybody, if not, it's a private answer
74
119
* @param isLocal is this run on the local home server?
0 commit comments