Update app.py
Browse files
app.py
CHANGED
@@ -85,14 +85,14 @@ def respond(message, history: list[tuple[str, str]], system_message, max_tokens,
|
|
85 |
|
86 |
print(message)
|
87 |
|
88 |
-
is_law = client.
|
89 |
-
Do NOT respond with more than one word.
|
90 |
-
Question:
|
91 |
-
{message}""")
|
92 |
|
93 |
-
print(is_law)
|
94 |
|
95 |
-
if is_law.lower() != "other":
|
96 |
prompt = f"""Given the question and supporting documents below, give a comprehensive answer to the question.
|
97 |
Respond only to the question asked, response should be relevant to the question and in the same language as the question.
|
98 |
Provide the number of the source document when relevant, as well as the link to the document.
|
|
|
85 |
|
86 |
print(message)
|
87 |
|
88 |
+
# is_law = client.text_generation(f"""Given the user question below, classify it as either being about "Law" or "Other".
|
89 |
+
#Do NOT respond with more than one word.
|
90 |
+
#Question:
|
91 |
+
#{message}""")
|
92 |
|
93 |
+
# print(is_law)
|
94 |
|
95 |
+
if True: #is_law.lower() != "other":
|
96 |
prompt = f"""Given the question and supporting documents below, give a comprehensive answer to the question.
|
97 |
Respond only to the question asked, response should be relevant to the question and in the same language as the question.
|
98 |
Provide the number of the source document when relevant, as well as the link to the document.
|