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
returnf"The following is a conversation with an AI assistant. The assistant understands all languages. The assistant gives short and factual answers. {s}"
33
-
34
-
@property
35
-
defchat_history(self):
28
+
defget_chat_history(self, persona=None):
36
29
# TODO - intro question from skill settings
37
30
intro_q= ("Hello, who are you?", "I am an AI created by OpenAI. How can I help you today?")
38
31
iflen(self.qa_pairs) >self.max_utts:
39
32
qa= [intro_q] +self.qa_pairs[-1*self.max_utts:]
40
33
else:
41
34
qa= [intro_q] +self.qa_pairs
42
-
chat=self.initial_prompt.strip() +"\n\n"
35
+
36
+
persona=personaorself.config.get("persona") or"helpful, creative, clever, and very friendly."
37
+
initial_prompt=f"The following is a conversation with an AI assistant. " \
38
+
f"The assistant understands all languages. " \
39
+
f"The assistant gives short and factual answers. " \
0 commit comments