Upload folder using huggingface_hub
Browse files
app.py
CHANGED
@@ -113,7 +113,11 @@ If the user is engaging in discussion, try to steer them towards getting in touc
|
|
113 |
return system_prompt
|
114 |
|
115 |
def chat(self, message, history):
|
116 |
-
messages = [{"role": "system", "content": self.system_prompt()}]
|
|
|
|
|
|
|
|
|
117 |
done = False
|
118 |
while not done:
|
119 |
response = self.openai.chat.completions.create(model="gpt-4o-mini", messages=messages, tools=tools)
|
|
|
113 |
return system_prompt
|
114 |
|
115 |
def chat(self, message, history):
|
116 |
+
messages = [{"role": "system", "content": self.system_prompt()}]
|
117 |
+
for user_msg, assistant_msg in history:
|
118 |
+
messages.append({"role": "user", "content": user_msg})
|
119 |
+
messages.append({"role": "assistant", "content": assistant_msg})
|
120 |
+
messages.append({"role": "user", "content": message})
|
121 |
done = False
|
122 |
while not done:
|
123 |
response = self.openai.chat.completions.create(model="gpt-4o-mini", messages=messages, tools=tools)
|