From 8aa08c590ccb063bf447c6bb6417ca9c7c204834 Mon Sep 17 00:00:00 2001 From: Pierre-Loic Doulcet Date: Tue, 10 Sep 2024 10:30:53 -0700 Subject: [PATCH] Update llama_parse/base.py Co-authored-by: Logan --- llama_parse/base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llama_parse/base.py b/llama_parse/base.py index 3ebf0ad..eb2aa27 100644 --- a/llama_parse/base.py +++ b/llama_parse/base.py @@ -419,8 +419,8 @@ async def _aget_json( result = await self._get_job_result(job_id, "json") result["job_id"] = job_id - if isinstance(file_path, str): - result["file_path"] = file_path + if not isinstance(file_path, (bytes, BufferedIOBase)): + result["file_path"] = str(file_path) return [result] except Exception as e: