dawid-lorek commited on
Commit
4946969
·
verified ·
1 Parent(s): 88afb7d

Update agent.py

Browse files
Files changed (1) hide show
  1. agent.py +2 -2
agent.py CHANGED
@@ -111,8 +111,8 @@ Rules:
111
  )
112
  async def answer_question(question: str) -> str:
113
  try:
114
- response = await agent.get_response_async(question)
115
- return response.message.content.strip() if hasattr(response.message, "content") else str(response.message)
116
  except Exception as e:
117
  print("❌ Agent error:", e)
118
  return "[ERROR] " + str(e)
 
111
  )
112
  async def answer_question(question: str) -> str:
113
  try:
114
+ result = await agent.run(question)
115
+ return result.strip()
116
  except Exception as e:
117
  print("❌ Agent error:", e)
118
  return "[ERROR] " + str(e)