superbrain-server 1.0.47 → 1.0.48
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -58,7 +58,7 @@ any products/places/tools mentioned, and the overall purpose of the page]
|
|
|
58
58
|
[N/A — web page]
|
|
59
59
|
|
|
60
60
|
📂 CATEGORY:
|
|
61
|
-
[Choose exactly ONE from: product, places,
|
|
61
|
+
[Choose exactly ONE from: product, places, food, software, book, tv shows, fitness, film, event, other]
|
|
62
62
|
|
|
63
63
|
Be specific and factual. Extract real names, numbers, and details from the content."""
|
|
64
64
|
|
|
@@ -369,12 +369,18 @@ def _fetch_medium(url: str, timeout: int) -> tuple[str, str, str, str, str] | No
|
|
|
369
369
|
r = requests.get(jina_url, headers={"Accept": "application/json"}, timeout=timeout)
|
|
370
370
|
r.raise_for_status()
|
|
371
371
|
data = r.json().get("data", {})
|
|
372
|
-
|
|
372
|
+
metadata = data.get("metadata", {})
|
|
373
|
+
title = data.get("title", "") or metadata.get("title", "")
|
|
373
374
|
text = data.get("content", "")
|
|
374
|
-
author = data.get("author", "")
|
|
375
|
-
image =
|
|
375
|
+
author = metadata.get("author", "") or metadata.get("article:author", "") or data.get("author", "")
|
|
376
|
+
image = metadata.get("og:image", "") or metadata.get("twitter:image:src", "")
|
|
377
|
+
post_date = metadata.get("article:published_time", "")
|
|
378
|
+
if post_date:
|
|
379
|
+
post_date = post_date[:10] # Just YYYY-MM-DD
|
|
380
|
+
if not image:
|
|
381
|
+
image = _get_favicon_url(url)
|
|
376
382
|
if text and len(text) > 200:
|
|
377
|
-
return title, text, image, author,
|
|
383
|
+
return title, text, image, author, post_date
|
|
378
384
|
print(" [medium] r.jina.ai returned too little text")
|
|
379
385
|
except Exception as e:
|
|
380
386
|
print(f" [medium] r.jina.ai failed: {e}")
|
|
@@ -45,7 +45,7 @@ identifiable background music, write "No background music". If it's voiceover
|
|
|
45
45
|
only, write "Voiceover only".]
|
|
46
46
|
|
|
47
47
|
📂 CATEGORY:
|
|
48
|
-
[Choose exactly ONE from: product, places,
|
|
48
|
+
[Choose exactly ONE from: product, places, food, software, book, tv shows, fitness, film, event, other]
|
|
49
49
|
|
|
50
50
|
Be specific, accurate, and extractive — pull out real names, numbers, and facts from the video."""
|
|
51
51
|
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"groq_gpt_oss_20b": {
|
|
3
3
|
"key": "groq_gpt_oss_20b",
|
|
4
|
-
"avg_response_s": 1.
|
|
5
|
-
"success_count":
|
|
4
|
+
"avg_response_s": 1.4180567239439565,
|
|
5
|
+
"success_count": 84,
|
|
6
6
|
"fail_count": 6,
|
|
7
7
|
"down_until": null,
|
|
8
|
-
"last_used": "2026-04-
|
|
8
|
+
"last_used": "2026-04-09T21:32:47.146221",
|
|
9
9
|
"last_error": null,
|
|
10
10
|
"base_priority": 0.5
|
|
11
11
|
},
|
package/payload/main.py
CHANGED
|
@@ -138,7 +138,7 @@ Generate a report in this EXACT format:
|
|
|
138
138
|
[Music/song name if found, or "No background music" or "Voiceover only"]
|
|
139
139
|
|
|
140
140
|
📂 CATEGORY:
|
|
141
|
-
[Choose ONE from: product, places,
|
|
141
|
+
[Choose ONE from: product, places, food, software, book, tv shows, fitness, film, event]
|
|
142
142
|
|
|
143
143
|
Be specific, concise, and actionable. Focus on useful information."""
|
|
144
144
|
|
|
@@ -251,7 +251,7 @@ def parse_summary(summary_text):
|
|
|
251
251
|
print(f"⚠️ Error parsing summary: {e}")
|
|
252
252
|
|
|
253
253
|
# Fallback: Auto-detect category if empty or unrecognised
|
|
254
|
-
valid_categories = {'product', 'places', '
|
|
254
|
+
valid_categories = {'product', 'places', 'software', 'book',
|
|
255
255
|
'tv shows', 'fitness', 'film', 'event', 'food', 'other'}
|
|
256
256
|
if not category or category not in valid_categories:
|
|
257
257
|
category = auto_detect_category(summary_text, title, summary, tags)
|
|
@@ -271,8 +271,7 @@ def auto_detect_category(summary_text, title, summary, tags):
|
|
|
271
271
|
category_keywords = {
|
|
272
272
|
'product': ['camera', 'device', 'gadget', 'tech', 'phone', 'laptop', 'review', 'unbox', 'product', 'dji', 'osmo', 'action cam'],
|
|
273
273
|
'places': ['travel', 'trip', 'visit', 'destination', 'village', 'city', 'mountain', 'beach', 'hotel', 'itinerary', 'sikkim', 'location'],
|
|
274
|
-
'
|
|
275
|
-
'food': ['food', 'meal', 'cuisine', 'restaurant', 'cafe', 'dining', 'eat'],
|
|
274
|
+
'food': ['food', 'meal', 'cuisine', 'restaurant', 'cafe', 'dining', 'eat', 'recipe', 'cooking', 'dish', 'ingredients', 'cook', 'bake'],
|
|
276
275
|
'software': ['app', 'software', 'code', 'programming', 'developer', 'api', 'python', 'javascript'],
|
|
277
276
|
'book': ['book', 'novel', 'author', 'read', 'literature', 'story', 'chapter'],
|
|
278
277
|
'fitness': ['workout', 'fitness', 'exercise', 'gym', 'training', 'muscle', 'cardio', 'yoga'],
|