Spaces:
Sleeping
Sleeping
Kate Forsberg
commited on
Commit
·
318ef9e
1
Parent(s):
8adab59
prevent multiple arguments
Browse files
app.py
CHANGED
@@ -114,7 +114,7 @@ def build_agent(session_id:str,message:str) -> Agent:
|
|
114 |
value="Do not perform the query unless the user has said 'Done' with formulating."
|
115 |
),
|
116 |
Rule(
|
117 |
-
value="Only perform the query with the proper query structure."
|
118 |
),
|
119 |
Rule(
|
120 |
value="If you reformulate the query, then you must ask the user if they are 'Done' again."
|
@@ -161,11 +161,6 @@ def send_message(message:str, history, request:gr.Request) -> Any:
|
|
161 |
session_hash = request.session_hash
|
162 |
agent = build_agent(session_hash,message)
|
163 |
response = agent.run(message)
|
164 |
-
if "done" in message.lower():
|
165 |
-
try:
|
166 |
-
os.remove(f'{session_hash}.json')
|
167 |
-
except OSError as e:
|
168 |
-
pass
|
169 |
return response.output.value
|
170 |
|
171 |
demo = gr.ChatInterface(
|
|
|
114 |
value="Do not perform the query unless the user has said 'Done' with formulating."
|
115 |
),
|
116 |
Rule(
|
117 |
+
value="Only perform the query with the proper query structure as one string argument."
|
118 |
),
|
119 |
Rule(
|
120 |
value="If you reformulate the query, then you must ask the user if they are 'Done' again."
|
|
|
161 |
session_hash = request.session_hash
|
162 |
agent = build_agent(session_hash,message)
|
163 |
response = agent.run(message)
|
|
|
|
|
|
|
|
|
|
|
164 |
return response.output.value
|
165 |
|
166 |
demo = gr.ChatInterface(
|