Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions src/robusta/core/reporting/holmes.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class HolmesChatResult(BaseModel):
files: Optional[List[FileBlock]] = None
tool_calls: Optional[List[ToolCallResult]] = None
conversation_history: Optional[List[dict]] = None
metadata: Optional[dict] = None


class HolmesChatResultsBlock(BaseBlock):
Expand Down
5 changes: 4 additions & 1 deletion src/robusta/core/sinks/robusta/dal/model_conversion.py
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,13 @@ def append_to_structured_files(files: List[FileBlock], structured_data) -> None:

@staticmethod
def add_ai_chat_data(structured_data: List[Dict], block: HolmesChatResultsBlock):
metadata = block.holmes_result.metadata or {} # type: ignore
metadata["type"] = "ai_investigation_result"
metadata["createdAt"] = datetime_to_db_str(datetime.now())
structured_data.append(
{
"type": "markdown",
"metadata": {"type": "ai_investigation_result", "createdAt": datetime_to_db_str(datetime.now())},
"metadata": metadata,
"data": Transformer.to_github_markdown(block.holmes_result.analysis),
}
)
Expand Down
Loading