Spaces:
Sleeping
Sleeping
Update app.py
Browse files
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
|
| 30 |
print(f"Agent returning answer: {answer}")
|
| 31 |
return answer
|
| 32 |
|
| 33 |
def __call__(self, question: str) -> str:
|
| 34 |
-
|
| 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)
|