vtony commited on
Commit
230aeb3
·
verified ·
1 Parent(s): db80308

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +8 -4
app.py CHANGED
@@ -22,10 +22,14 @@ class BasicAgent:
22
  self.graph = agent_graph
23
  def __call__(self, question: str) -> str:
24
  print(f"Agent received question (first 50 chars): {question[:50]}...")
25
- # Create conversation history with system prompt
26
- messages = [SystemMessage(content=system_prompt),
27
- HumanMessage(content=question)]
28
-
 
 
 
 
29
  # Run the graph
30
  response = self.graph.invoke({"messages": messages})
31
 
 
22
  self.graph = agent_graph
23
  def __call__(self, question: str) -> str:
24
  print(f"Agent received question (first 50 chars): {question[:50]}...")
25
+ # Create initial state with system prompt
26
+ initial_state = {
27
+ "messages": [
28
+ SystemMessage(content=system_prompt),
29
+ HumanMessage(content=question)
30
+ ]
31
+ }
32
+
33
  # Run the graph
34
  response = self.graph.invoke({"messages": messages})
35