Spaces:
Sleeping
Sleeping
Update agent.py
Browse files
agent.py
CHANGED
|
@@ -68,6 +68,10 @@ def youtube_transcript(video_url: str) -> str:
|
|
| 68 |
# 4. File Reading
|
| 69 |
@tool
|
| 70 |
def read_file(dir: str) -> str:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 71 |
extension = dir.split['.'][-1]
|
| 72 |
if extension == 'pdf':
|
| 73 |
reader = PdfReader(dir)
|
|
|
|
| 68 |
# 4. File Reading
|
| 69 |
@tool
|
| 70 |
def read_file(dir: str) -> str:
|
| 71 |
+
"""Read the content of the file
|
| 72 |
+
Args:
|
| 73 |
+
dir: the filepath
|
| 74 |
+
"""
|
| 75 |
extension = dir.split['.'][-1]
|
| 76 |
if extension == 'pdf':
|
| 77 |
reader = PdfReader(dir)
|