save the elements tree in the prompt as an artifact (#353)

This commit is contained in:
LawyZheng
2024-05-22 13:10:27 +08:00
committed by GitHub
parent e6d4302d8c
commit 43823b6c6b
3 changed files with 9 additions and 1 deletions

View File

@@ -24,6 +24,7 @@ class ArtifactType(StrEnum):
VISIBLE_ELEMENTS_ID_XPATH_MAP = "visible_elements_id_xpath_map"
VISIBLE_ELEMENTS_TREE = "visible_elements_tree"
VISIBLE_ELEMENTS_TREE_TRIMMED = "visible_elements_tree_trimmed"
VISIBLE_ELEMENTS_TREE_IN_PROMPT = "visible_elements_tree_in_prompt"
# DEPRECATED. pls use HTML_SCRAPE or HTML_ACTION
HTML = "html"

View File

@@ -16,6 +16,7 @@ FILE_EXTENTSION_MAP: dict[ArtifactType, str] = {
ArtifactType.VISIBLE_ELEMENTS_ID_XPATH_MAP: "json",
ArtifactType.VISIBLE_ELEMENTS_TREE: "json",
ArtifactType.VISIBLE_ELEMENTS_TREE_TRIMMED: "json",
ArtifactType.VISIBLE_ELEMENTS_TREE_IN_PROMPT: "txt",
ArtifactType.HTML_SCRAPE: "html",
ArtifactType.HTML_ACTION: "html",
ArtifactType.TRACE: "zip",