Spaces:
Runtime error
Runtime error
fix get_text_representation_of_additional_file
Browse files
src/gaia_solving_agent/tools.py
CHANGED
|
@@ -53,7 +53,7 @@ async def get_text_representation_of_additional_file(ctx: Context) -> str :
|
|
| 53 |
if not isinstance(additional_file, Document):
|
| 54 |
return f"The additional file is not a LlamaIndex Document but a {type(additional_file)} object. I cannot get text representation, you should try other tool."
|
| 55 |
|
| 56 |
-
text_representation = additional_file.
|
| 57 |
if not text_representation:
|
| 58 |
return f"The additional {additional_file.__class__.__name__} file does not have any text content. I cannot get text representation, you should try other tool."
|
| 59 |
return text_representation
|
|
|
|
| 53 |
if not isinstance(additional_file, Document):
|
| 54 |
return f"The additional file is not a LlamaIndex Document but a {type(additional_file)} object. I cannot get text representation, you should try other tool."
|
| 55 |
|
| 56 |
+
text_representation = additional_file.get_content()
|
| 57 |
if not text_representation:
|
| 58 |
return f"The additional {additional_file.__class__.__name__} file does not have any text content. I cannot get text representation, you should try other tool."
|
| 59 |
return text_representation
|