Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -2531,10 +2531,10 @@ def refine_query(query: str, openai_api_key: str, reportstyle: str) -> str:
|
|
| 2531 |
if not query:
|
| 2532 |
logging.info("refine_query: Empty query provided.")
|
| 2533 |
return ""
|
| 2534 |
-
prompt = f"""Reformulate the following research query
|
| 2535 |
Use this following style: {reportstyle}
|
| 2536 |
The result should be a string of text, without any quotation mark before and after - Only the updated and refined version of the query, nothing else."""
|
| 2537 |
-
refined = llm_call(prompt, model="gpt-4o-mini", temperature=0, max_tokens_param=
|
| 2538 |
logging.info(f"refine_query: Refined query: {refined}")
|
| 2539 |
return refined
|
| 2540 |
|
|
|
|
| 2531 |
if not query:
|
| 2532 |
logging.info("refine_query: Empty query provided.")
|
| 2533 |
return ""
|
| 2534 |
+
prompt = f"""Reformulate the following research query: '{query}'
|
| 2535 |
Use this following style: {reportstyle}
|
| 2536 |
The result should be a string of text, without any quotation mark before and after - Only the updated and refined version of the query, nothing else."""
|
| 2537 |
+
refined = llm_call(prompt, model="gpt-4o-mini", temperature=0, max_tokens_param=100)
|
| 2538 |
logging.info(f"refine_query: Refined query: {refined}")
|
| 2539 |
return refined
|
| 2540 |
|