skip llm artifact creation when empty prompt (#2742)

This commit is contained in:
Shuchang Zheng
2025-06-18 07:44:10 -07:00
committed by GitHub
parent f6a0ccd32b
commit 5f26a02dea

View File

@@ -586,8 +586,9 @@ class LLMCaller:
tool["display_width_px"] = target_dimension["width"] tool["display_width_px"] = target_dimension["width"]
screenshots = resize_screenshots(screenshots, target_dimension) screenshots = resize_screenshots(screenshots, target_dimension)
if prompt:
await app.ARTIFACT_MANAGER.create_llm_artifact( await app.ARTIFACT_MANAGER.create_llm_artifact(
data=prompt.encode("utf-8") if prompt else b"", data=prompt.encode("utf-8"),
artifact_type=ArtifactType.LLM_PROMPT, artifact_type=ArtifactType.LLM_PROMPT,
screenshots=screenshots, screenshots=screenshots,
step=step, step=step,