Update app.py
Browse files
app.py
CHANGED
|
@@ -56,7 +56,15 @@ class BasicAgent:
|
|
| 56 |
|
| 57 |
def __call__(self, question: str) -> str:
|
| 58 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 59 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 60 |
print(f"Agent returning answer: {answer}")
|
| 61 |
return answer
|
| 62 |
|
|
|
|
| 56 |
|
| 57 |
def __call__(self, question: str) -> str:
|
| 58 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 59 |
+
|
| 60 |
+
messages = [
|
| 61 |
+
SystemMessage(content="You're a helpful assistant"),
|
| 62 |
+
HumanMessage(
|
| 63 |
+
content=question
|
| 64 |
+
),
|
| 65 |
+
]
|
| 66 |
+
|
| 67 |
+
answer = chat.invoke(messages)
|
| 68 |
print(f"Agent returning answer: {answer}")
|
| 69 |
return answer
|
| 70 |
|