Update app.py
Browse files
app.py
CHANGED
@@ -419,9 +419,14 @@ Organize the result in JSON format as follows:
|
|
419 |
client = AsyncOpenAI()
|
420 |
|
421 |
messages = []
|
|
|
|
|
|
|
|
|
|
|
422 |
for limitation in limitations:
|
423 |
message=[
|
424 |
-
{"role": "system", "content":
|
425 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
426 |
]
|
427 |
messages.append(message)
|
|
|
419 |
client = AsyncOpenAI()
|
420 |
|
421 |
messages = []
|
422 |
+
if self.enable_rag:
|
423 |
+
SYSTEM_INPUT = "Read the following scientific paper, its limitation, and several relevant papers to gain knowledge of the relevant field. Using insights from the relevant papers, provide a highly specific and actionable suggestion to address the limitation in the paper to review. If suggesting an additional dataset, specify the exact dataset(s) by name. If proposing a methodological change, describe the specific modification. Keep the response within 50 words."
|
424 |
+
else:
|
425 |
+
SYSTEM_INPUT = "Read the following scientific paper and its limitation, and provide a highly specific and actionable suggestion to address the limitation. If suggesting an additional dataset, specify the exact dataset(s) by name. If proposing a methodological change, describe the specific modification. Keep the response within 50 words."
|
426 |
+
|
427 |
for limitation in limitations:
|
428 |
message=[
|
429 |
+
{"role": "system", "content": SYSTEM_INPUT},
|
430 |
{"role": "user", "content": f"{text}\nLimitation: {limitation}"},
|
431 |
]
|
432 |
messages.append(message)
|