mirror of
https://github.com/aljazceru/Auto-GPT.git
synced 2025-12-18 14:34:23 +01:00
fix artifact bug
This commit is contained in:
@@ -65,9 +65,12 @@ async def copy_agent_artifacts_into_temp_folder(api_instance, task_id):
|
|||||||
# current absolute path of the directory of the file
|
# current absolute path of the directory of the file
|
||||||
directory_location = TEMP_FOLDER_ABS_PATH
|
directory_location = TEMP_FOLDER_ABS_PATH
|
||||||
if artifact.relative_path:
|
if artifact.relative_path:
|
||||||
directory_location = directory_location / artifact.relative_path
|
directory_location = os.path.dirname(directory_location / artifact.relative_path)
|
||||||
|
|
||||||
with open(directory_location / artifact.file_name, "wb") as f:
|
os.mkdir(directory_location, recursive=True, exist_ok=True)
|
||||||
|
|
||||||
|
file_path = directory_location / artifact.file_name
|
||||||
|
with open(file_path, "wb") as f:
|
||||||
content = await api_instance.download_agent_task_artifact(
|
content = await api_instance.download_agent_task_artifact(
|
||||||
task_id=task_id, artifact_id=artifact.artifact_id
|
task_id=task_id, artifact_id=artifact.artifact_id
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user