cowrycode commited on
Commit
da822a9
·
verified ·
1 Parent(s): 1eb7123

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -3
app.py CHANGED
@@ -26,13 +26,13 @@ class BasicAgent:
26
 
27
  async def run(self, question: str) -> str:
28
  print(f"Agent received question (first 50 chars): {question[:50]}...")
29
- answer = await self.llamaindex_agent.run(question)
30
  print(f"Agent returning answer: {answer}")
31
  return answer
32
 
33
  def __call__(self, question: str) -> str:
34
- #return self.run(question)
35
- return asyncio.run(smart_agent(question, self.api_key))
36
  #print(f"Agent received question (first 50 chars): {question[:50]}...")
37
  #fixed_answer = "This is a default answer."
38
  #fixed_answer = self.llamaindex_agent.run(question)
 
26
 
27
  async def run(self, question: str) -> str:
28
  print(f"Agent received question (first 50 chars): {question[:50]}...")
29
+ answer = await asyncio.run(smart_agent(question, self.api_key))
30
  print(f"Agent returning answer: {answer}")
31
  return answer
32
 
33
  def __call__(self, question: str) -> str:
34
+ return self.run(question)
35
+ #return asyncio.run(smart_agent(question, self.api_key))
36
  #print(f"Agent received question (first 50 chars): {question[:50]}...")
37
  #fixed_answer = "This is a default answer."
38
  #fixed_answer = self.llamaindex_agent.run(question)