Commit ·
4a8d3f6
1
Parent(s): efd0878
fixed issue with missing api_url
Browse files
agent.py
CHANGED
|
@@ -26,7 +26,9 @@ class Agent:
|
|
| 26 |
)
|
| 27 |
logger.info("BasicAgent initialized.")
|
| 28 |
|
| 29 |
-
def __call__(
|
|
|
|
|
|
|
| 30 |
logger.info(
|
| 31 |
f"Agent received question (first 50 chars): {question[:50]}..."
|
| 32 |
)
|
|
|
|
| 26 |
)
|
| 27 |
logger.info("BasicAgent initialized.")
|
| 28 |
|
| 29 |
+
def __call__(
|
| 30 |
+
self, question: str, task_id: str, file_name: str, api_url: str
|
| 31 |
+
) -> str:
|
| 32 |
logger.info(
|
| 33 |
f"Agent received question (first 50 chars): {question[:50]}..."
|
| 34 |
)
|
app.py
CHANGED
|
@@ -69,7 +69,7 @@ async def _run_agent_async(
|
|
| 69 |
loop = asyncio.get_running_loop()
|
| 70 |
async with semaphore:
|
| 71 |
answer = await loop.run_in_executor(
|
| 72 |
-
None, agent, question, task_id, file_name
|
| 73 |
) # execute in default thread‑pool
|
| 74 |
cache[str(task_id)] = answer
|
| 75 |
return task_id, answer
|
|
|
|
| 69 |
loop = asyncio.get_running_loop()
|
| 70 |
async with semaphore:
|
| 71 |
answer = await loop.run_in_executor(
|
| 72 |
+
None, agent, question, task_id, file_name, DEFAULT_API_URL
|
| 73 |
) # execute in default thread‑pool
|
| 74 |
cache[str(task_id)] = answer
|
| 75 |
return task_id, answer
|