amitbhatt6075 commited on
Commit
daec218
·
1 Parent(s): 4c62cca

feat: Mock service blueprint response for free tier reliability

Browse files
Files changed (1) hide show
  1. core/strategist.py +33 -43
core/strategist.py CHANGED
@@ -451,56 +451,46 @@ TITLE:: """
451
 
452
  def generate_service_blueprint(self, service_type: str, requirements: str) -> Dict[str, Any]:
453
  """
454
- Analyzes user requirements and routes to the correct blueprint generator based on service_type.
 
455
  """
456
- print(f"--- Strategist Skill (Router): Received request for service type '{service_type}'.")
457
 
458
- # --- Router Logic ---
459
  if service_type == 'web-dev':
460
- # ✅ THE FIX: Simplified the prompt for the small model
461
- prompt = f"""
462
- [SYSTEM]
463
- You are a project planner. Create a simple plan for a WEBSITE based on the client's request.
464
- You MUST use this exact format, with each item on a new line:
465
- TITLE:: [Your Title Here]
466
- DELIVERABLES:: [Feature 1] | [Feature 2] | [Feature 3]
467
- STACK:: [Your Tech Stack]
468
- PRICE_EST:: [Your Price Estimate]
469
- TIMELINE:: [Your Timeline]
470
-
471
- [CLIENT REQUEST]
472
- - Service Type: {service_type}
473
- - Description: {requirements}
474
-
475
- [YOUR BLUEPRINT]
476
- TITLE:: """
477
- return self._get_ai_response_and_parse(prompt)
478
-
479
  elif service_type == 'growth':
480
- # This prompt is already quite simple, but we will make it safer
481
- prompt = f"""
482
- [SYSTEM]
483
- You are a Talent Manager creating a 3-month influencer management plan.
484
- You MUST use this exact format, with each item on a new line:
485
- TITLE:: [Your Title Here]
486
- DELIVERABLES:: [Service 1] | [Service 2] | [Service 3]
487
- STACK:: [Tools to be Used]
488
- PRICE_EST:: [Monthly Price]
489
- TIMELINE:: [Contract Term]
490
-
491
- [CLIENT REQUEST]
492
- - Service Type: {service_type}
493
- - Goals & Challenges: {requirements}
494
-
495
- [YOUR BLUEPRINT]
496
- TITLE:: """
497
- return self._get_ai_response_and_parse(prompt)
498
 
499
  else:
500
- print(f"--- Strategist Skill (Router) WARNING: Unknown service type '{service_type}'.")
501
  return {
502
- 'title': 'Unknown Service Type',
503
- 'deliverables': [f"The requested service '{service_type}' is not supported."],
504
  'stack': 'N/A', 'price_est': 'N/A', 'timeline': 'N/A'
505
  }
506
 
 
451
 
452
  def generate_service_blueprint(self, service_type: str, requirements: str) -> Dict[str, Any]:
453
  """
454
+ [MOCK MODE] Returns a static, well-formatted blueprint to ensure the UI works.
455
+ The AI model on the free tier is too weak to generate this reliably.
456
  """
457
+ print(f"--- Strategist Skill (MOCK MODE): Returning static blueprint for service type '{service_type}'.")
458
 
459
+ # Hum AI ko call hi nahi kar rahe. Hum ek manual, aacha sa jawaab bhej rahe hain.
460
  if service_type == 'web-dev':
461
+ return {
462
+ 'title': 'Custom Web Development Blueprint',
463
+ 'deliverables': [
464
+ 'Responsive UI/UX Design (Figma)',
465
+ 'Frontend Development with Next.js',
466
+ 'Backend API & Database Setup',
467
+ 'User Authentication System',
468
+ 'Deployment & Hosting Support'
469
+ ],
470
+ 'stack': 'Next.js, TailwindCSS, Supabase',
471
+ 'price_est': '$5,000 - $8,000',
472
+ 'timeline': '6-8 Weeks'
473
+ }
474
+
 
 
 
 
 
475
  elif service_type == 'growth':
476
+ return {
477
+ 'title': '3-Month Influencer Growth Plan',
478
+ 'deliverables': [
479
+ 'Weekly Content Strategy & Calendar',
480
+ 'Proactive Brand Outreach (5 brands/month)',
481
+ 'Monthly Performance Analytics Review',
482
+ 'Post Optimization & SEO'
483
+ ],
484
+ 'stack': 'Notion, YouTube Studio, Analytics Tools',
485
+ 'price_est': '$1,500 / month (Retainer)',
486
+ 'timeline': '3-Month Initial Term'
487
+ }
 
 
 
 
 
 
488
 
489
  else:
490
+ # Fallback agar koi aur service type aaye
491
  return {
492
+ 'title': 'Service Plan Not Found',
493
+ 'deliverables': [f"The requested service '{service_type}' is currently not supported."],
494
  'stack': 'N/A', 'price_est': 'N/A', 'timeline': 'N/A'
495
  }
496