Spaces:
Running
Running
Bishmoy Paul commited on
Commit ·
874e1c1
1
Parent(s): 5da3da3
fix: python 3.11 parsing fix
Browse files
app.py
CHANGED
|
@@ -153,7 +153,8 @@ def split_prompt_for_chat(prompt):
|
|
| 153 |
if separator not in prompt:
|
| 154 |
return "", prompt.removesuffix("\n\nFinal answer:")
|
| 155 |
system_instruction, user_body = prompt.split(separator, 1)
|
| 156 |
-
|
|
|
|
| 157 |
|
| 158 |
def ask_groq_llm(prompt, model_name, stream_outputs):
|
| 159 |
if not groq_client:
|
|
|
|
| 153 |
if separator not in prompt:
|
| 154 |
return "", prompt.removesuffix("\n\nFinal answer:")
|
| 155 |
system_instruction, user_body = prompt.split(separator, 1)
|
| 156 |
+
user_body = user_body.removesuffix("\n\nFinal answer:")
|
| 157 |
+
return system_instruction, f"Source abstracts:\n{user_body}"
|
| 158 |
|
| 159 |
def ask_groq_llm(prompt, model_name, stream_outputs):
|
| 160 |
if not groq_client:
|