Thanh Vinh Vo
commited on
Commit
·
0bd09a3
1
Parent(s):
1754b4c
update
Browse files
app.py
CHANGED
|
@@ -124,11 +124,7 @@ class BasicAgent:
|
|
| 124 |
I am strong at:
|
| 125 |
- Writing code to solve problem.
|
| 126 |
- Browse the web to find information.
|
| 127 |
-
- Solving chess problems
|
| 128 |
-
I have access to the following python packages:
|
| 129 |
-
1. `wikipedia`: to interact with Wikipedia.
|
| 130 |
-
2. `pandas`: to extract structured data (such as tables) from HTML content.
|
| 131 |
-
3. `chess`: to solve chess problems.
|
| 132 |
""",
|
| 133 |
verbosity_level=0,
|
| 134 |
max_steps=10,
|
|
@@ -146,9 +142,13 @@ class BasicAgent:
|
|
| 146 |
"requests",
|
| 147 |
"bs4",
|
| 148 |
"markdownify",
|
|
|
|
| 149 |
"pandas",
|
| 150 |
"io",
|
| 151 |
"PIL",
|
|
|
|
|
|
|
|
|
|
| 152 |
"PIL.Image",
|
| 153 |
"bytes",
|
| 154 |
"cv2",
|
|
@@ -164,7 +164,12 @@ class BasicAgent:
|
|
| 164 |
prompt = f"""
|
| 165 |
Answer the following question:
|
| 166 |
"{question} {"The file name for this question is: " if has_file else ""} {question_id}"
|
| 167 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 168 |
"""
|
| 169 |
result = self.manager_agent.run(prompt)
|
| 170 |
print(f"Agent responded with: {result}")
|
|
|
|
| 124 |
I am strong at:
|
| 125 |
- Writing code to solve problem.
|
| 126 |
- Browse the web to find information.
|
| 127 |
+
- Solving chess problems.,
|
|
|
|
|
|
|
|
|
|
|
|
|
| 128 |
""",
|
| 129 |
verbosity_level=0,
|
| 130 |
max_steps=10,
|
|
|
|
| 142 |
"requests",
|
| 143 |
"bs4",
|
| 144 |
"markdownify",
|
| 145 |
+
"wikipedia",
|
| 146 |
"pandas",
|
| 147 |
"io",
|
| 148 |
"PIL",
|
| 149 |
+
"chess",
|
| 150 |
+
"img2text",
|
| 151 |
+
"chess.pgn",
|
| 152 |
"PIL.Image",
|
| 153 |
"bytes",
|
| 154 |
"cv2",
|
|
|
|
| 164 |
prompt = f"""
|
| 165 |
Answer the following question:
|
| 166 |
"{question} {"The file name for this question is: " if has_file else ""} {question_id}"
|
| 167 |
+
|
| 168 |
+
Please follow hints below:
|
| 169 |
+
1. `wikipedia` Python package is provided to interact with Wikipedia.
|
| 170 |
+
2. `pandas` Python package is provided. Please use it when there is need to extract structured data (such as tables) from HTML content.
|
| 171 |
+
3. `chess` Python package is provided. Please use it when there is need to solve chess problems.
|
| 172 |
+
4. Please take the question literally! Do not add any additional information or assumptions.
|
| 173 |
"""
|
| 174 |
result = self.manager_agent.run(prompt)
|
| 175 |
print(f"Agent responded with: {result}")
|