Spaces:
Sleeping
Sleeping
bradartigue
commited on
Commit
β’
48a9cb5
1
Parent(s):
cb4c6c0
Update app.py
Browse files
app.py
CHANGED
@@ -76,7 +76,7 @@ def delete_message(message_id,thread_id):
|
|
76 |
def process_query(query,thread_id):
|
77 |
|
78 |
retval = {"answer":""}
|
79 |
-
|
80 |
new_message = create_message(thread_id,query)
|
81 |
run =run_thread(thread_id,openai_assistant_id)
|
82 |
|
@@ -90,7 +90,6 @@ def process_query(query,thread_id):
|
|
90 |
# kills the source reference in the response, if there
|
91 |
regex_pattern = r"γ.*?γ"
|
92 |
scrubbed_answer = re.sub(regex_pattern, '', answer)
|
93 |
-
scrubbed_answer = scrubbed_answer.replace('Mater','Matter')
|
94 |
retval = {"answer":scrubbed_answer}
|
95 |
|
96 |
return retval
|
|
|
76 |
def process_query(query,thread_id):
|
77 |
|
78 |
retval = {"answer":""}
|
79 |
+
query = "Answer the user's question in " + str(max_response_length) + " words or less: '" + query + "'"
|
80 |
new_message = create_message(thread_id,query)
|
81 |
run =run_thread(thread_id,openai_assistant_id)
|
82 |
|
|
|
90 |
# kills the source reference in the response, if there
|
91 |
regex_pattern = r"γ.*?γ"
|
92 |
scrubbed_answer = re.sub(regex_pattern, '', answer)
|
|
|
93 |
retval = {"answer":scrubbed_answer}
|
94 |
|
95 |
return retval
|