skip llm artifact creation when empty prompt (#2742)
This commit is contained in:
@@ -586,15 +586,16 @@ 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)
|
||||||
|
|
||||||
await app.ARTIFACT_MANAGER.create_llm_artifact(
|
if prompt:
|
||||||
data=prompt.encode("utf-8") if prompt else b"",
|
await app.ARTIFACT_MANAGER.create_llm_artifact(
|
||||||
artifact_type=ArtifactType.LLM_PROMPT,
|
data=prompt.encode("utf-8"),
|
||||||
screenshots=screenshots,
|
artifact_type=ArtifactType.LLM_PROMPT,
|
||||||
step=step,
|
screenshots=screenshots,
|
||||||
task_v2=task_v2,
|
step=step,
|
||||||
thought=thought,
|
task_v2=task_v2,
|
||||||
ai_suggestion=ai_suggestion,
|
thought=thought,
|
||||||
)
|
ai_suggestion=ai_suggestion,
|
||||||
|
)
|
||||||
|
|
||||||
if not self.llm_config.supports_vision:
|
if not self.llm_config.supports_vision:
|
||||||
screenshots = None
|
screenshots = None
|
||||||
|
|||||||
Reference in New Issue
Block a user