From 227f82a718bb319934e470d6fe947549b86d0c68 Mon Sep 17 00:00:00 2001 From: Victor Giers Date: Fri, 8 May 2026 03:14:43 +0200 Subject: [PATCH] Format notes using title, description, and concept fields in prior_art --- concept_api.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/concept_api.py b/concept_api.py index bc664d8..7cf5a07 100644 --- a/concept_api.py +++ b/concept_api.py @@ -1279,6 +1279,16 @@ def generate_concept(payload: Dict[str, Any]) -> Dict[str, Any]: def prior_art(payload: Dict[str, Any]) -> Dict[str, Any]: notes = (payload.get("notes") or "").strip() + if not notes: + notes = "\n\n".join( + part + for part in ( + f"Title: {(payload.get('title') or '').strip()}" if (payload.get("title") or "").strip() else "", + f"Description: {(payload.get('description') or '').strip()}" if (payload.get("description") or "").strip() else "", + (payload.get("concept") or "").strip(), + ) + if part + ) files = payload.get("files") or [] websites = payload.get("websites") or [] host = payload.get("ollama_host") or "http://localhost:11434"