Spaces:
Sleeping
Sleeping
Update main.py
Browse files
main.py
CHANGED
|
@@ -32,7 +32,7 @@ from reportlab.platypus import (
|
|
| 32 |
# ββ App Setup βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
app = FastAPI(
|
| 34 |
title="Intern Problem-Solving API",
|
| 35 |
-
description="
|
| 36 |
version="1.0.0",
|
| 37 |
)
|
| 38 |
|
|
@@ -360,11 +360,11 @@ def build_pdf(analysis: FullAnalysis, name: str, role: str) -> bytes:
|
|
| 360 |
fontSize=8, fontName="Helvetica", textColor=GRAY, alignment=1)
|
| 361 |
|
| 362 |
SECTIONS = [
|
| 363 |
-
("Problem
|
| 364 |
-
("Root Cause
|
| 365 |
("Solutions", analysis.solutions),
|
| 366 |
("Action Plan", analysis.action_plan),
|
| 367 |
-
("
|
| 368 |
]
|
| 369 |
|
| 370 |
def render_block(md_text: str) -> list:
|
|
@@ -481,11 +481,11 @@ def analyze_stream(body: ProblemInput):
|
|
| 481 |
|
| 482 |
def event_stream():
|
| 483 |
agents = [
|
| 484 |
-
("analyst", AGENT_ANALYST, "Problem
|
| 485 |
-
("root_cause", AGENT_ROOT_CAUSE, "Root Cause
|
| 486 |
-
("solutions", AGENT_SOLUTIONS, "
|
| 487 |
-
("action_plan", AGENT_ACTION_PLANNER, "Action
|
| 488 |
-
("thinking", AGENT_THINKING_COACH, "
|
| 489 |
]
|
| 490 |
|
| 491 |
context = {
|
|
|
|
| 32 |
# ββ App Setup βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
|
| 33 |
app = FastAPI(
|
| 34 |
title="Intern Problem-Solving API",
|
| 35 |
+
description="5-step pipeline: Analysis β Root Cause β Solutions β Action Plan β Reflection",
|
| 36 |
version="1.0.0",
|
| 37 |
)
|
| 38 |
|
|
|
|
| 360 |
fontSize=8, fontName="Helvetica", textColor=GRAY, alignment=1)
|
| 361 |
|
| 362 |
SECTIONS = [
|
| 363 |
+
("Problem Analysis", analysis.problem_statement),
|
| 364 |
+
("Root Cause", analysis.root_causes),
|
| 365 |
("Solutions", analysis.solutions),
|
| 366 |
("Action Plan", analysis.action_plan),
|
| 367 |
+
("Reflection", analysis.thinking_feedback),
|
| 368 |
]
|
| 369 |
|
| 370 |
def render_block(md_text: str) -> list:
|
|
|
|
| 481 |
|
| 482 |
def event_stream():
|
| 483 |
agents = [
|
| 484 |
+
("analyst", AGENT_ANALYST, "Problem Analysis"),
|
| 485 |
+
("root_cause", AGENT_ROOT_CAUSE, "Root Cause"),
|
| 486 |
+
("solutions", AGENT_SOLUTIONS, "Solutions"),
|
| 487 |
+
("action_plan", AGENT_ACTION_PLANNER, "Action Plan"),
|
| 488 |
+
("thinking", AGENT_THINKING_COACH, "Reflection"),
|
| 489 |
]
|
| 490 |
|
| 491 |
context = {
|