Bug-Fixing Analyse Fehler #87
|
|
@ -1445,12 +1445,10 @@ from prompt_executor import execute_prompt_with_data
|
||||||
from models import UnifiedPromptCreate, UnifiedPromptUpdate
|
from models import UnifiedPromptCreate, UnifiedPromptUpdate
|
||||||
|
|
||||||
|
|
||||||
@router.post("/execute-stream")
|
@router.get("/execute-stream")
|
||||||
async def execute_unified_prompt_stream(
|
async def execute_unified_prompt_stream(
|
||||||
prompt_slug: str = Query(..., description="Slug of prompt to execute"),
|
prompt_slug: str = Query(..., description="Slug of prompt to execute"),
|
||||||
token: Optional[str] = Query(None, description="Auth token (temporary solution for SSE)"),
|
token: Optional[str] = Query(None, description="Auth token (temporary solution for SSE)"),
|
||||||
modules: Optional[dict] = None,
|
|
||||||
timeframes: Optional[dict] = None,
|
|
||||||
debug: bool = Query(False, description="Include debug information (node_states, etc.)"),
|
debug: bool = Query(False, description="Include debug information (node_states, etc.)"),
|
||||||
save: bool = Query(False, description="Save result to ai_insights")
|
save: bool = Query(False, description="Save result to ai_insights")
|
||||||
):
|
):
|
||||||
|
|
@ -1477,8 +1475,7 @@ async def execute_unified_prompt_stream(
|
||||||
raise HTTPException(401, "Invalid or expired token")
|
raise HTTPException(401, "Invalid or expired token")
|
||||||
profile_id = row['profile_id']
|
profile_id = row['profile_id']
|
||||||
|
|
||||||
# Use default modules/timeframes if not provided
|
# Use default modules/timeframes (SSE doesn't support complex params)
|
||||||
if not modules:
|
|
||||||
modules = {
|
modules = {
|
||||||
'körper': True,
|
'körper': True,
|
||||||
'ernährung': True,
|
'ernährung': True,
|
||||||
|
|
@ -1487,7 +1484,6 @@ async def execute_unified_prompt_stream(
|
||||||
'vitalwerte': True
|
'vitalwerte': True
|
||||||
}
|
}
|
||||||
|
|
||||||
if not timeframes:
|
|
||||||
timeframes = {
|
timeframes = {
|
||||||
'körper': 30,
|
'körper': 30,
|
||||||
'ernährung': 30,
|
'ernährung': 30,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user