Update llm_only_agent.py
Browse files- llm_only_agent.py +2 -2
llm_only_agent.py
CHANGED
|
@@ -12,7 +12,7 @@ class LLMOnlyAgent:
|
|
| 12 |
)
|
| 13 |
|
| 14 |
# Code Agent
|
| 15 |
-
agent = CodeAgent(
|
| 16 |
model=model,
|
| 17 |
tools=[FinalAnswerTool()],
|
| 18 |
max_steps=2
|
|
@@ -21,6 +21,6 @@ class LLMOnlyAgent:
|
|
| 21 |
print("BasicAgent initialized.")
|
| 22 |
def __call__(self, question: str) -> str:
|
| 23 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 24 |
-
answer = agent.run(question)
|
| 25 |
print(f"Agent returning answer: {answer}")
|
| 26 |
return answer
|
|
|
|
| 12 |
)
|
| 13 |
|
| 14 |
# Code Agent
|
| 15 |
+
self.agent = CodeAgent(
|
| 16 |
model=model,
|
| 17 |
tools=[FinalAnswerTool()],
|
| 18 |
max_steps=2
|
|
|
|
| 21 |
print("BasicAgent initialized.")
|
| 22 |
def __call__(self, question: str) -> str:
|
| 23 |
print(f"Agent received question (first 50 chars): {question[:50]}...")
|
| 24 |
+
answer = self.agent.run(question)
|
| 25 |
print(f"Agent returning answer: {answer}")
|
| 26 |
return answer
|