Spaces:
Running
Running
Commit ·
39d9102
1
Parent(s): 480df8c
Update app.py
Browse files
app.py
CHANGED
|
@@ -447,11 +447,11 @@ def compose_extractive(selected: List[Dict[str, Any]]) -> str:
|
|
| 447 |
|
| 448 |
def synthesize_with_llm(question: str, sentence_lines: List[str], model: str = None, temperature: float = 0.2) -> str:
|
| 449 |
if OPENAI_API_KEY is None or OpenAI is None:
|
| 450 |
-
|
| 451 |
return None
|
| 452 |
client = OpenAI(api_key=OPENAI_API_KEY)
|
| 453 |
model = model or OPENAI_MODEL
|
| 454 |
-
|
| 455 |
SYSTEM_PROMPT = (
|
| 456 |
"You are a scientific assistant for self-sensing cementitious materials.\n"
|
| 457 |
"Answer STRICTLY using the provided sentences.\n"
|
|
|
|
| 447 |
|
| 448 |
def synthesize_with_llm(question: str, sentence_lines: List[str], model: str = None, temperature: float = 0.2) -> str:
|
| 449 |
if OPENAI_API_KEY is None or OpenAI is None:
|
| 450 |
+
print("calling LLM api")
|
| 451 |
return None
|
| 452 |
client = OpenAI(api_key=OPENAI_API_KEY)
|
| 453 |
model = model or OPENAI_MODEL
|
| 454 |
+
print("using: ", model)
|
| 455 |
SYSTEM_PROMPT = (
|
| 456 |
"You are a scientific assistant for self-sensing cementitious materials.\n"
|
| 457 |
"Answer STRICTLY using the provided sentences.\n"
|