feat: Enhance prompt execution for workflows and analysis offers
Deploy Development / deploy (push) Successful in 48s
Build Test / pytest-backend (push) Successful in 4s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 16s

- Added support for handling aggregated results in workflow prompts, allowing for various data formats (string, object).
- Introduced a utility function to filter active prompts for both pipeline and workflow types in the analysis page.
- Updated content handling in the analysis component to accommodate new workflow data structures.

This improves the flexibility and usability of the prompt execution process in both backend and frontend components.
This commit is contained in:
Lars committed 2026-04-11 11:42:54 +02:00
1 parent 28b6fb28d5
commit 300d96a9d8
2 files changed
+32 -5

No files matched your search

+12
View File
@@ -1253,6 +1253,18 @@ async def execute_unified_prompt(
content = list(final_output.values())[0]
else:
content = json.dumps(final_output, ensure_ascii=False)
elif result['type'] == 'workflow':
# Graph-Workflows: kein "output", sondern aggregated_result
agg = result.get('aggregated_result')
if isinstance(agg, dict) and len(agg) == 1:
v = list(agg.values())[0]
content = v if isinstance(v, str) else json.dumps(v, ensure_ascii=False)
elif agg is None:
content = ''
elif isinstance(agg, str):
content = agg
else:
content = json.dumps(agg, ensure_ascii=False)
else:
# For base prompts, use output directly
content = result.get('output', '')