tarikmenguc commited on
Commit
db7581d
·
1 Parent(s): 8050b37

Update validator.py

Browse files
Files changed (1) hide show
  1. agent/validator.py +11 -6
agent/validator.py CHANGED
@@ -234,7 +234,7 @@ Güven düzeyi: **{confidence}** — {confidence_note}
234
  # C.3: Startup Mezarlığı (Failure Check)
235
  # ──────────────────────────────────────────────
236
 
237
- def check_startup_graveyard(idea_summary: str, llm) -> str:
238
  """
239
  Küçük, erken aşama girişimlere odaklanarak benzer başarısız ürünleri arar.
240
  ProductHunt, Indie Hackers, HackerNews, BetaList öncelikli.
@@ -252,11 +252,12 @@ def check_startup_graveyard(idea_summary: str, llm) -> str:
252
  }
253
 
254
  # Çoklu sorgu stratejisi: küçük girişim odaklı, İngilizce
 
255
  queries = [
256
- f'small startup {idea_summary} failed shut down site:indiehackers.com OR site:news.ycombinator.com',
257
- f'{idea_summary} product "we are shutting down" OR "shutting down" OR "failed to get traction" indie',
258
- f'{idea_summary} SaaS startup failed "not enough customers" OR "runway" OR "couldn\'t find PMF" 2022 2023 2024',
259
- f'site:producthunt.com {idea_summary} discontinued OR abandoned OR "no longer available"',
260
  ]
261
 
262
  all_results = []
@@ -430,7 +431,11 @@ def validate_idea_node(state: Any) -> Any:
430
 
431
  # 5. Startup Mezarlığı (C.3)
432
  print("[Validator] ⚰️ Startup mezarlığı kontrol ediliyor...")
433
- graveyard_md = check_startup_graveyard(idea_summary, llm)
 
 
 
 
434
 
435
  # Tüm validation detaylarını birleştir
436
  competitor_note = f"{existing_competitors} rakip bulundu" if existing_competitors >= 0 else "rakip verisi alınamadı"
 
234
  # C.3: Startup Mezarlığı (Failure Check)
235
  # ──────────────────────────────────────────────
236
 
237
+ def check_startup_graveyard(idea_summary: str, llm, user_category: str = "", target_category: str = "") -> str:
238
  """
239
  Küçük, erken aşama girişimlere odaklanarak benzer başarısız ürünleri arar.
240
  ProductHunt, Indie Hackers, HackerNews, BetaList öncelikli.
 
252
  }
253
 
254
  # Çoklu sorgu stratejisi: küçük girişim odaklı, İngilizce
255
+ niche = target_category or user_category or idea_summary
256
  queries = [
257
+ f'small startup {niche} failed shut down site:indiehackers.com OR site:news.ycombinator.com',
258
+ f'{niche} product "we are shutting down" OR "shutting down" OR "failed to get traction" indie',
259
+ f'{niche} SaaS startup failed "not enough customers" OR "runway" OR "couldn\'t find PMF" 2022 2023 2024',
260
+ f'site:producthunt.com {niche} discontinued OR abandoned OR "no longer available"',
261
  ]
262
 
263
  all_results = []
 
431
 
432
  # 5. Startup Mezarlığı (C.3)
433
  print("[Validator] ⚰️ Startup mezarlığı kontrol ediliyor...")
434
+ graveyard_md = check_startup_graveyard(
435
+ idea_summary, llm,
436
+ user_category=state.get("user_category", ""),
437
+ target_category=state.get("target_category", ""),
438
+ )
439
 
440
  # Tüm validation detaylarını birleştir
441
  competitor_note = f"{existing_competitors} rakip bulundu" if existing_competitors >= 0 else "rakip verisi alınamadı"