superbrain-server 1.0.45 → 1.0.47
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 +1 -1
- package/payload/analyzers/webpage_analyzer.py +22 -22
- package/payload/analyzers/youtube_analyzer.py +1 -1
- package/payload/config/model_rankings.json +20 -20
- package/payload/config/openrouter_free_models.json +1 -1
- package/payload/main.py +5 -4
- package/payload/requirements.txt +2 -2
- package/payload/start.py +1 -1
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, recipe, software, book, tv shows,
|
|
61
|
+
[Choose exactly ONE from: product, places, recipe, 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
|
|
|
@@ -287,8 +287,9 @@ def _fetch_reddit(url: str, timeout: int) -> tuple[str, str, str] | None:
|
|
|
287
287
|
|
|
288
288
|
# Proxies tried left-to-right; {url} is replaced with the full article URL.
|
|
289
289
|
_MEDIUM_PROXIES = [
|
|
290
|
-
"https://
|
|
291
|
-
"https://
|
|
290
|
+
"https://readmedium.com/en/{url}", # readmedium works
|
|
291
|
+
"https://scribe.rip/{url}", # scribe mirrors the article cleanly
|
|
292
|
+
"https://freedium.cfd/{url}", # alternative (sometimes down)
|
|
292
293
|
]
|
|
293
294
|
|
|
294
295
|
|
|
@@ -359,26 +360,25 @@ def _parse_proxy_page(html: str, orig_url: str) -> tuple[str, str, str]:
|
|
|
359
360
|
return title, "\n".join(lines), thumbnail, proxy_author, proxy_date
|
|
360
361
|
|
|
361
362
|
|
|
362
|
-
def _fetch_medium(url: str, timeout: int) -> tuple[str, str, str] | None:
|
|
363
|
-
|
|
364
|
-
Try each Medium proxy in order; return first successful result.
|
|
365
|
-
"""
|
|
363
|
+
def _fetch_medium(url: str, timeout: int) -> tuple[str, str, str, str, str] | None:
|
|
364
|
+
# Use r.jina.ai to cleanly extract Medium articles (bypasses Cloudflare).
|
|
366
365
|
import requests
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
366
|
+
try:
|
|
367
|
+
print(f" [medium] Fetching via r.jina.ai...")
|
|
368
|
+
jina_url = f"https://r.jina.ai/{url}"
|
|
369
|
+
r = requests.get(jina_url, headers={"Accept": "application/json"}, timeout=timeout)
|
|
370
|
+
r.raise_for_status()
|
|
371
|
+
data = r.json().get("data", {})
|
|
372
|
+
title = data.get("title", "")
|
|
373
|
+
text = data.get("content", "")
|
|
374
|
+
author = data.get("author", "")
|
|
375
|
+
image = data.get("image", "")
|
|
376
|
+
if text and len(text) > 200:
|
|
377
|
+
return title, text, image, author, ""
|
|
378
|
+
print(" [medium] r.jina.ai returned too little text")
|
|
379
|
+
except Exception as e:
|
|
380
|
+
print(f" [medium] r.jina.ai failed: {e}")
|
|
381
|
+
|
|
382
382
|
return None
|
|
383
383
|
|
|
384
384
|
|
|
@@ -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, recipe, software, book, tv shows,
|
|
48
|
+
[Choose exactly ONE from: product, places, recipe, 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.476613248725698,
|
|
5
|
+
"success_count": 81,
|
|
6
6
|
"fail_count": 6,
|
|
7
7
|
"down_until": null,
|
|
8
|
-
"last_used": "2026-04-
|
|
8
|
+
"last_used": "2026-04-09T18:25:59.312220",
|
|
9
9
|
"last_error": null,
|
|
10
10
|
"base_priority": 0.5
|
|
11
11
|
},
|
|
@@ -323,8 +323,8 @@
|
|
|
323
323
|
"key": "gemini_25_flash_lite_vision",
|
|
324
324
|
"avg_response_s": 6.709401964075168,
|
|
325
325
|
"success_count": 14,
|
|
326
|
-
"fail_count":
|
|
327
|
-
"down_until": "2026-04-
|
|
326
|
+
"fail_count": 25,
|
|
327
|
+
"down_until": "2026-04-09T18:29:31.449579",
|
|
328
328
|
"last_used": "2026-02-24T09:45:09.831171",
|
|
329
329
|
"last_error": "No module named 'google.generativeai'",
|
|
330
330
|
"base_priority": 1.5
|
|
@@ -333,8 +333,8 @@
|
|
|
333
333
|
"key": "gemini_25_pro_vision",
|
|
334
334
|
"avg_response_s": null,
|
|
335
335
|
"success_count": 0,
|
|
336
|
-
"fail_count":
|
|
337
|
-
"down_until": "2026-04-
|
|
336
|
+
"fail_count": 28,
|
|
337
|
+
"down_until": "2026-04-09T18:29:31.445576",
|
|
338
338
|
"last_used": null,
|
|
339
339
|
"last_error": "No module named 'google.generativeai'",
|
|
340
340
|
"base_priority": 2
|
|
@@ -353,8 +353,8 @@
|
|
|
353
353
|
"key": "gemini_3_pro_vision",
|
|
354
354
|
"avg_response_s": null,
|
|
355
355
|
"success_count": 0,
|
|
356
|
-
"fail_count":
|
|
357
|
-
"down_until": "2026-04-
|
|
356
|
+
"fail_count": 27,
|
|
357
|
+
"down_until": "2026-04-09T18:29:31.447577",
|
|
358
358
|
"last_used": null,
|
|
359
359
|
"last_error": "No module named 'google.generativeai'",
|
|
360
360
|
"base_priority": 3
|
|
@@ -363,8 +363,8 @@
|
|
|
363
363
|
"key": "gemini_31_pro_vision",
|
|
364
364
|
"avg_response_s": null,
|
|
365
365
|
"success_count": 0,
|
|
366
|
-
"fail_count":
|
|
367
|
-
"down_until": "2026-04-
|
|
366
|
+
"fail_count": 26,
|
|
367
|
+
"down_until": "2026-04-09T18:29:31.450615",
|
|
368
368
|
"last_used": null,
|
|
369
369
|
"last_error": "No module named 'google.generativeai'",
|
|
370
370
|
"base_priority": 3.5
|
|
@@ -373,8 +373,8 @@
|
|
|
373
373
|
"key": "gemini_20_flash_vision",
|
|
374
374
|
"avg_response_s": null,
|
|
375
375
|
"success_count": 0,
|
|
376
|
-
"fail_count":
|
|
377
|
-
"down_until": "2026-04-
|
|
376
|
+
"fail_count": 25,
|
|
377
|
+
"down_until": "2026-04-09T18:29:31.451578",
|
|
378
378
|
"last_used": null,
|
|
379
379
|
"last_error": "No module named 'google.generativeai'",
|
|
380
380
|
"base_priority": 4
|
|
@@ -383,8 +383,8 @@
|
|
|
383
383
|
"key": "gemini_20_flash_lite_vision",
|
|
384
384
|
"avg_response_s": null,
|
|
385
385
|
"success_count": 0,
|
|
386
|
-
"fail_count":
|
|
387
|
-
"down_until": "2026-04-
|
|
386
|
+
"fail_count": 25,
|
|
387
|
+
"down_until": "2026-04-09T18:29:31.453083",
|
|
388
388
|
"last_used": null,
|
|
389
389
|
"last_error": "No module named 'google.generativeai'",
|
|
390
390
|
"base_priority": 4.5
|
|
@@ -393,19 +393,19 @@
|
|
|
393
393
|
"key": "gemini_15_flash_vision",
|
|
394
394
|
"avg_response_s": null,
|
|
395
395
|
"success_count": 0,
|
|
396
|
-
"fail_count":
|
|
397
|
-
"down_until": "2026-04-
|
|
396
|
+
"fail_count": 25,
|
|
397
|
+
"down_until": "2026-04-09T18:29:31.455139",
|
|
398
398
|
"last_used": null,
|
|
399
399
|
"last_error": "No module named 'google.generativeai'",
|
|
400
400
|
"base_priority": 4.8
|
|
401
401
|
},
|
|
402
402
|
"groq_llama4_scout_vision": {
|
|
403
403
|
"key": "groq_llama4_scout_vision",
|
|
404
|
-
"avg_response_s": 1.
|
|
405
|
-
"success_count":
|
|
404
|
+
"avg_response_s": 1.528297446591561,
|
|
405
|
+
"success_count": 56,
|
|
406
406
|
"fail_count": 5,
|
|
407
407
|
"down_until": null,
|
|
408
|
-
"last_used": "2026-04-
|
|
408
|
+
"last_used": "2026-04-09T18:25:54.184988",
|
|
409
409
|
"last_error": null,
|
|
410
410
|
"base_priority": 5
|
|
411
411
|
},
|
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, recipe, software, book, tv shows,
|
|
141
|
+
[Choose ONE from: product, places, recipe, food, software, book, tv shows, fitness, film, event]
|
|
142
142
|
|
|
143
143
|
Be specific, concise, and actionable. Focus on useful information."""
|
|
144
144
|
|
|
@@ -252,7 +252,7 @@ def parse_summary(summary_text):
|
|
|
252
252
|
|
|
253
253
|
# Fallback: Auto-detect category if empty or unrecognised
|
|
254
254
|
valid_categories = {'product', 'places', 'recipe', 'software', 'book',
|
|
255
|
-
'tv shows', '
|
|
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)
|
|
258
258
|
|
|
@@ -271,10 +271,11 @@ 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
|
-
'recipe': ['recipe', 'cooking', '
|
|
274
|
+
'recipe': ['recipe', 'cooking', 'dish', 'ingredients', 'cook', 'bake'],
|
|
275
|
+
'food': ['food', 'meal', 'cuisine', 'restaurant', 'cafe', 'dining', 'eat'],
|
|
275
276
|
'software': ['app', 'software', 'code', 'programming', 'developer', 'api', 'python', 'javascript'],
|
|
276
277
|
'book': ['book', 'novel', 'author', 'read', 'literature', 'story', 'chapter'],
|
|
277
|
-
'
|
|
278
|
+
'fitness': ['workout', 'fitness', 'exercise', 'gym', 'training', 'muscle', 'cardio', 'yoga'],
|
|
278
279
|
'film': ['movie', 'film', 'cinema', 'actor', 'actress', 'director', 'trailer', 'premiere'],
|
|
279
280
|
'tv shows': ['series', 'episode', 'season', 'show', 'tv show', 'streaming', 'netflix'],
|
|
280
281
|
'event': ['event', 'concert', 'festival', 'conference', 'meetup', 'workshop', 'seminar']
|
package/payload/requirements.txt
CHANGED
|
@@ -15,13 +15,13 @@ google-genai>=0.8.0
|
|
|
15
15
|
# ── Web Page Fetching & Parsing ───────────────────────────────────────────────
|
|
16
16
|
beautifulsoup4>=4.12.0
|
|
17
17
|
trafilatura>=1.12.0
|
|
18
|
-
newspaper4k>=0.9.0
|
|
18
|
+
newspaper4k[nlp]>=0.9.0
|
|
19
19
|
lxml>=5.0.0
|
|
20
20
|
lxml_html_clean>=0.1.0
|
|
21
21
|
htmldate>=1.9.0
|
|
22
22
|
|
|
23
23
|
# ── Audio Transcription ───────────────────────────────────────────────────────
|
|
24
|
-
openai-whisper
|
|
24
|
+
# Note: openai-whisper is installed gracefully via start.py to handle ARM devices. DO NOT put it here.
|
|
25
25
|
|
|
26
26
|
# ── Music Identification ──────────────────────────────────────────────────────
|
|
27
27
|
shazamio>=0.4.0
|
package/payload/start.py
CHANGED