Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -85,28 +85,29 @@ class HealthAgent:
|
|
85 |
cleaned_content = cleaned_content[:128000] + "\n\n[TRUNCATED]..."
|
86 |
|
87 |
prompt = f"""
|
88 |
-
You are
|
89 |
|
90 |
-
|
91 |
-
- Flash device failures or zero hit rates
|
92 |
-
- ORA-12170 or interconnect stalls
|
93 |
-
- Very high gc buffer busy waits
|
94 |
-
- IO stalls / disk saturation
|
95 |
-
- Redo log sync slowdowns
|
96 |
|
97 |
-
|
98 |
-
-
|
99 |
-
-
|
100 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
101 |
|
102 |
AWR CONTENT:
|
103 |
{cleaned_content}
|
104 |
"""
|
105 |
|
106 |
response = client.chat.completions.create(
|
107 |
-
model="gpt-4-turbo",
|
108 |
messages=[
|
109 |
-
{"role": "system", "content": "You are
|
110 |
{"role": "user", "content": prompt}
|
111 |
]
|
112 |
)
|
|
|
85 |
cleaned_content = cleaned_content[:128000] + "\n\n[TRUNCATED]..."
|
86 |
|
87 |
prompt = f"""
|
88 |
+
You are the Oracle AWR Health Analysis Agent.
|
89 |
|
90 |
+
Your primary responsibility is to detect and report any possible database health risks or failures from the AWR report.
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
You MUST:
|
93 |
+
- Identify all mentions of warnings, failures, critical issues, and alerts.
|
94 |
+
- Do not omit any mention of failure or warnings, even minor ones.
|
95 |
+
- Clearly classify them as CRITICAL, WARNING, or INFO.
|
96 |
+
- Provide suggested actions for CRITICAL and WARNING level issues.
|
97 |
+
- Always confirm at the end if no CRITICAL or WARNING issues were found.
|
98 |
+
|
99 |
+
You are NOT allowed to generalize or omit any issue, no matter how small.
|
100 |
+
|
101 |
+
If Flash Cache, I/O, Smart Scan, ASM, Redo log, or RAC interconnect issues are mentioned, they MUST be called out explicitly.
|
102 |
|
103 |
AWR CONTENT:
|
104 |
{cleaned_content}
|
105 |
"""
|
106 |
|
107 |
response = client.chat.completions.create(
|
108 |
+
model="gpt-4-turbo", # or "gpt-4o" if preferred/available
|
109 |
messages=[
|
110 |
+
{"role": "system", "content": "You are the strict Oracle AWR Health Analysis Agent."},
|
111 |
{"role": "user", "content": prompt}
|
112 |
]
|
113 |
)
|