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: bt_nodes/hri/src/hri/dialog/Query.cpp
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -47,10 +47,17 @@ void Query::on_tick()
47
47
std::string text_;
48
48
getInput("text", text_);
49
49
getInput("intention", intention_);
50
-
std::string prompt_ = "Given the sentence \"" + text_ + "\", extract the " + intention_ +
50
+
51
+
std::string prompt_ = "";
52
+
53
+
if(intention_.empty()){
54
+
prompt_= "You are a robot named Tiago who is participating in the Robocup with the Gentlebots team from Spain, made up of the Rey Juan Carlos University of Madrid and the University of León. Answer the following question: \"" + text_ + "\"";
55
+
}else{
56
+
prompt_ = "Given the sentence \"" + text_ + "\", extract the " + intention_ +
51
57
" from the sentence and return "
52
58
"it with the following JSON format:\n" +
53
59
"{\n\t\"intention\": \"word extracted in the sentence\"\n}";
0 commit comments