Update app.py
Browse files
app.py
CHANGED
|
@@ -89,7 +89,9 @@ class GaiaSmolAgent:
|
|
| 89 |
|
| 90 |
Now, write the Python script to answer the user's question.
|
| 91 |
"""
|
| 92 |
-
|
|
|
|
|
|
|
| 93 |
|
| 94 |
# Clean up the response from the LLM, which sometimes wraps it in markdown
|
| 95 |
if "```python" in response:
|
|
|
|
| 89 |
|
| 90 |
Now, write the Python script to answer the user's question.
|
| 91 |
"""
|
| 92 |
+
# The generate method expects a list of message dictionaries, not a raw string.
|
| 93 |
+
messages = [{"role": "user", "content": prompt}]
|
| 94 |
+
response = self.planner_model.generate(messages)
|
| 95 |
|
| 96 |
# Clean up the response from the LLM, which sometimes wraps it in markdown
|
| 97 |
if "```python" in response:
|