Artsem Radzevich commited on
Commit
2999752
·
1 Parent(s): d646ab7

Added agent.py for auto testing.

Browse files
Files changed (1) hide show
  1. agent.py +12 -0
agent.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ from agent_config import create_agent
2
+
3
+ class BasicAgent:
4
+ def __init__(self):
5
+ print("BasicAgent initialized.")
6
+ self.agent = create_agent()
7
+
8
+ def __call__(self, question: str) -> str:
9
+ try:
10
+ return self.agent.run(question)
11
+ except Exception as e:
12
+ return f"Error: {e}"