Update api.py
Browse files
api.py
CHANGED
@@ -217,9 +217,9 @@ def extract_google_patents(patent_number: str, node_type: str = "Patent"):
|
|
217 |
logger.error(f"Failed to parse content for Patent ID {patent_number}: {e}")
|
218 |
|
219 |
# Generate summary with Gemini API if available and abstract exists
|
220 |
-
if
|
221 |
-
not
|
222 |
-
not
|
223 |
|
224 |
prompt = f"""You are a 3GPP standardization expert. Summarize the key information in the provided document in simple technical English relevant to identifying potential Key Issues.
|
225 |
Focus on challenges, gaps, or novel aspects.
|
|
|
217 |
logger.error(f"Failed to parse content for Patent ID {patent_number}: {e}")
|
218 |
|
219 |
# Generate summary with Gemini API if available and abstract exists
|
220 |
+
if patent_data["description"] and \
|
221 |
+
not patent_data["description"].startswith("Error fetching content") and \
|
222 |
+
not patent_data["description"].startswith("Description not found"):
|
223 |
|
224 |
prompt = f"""You are a 3GPP standardization expert. Summarize the key information in the provided document in simple technical English relevant to identifying potential Key Issues.
|
225 |
Focus on challenges, gaps, or novel aspects.
|