artifact signed url (#190)

This commit is contained in:
Shuchang Zheng
2024-04-14 21:52:50 -07:00
committed by GitHub
parent dccdc7cca9
commit 7d5f0c8499
2 changed files with 4 additions and 0 deletions

View File

@@ -75,4 +75,5 @@ class Artifact(BaseModel):
description="The URI of the artifact.",
examples=["/Users/skyvern/hello/world.png"],
)
signed_url: str | None = None
organization_id: str | None = None

View File

@@ -399,6 +399,9 @@ async def get_agent_task_step_artifacts(
step_id,
organization_id=current_org.organization_id,
)
if SettingsManager.get_settings().ENV != "local":
for artifact in artifacts:
artifact.signed_url = await app.ARTIFACT_MANAGER.get_share_link(artifact)
return ORJSONResponse([artifact.model_dump() for artifact in artifacts])