Update app.py
Browse files
app.py
CHANGED
|
@@ -36,7 +36,7 @@ class BasicAgent:
|
|
| 36 |
input_state = {"question": question}
|
| 37 |
# Run the graph
|
| 38 |
answer = self.graph.invoke(input_state)
|
| 39 |
-
print(f"Agent returning fixed answer: {answer
|
| 40 |
return answer
|
| 41 |
|
| 42 |
class State(TypedDict):
|
|
@@ -96,7 +96,7 @@ def generate_answer(state):
|
|
| 96 |
answer = llm.invoke([SystemMessage(content=final_instruction)] + [HumanMessage(content=f"Answer the question: {question}")])
|
| 97 |
|
| 98 |
# Append it to state
|
| 99 |
-
return {"answer": answer}
|
| 100 |
|
| 101 |
|
| 102 |
builder = StateGraph(State)
|
|
|
|
| 36 |
input_state = {"question": question}
|
| 37 |
# Run the graph
|
| 38 |
answer = self.graph.invoke(input_state)
|
| 39 |
+
print(f"Agent returning fixed answer: {answer}")
|
| 40 |
return answer
|
| 41 |
|
| 42 |
class State(TypedDict):
|
|
|
|
| 96 |
answer = llm.invoke([SystemMessage(content=final_instruction)] + [HumanMessage(content=f"Answer the question: {question}")])
|
| 97 |
|
| 98 |
# Append it to state
|
| 99 |
+
return {"answer": answer.content}
|
| 100 |
|
| 101 |
|
| 102 |
builder = StateGraph(State)
|