|
23 | 23 | VIEWPOINT_ANALYSIS_TEMPLATE, |
24 | 24 | ) |
25 | 25 | from utils.pydantic_models import Prompt, ResearchState |
26 | | -from zenml import log_metadata, step |
| 26 | +from zenml import add_tags, log_metadata, step |
27 | 27 | from zenml.types import HTMLString |
28 | 28 |
|
29 | 29 | logger = logging.getLogger(__name__) |
@@ -1092,6 +1092,9 @@ def pydantic_final_report_step( |
1092 | 1092 | logger.info( |
1093 | 1093 | "Final research report generated successfully with static template" |
1094 | 1094 | ) |
| 1095 | + # Add tags to the artifacts |
| 1096 | + add_tags(tags=["state", "final"], artifact="state") |
| 1097 | + add_tags(tags=["report", "html"], artifact="report_html") |
1095 | 1098 | return state, HTMLString(html_content) |
1096 | 1099 |
|
1097 | 1100 | # Otherwise use the LLM-generated approach |
@@ -1187,6 +1190,9 @@ def pydantic_final_report_step( |
1187 | 1190 | ) |
1188 | 1191 |
|
1189 | 1192 | logger.info("Final research report generated successfully") |
| 1193 | + # Add tags to the artifacts |
| 1194 | + add_tags(tags=["state", "final"], artifact="state") |
| 1195 | + add_tags(tags=["report", "html"], artifact="report_html") |
1190 | 1196 | return state, HTMLString(html_content) |
1191 | 1197 |
|
1192 | 1198 | except Exception as e: |
@@ -1245,4 +1251,7 @@ def pydantic_final_report_step( |
1245 | 1251 | infer_model=True, |
1246 | 1252 | ) |
1247 | 1253 |
|
| 1254 | + # Add tags to the artifacts |
| 1255 | + add_tags(tags=["state", "final"], artifact="state") |
| 1256 | + add_tags(tags=["report", "html"], artifact="report_html") |
1248 | 1257 | return state, HTMLString(fallback_html) |
0 commit comments