Spaces:
Sleeping
Sleeping
Update app/services/llm_engine.py
Browse files
app/services/llm_engine.py
CHANGED
|
@@ -234,14 +234,16 @@ class LLMEngine:
|
|
| 234 |
|
| 235 |
# 5. EXECUTE LLM
|
| 236 |
try:
|
| 237 |
-
|
|
|
|
| 238 |
messages=messages,
|
| 239 |
model="llama-3.1-8b-instant",
|
| 240 |
temperature=0.6
|
| 241 |
)
|
| 242 |
-
return
|
|
|
|
| 243 |
except Exception as e:
|
| 244 |
-
return f"Maaf, error sistem: {str(e)}"
|
| 245 |
|
| 246 |
async def analyze_psych_result(self, role: str, traits: list[str]):
|
| 247 |
"""
|
|
|
|
| 234 |
|
| 235 |
# 5. EXECUTE LLM
|
| 236 |
try:
|
| 237 |
+
# PENTING: Panggil _execute_with_retry, JANGAN self.client
|
| 238 |
+
response_content = await self._execute_with_retry(
|
| 239 |
messages=messages,
|
| 240 |
model="llama-3.1-8b-instant",
|
| 241 |
temperature=0.6
|
| 242 |
)
|
| 243 |
+
return response_content
|
| 244 |
+
|
| 245 |
except Exception as e:
|
| 246 |
+
return f"Maaf, error sistem: {str(e)}""
|
| 247 |
|
| 248 |
async def analyze_psych_result(self, role: str, traits: list[str]):
|
| 249 |
"""
|