Spaces:
Sleeping
Sleeping
Kate Forsberg
commited on
Commit
·
2389189
1
Parent(s):
36d83b1
newE
Browse files
app.py
CHANGED
@@ -117,6 +117,9 @@ def build_agent(session_id:str,message:str) -> Agent:
|
|
117 |
),
|
118 |
Rule(
|
119 |
value="If you reformulate the query, then you must ask the user if they are 'Done' again."
|
|
|
|
|
|
|
120 |
)
|
121 |
]
|
122 |
)
|
@@ -163,8 +166,8 @@ def send_message(message:str, history, request:gr.Request) -> Any:
|
|
163 |
session_hash = request.session_hash
|
164 |
agent = build_agent(session_hash,message)
|
165 |
response = agent.run(message)
|
166 |
-
if re.search(r'\bdone[.,!?]?\b', message, re.IGNORECASE):
|
167 |
-
delete_json(session_hash)
|
168 |
return response.output.value
|
169 |
|
170 |
demo = gr.ChatInterface(
|
|
|
117 |
),
|
118 |
Rule(
|
119 |
value="If you reformulate the query, then you must ask the user if they are 'Done' again."
|
120 |
+
),
|
121 |
+
Rule(
|
122 |
+
value="If the user says they want to start over, then you must delete the conversation memory file."
|
123 |
)
|
124 |
]
|
125 |
)
|
|
|
166 |
session_hash = request.session_hash
|
167 |
agent = build_agent(session_hash,message)
|
168 |
response = agent.run(message)
|
169 |
+
#if re.search(r'\bdone[.,!?]?\b', message, re.IGNORECASE):
|
170 |
+
#delete_json(session_hash)
|
171 |
return response.output.value
|
172 |
|
173 |
demo = gr.ChatInterface(
|