You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generates a structured API request for the AI model based on YARA scan results.
47
+
48
+
Args:
49
+
None
50
+
51
+
Returns:
52
+
dict:
53
+
- A dictionary containing the structured payload for the AI model.
54
+
- The payload includes:
55
+
- System and user messages with formatting based on terminal support.
56
+
- YARA scan results formatted for analysis.
57
+
- Model selection (`EleutherAI/gpt-j-6B`) for accurate responses.
58
+
- A fixed seed value (`42`) to ensure deterministic output.
59
+
"""
60
+
61
+
# Define prompt for AI model - plaintext for basic terminals and markdown for advanced terminals
62
+
plaintext_prompt="""
63
+
Format responses as plain text with concise paragraphs and line breaks, ensuring maximum compatibility with all terminal environments.
64
+
Avoid any Markdown, JSON, or structured formatting—just simple, unadorned text.
65
+
"""
66
+
markdown_prompt="""
67
+
Format responses with rich Markdown formatting to enhance clarity, structure, and visual appeal.
68
+
Incorporate headings, bullet lists, code blocks, and other Markdown elements to produce well-organized, visually engaging output suitable for terminal display.
69
+
"""
70
+
71
+
# Payload varies depending on terminal support for advanced formatting
72
+
payload= {
73
+
"messages": [
74
+
{
75
+
"role": "system",
76
+
"content": (
77
+
"You are 'MORPHEUS_IQ', an advanced cybersecurity expert in malware analysis."
78
+
"Provide precise and actionable insights from IoCs and signature findings, avoiding speculation, repetition, or hallucinations."
79
+
"Keep responses short and terminal-friendly, summarizing only critical details for quick analysis."
0 commit comments