Update app.py
Browse files
app.py
CHANGED
|
@@ -122,11 +122,12 @@ def call_gpt5_for_metadata(title: str, short_text: str, top_chunks: List[str]) -
|
|
| 122 |
# Call using new client
|
| 123 |
try:
|
| 124 |
resp = client.chat.completions.create(
|
| 125 |
-
|
| 126 |
-
|
| 127 |
-
|
| 128 |
-
|
| 129 |
-
|
|
|
|
| 130 |
except Exception as e:
|
| 131 |
return {"_api_error": True, "error": f"OpenAI API call failed: {e}"}
|
| 132 |
|
|
|
|
| 122 |
# Call using new client
|
| 123 |
try:
|
| 124 |
resp = client.chat.completions.create(
|
| 125 |
+
model=LLM_MODEL,
|
| 126 |
+
messages=[{"role": "user", "content": prompt}],
|
| 127 |
+
max_completion_tokens=1500,
|
| 128 |
+
seed=42, # optional: for reproducibility
|
| 129 |
+
)
|
| 130 |
+
|
| 131 |
except Exception as e:
|
| 132 |
return {"_api_error": True, "error": f"OpenAI API call failed: {e}"}
|
| 133 |
|