Spaces:
Runtime error
Runtime error
Download client_configs.py from buildbot5510/buildbot: direct link, hf CLI and curl.
- Browser
- Download file 14 kB
-
https://huggingface.co/spaces/buildbot5510/buildbot/resolve/main/client_configs.py
- Command line
-
hf download hf://spaces/buildbot5510/buildbot/client_configs.py
-
curl -L -o client_configs.py https://huggingface.co/spaces/buildbot5510/buildbot/resolve/main/client_configs.py
14 kB
| """ | |
| client_configs.py | |
| βββββββββββββββββ | |
| One entry per onboarded company. | |
| HOW TO ADD A NEW CLIENT | |
| 1. Copy an existing block below. | |
| 2. Set a unique `org_id` (must match what was saved during lead onboarding). | |
| 3. Set `client_type` β "apartment" | "house_construction" | "interior" | |
| 4. Fill in `knowledge_base` from the client's answered questionnaire. | |
| 5. List the tool names the bot is allowed to call in `enabled_tools`. | |
| 6. Optionally override `bot_name` and `closing_offer`. | |
| The server calls `get_config(org_id)` to retrieve a config at runtime. | |
| """ | |
| from typing import Any, Dict, Optional | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # CONFIG REGISTRY | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| CONFIGS: Dict[str, Dict[str, Any]] = { | |
| # ββ APARTMENT COMPANY ββββββββββββββββββββββββββββββββββββ | |
| "mathapathi": { | |
| "org_id": "mathapathi", | |
| "client_type": "apartment", | |
| "bot_name": "BuildCalc", | |
| "location": "Gunjur Club, Hobli, Road, Gunjur Village, Varthur, Bengaluru, Karnataka 560087", | |
| "closing_offer": ( | |
| "Would you like to schedule a free site visit? " | |
| "Please let me know what date and time works best for you!" | |
| ), | |
| "contacts": ( | |
| "Chetan Mathapathi: 900 849 8823 | " | |
| "Sachin Mathapathi: 900 849 8813 | " | |
| "Raju: 900 849 2627" | |
| ), | |
| "enabled_tools": ["calculate_apartment_cost"], | |
| "knowledge_base": """ | |
| === APARTMENT PROJECT β VERIFIED FACTS === | |
| LOCATION & ADDRESS | |
| Address: Gunjur Club, Hobli, Road, Gunjur Village, Varthur, Bengaluru, Karnataka 560087 | |
| CONFIGURATIONS & AREAS | |
| 2BHK | |
| - Carpet Area: 724 β 1,063 sq ft | |
| - Super Built-Up: 970 β 1,420 sq ft | |
| 3BHK | |
| - Carpet Area: 949 β 1,260 sq ft | |
| - Super Built-Up: 1,265 β 1,685 sq ft | |
| PROJECT STATUS | |
| Status: Ready to Move / Immediate Possession | |
| RERA Number: EX/PRM/KA/RERA/1251/446/PR/260120/005340 | |
| PRICING (ALL-INCLUSIVE, FULLY LOADED) | |
| Total Effective Price: Rs. 9,750 per sq ft (on Super Built-Up Area) | |
| What's Included in 9750/sqft: Base property cost, Fully Inclusive Interiors Package (Rs. 1000/sqft value), Car Parking, BESCOM, BWSSB, Generator, STP, Amenities, Development Charges, Rain Water Harvesting, and Khata Transfer. | |
| Maintenance: Rs. 3 per sq ft / month (post-possession) | |
| Additional / Extra Charges: GST, Stamp Duty, and Registration charges ONLY (as per actual government rates). | |
| PAYMENT PLAN | |
| Scheme: 80:20 | |
| SPECIAL OFFERS | |
| - Upcoming Gunjur Club Life Time Membership: COMPLIMENTARY | |
| FULLY INCLUSIVE INTERIORS & HOME APPLIANCES PACKAGE | |
| This is a fully loaded project. The price includes the following premium fit-outs: | |
| - Woodwork & Doors: Teak Wood Main Door & Frame, Shoe Rack, TV Wall Unit (with Havells LEDs), Wood Work in all Bedrooms, Wood work in Kitchen loft area, Crockery Unit. | |
| - Kitchen Setup: Granite Kitchen Slab, Granite Cladding above slab, Futura Brand Double Bowl Sink, Elica Brand HUB and Chimney. | |
| - Home Appliances: Zero B Water Purifier, IFB Dishwasher, IFB Front Load Washing Machine, Havells Geyser (Common Washroom), Solar Hot water (Master Washroom). | |
| - Electrical & Lighting: False Ceiling in Living & Dining Area (with LED lights), Havells Fans & Lights in all rooms, Exhaust fans in all restrooms. | |
| - Bath & Grooming: Jaguar Handwash Basins (3 Nos), Sensor Mirrors in all Restrooms, Dressing Mirror with Granite Top. | |
| - Safety & Utility: MS Safety Grill (Main Door & all Balconies), Mosquito Mesh for all Windows, Cloth Hangers (Balconies & Washrooms), SS Curtain Rods in all rooms. | |
| AMENITIES | |
| Swimming Pool, Party Hall, Children's Play Area, Gym, EV Charging, Walking Track. | |
| SPECIFICATIONS & LEGAL | |
| Vastu Compliant: Yes | |
| Water Source: Borewell (6 units) | |
| Title / Approval: A-Khata, RERA Approved | |
| Loans: Pre-approved by SBI, Indian Bank, Canara Bank, and all Nationalised Banks. | |
| NEIGHBORHOOD & PROXIMITY | |
| 1. EMPLOYMENT HUBS (IT Parks) | |
| - ITPB / Whitefield EPIP Zone: 20-30 mins (Off-Peak) | 40-60 mins (Peak) | |
| - RMZ Ecospace (Bellandur / ORR): 15-25 mins (Off-Peak) | 35-45 mins (Peak) | |
| - Embassy Tech Village: 35-45 mins (Off-Peak) | 50-60 mins (Peak) | |
| - RGA Tech Park: 15-20 mins (Off-Peak) | 25-30 mins (Peak) | |
| - Bagmane Solarium: 30-45 mins (Off-Peak) | 45-60 mins (Peak) | |
| 2. EDUCATIONAL INSTITUTIONS | |
| - Chrysalis High, Gunjur: 3-5 mins (CBSE / ICSE) | |
| - Tulip Kids School: 2-5 mins (Pre-Primary) | |
| - Global Indian Int. School (GIIS): 8-12 mins (CBSE) | |
| - Delhi Public School (DPS) East: 15-20 mins (CBSE) | |
| - Greenwood High International: 20-25 mins (IB / IGCSE) | |
| 3. HEALTHCARE | |
| - The Eye Foundation, Gunjur: 3-5 mins | |
| - Suraksha Multi Speciality: 8-12 mins (24/7) | |
| - Lakshmi Nursing Home: 10-15 mins (24/7) | |
| - Manipal Hospital, Varthur Rd: 10-15 mins (24/7 Tertiary Care) | |
| - Sakra World Hospital, ORR: 25-35 mins (24/7 Quaternary Care) | |
| 4. LIFESTYLE & DINING | |
| - Nusa Tropical Brewvilla: 2-5 mins (Bali-themed Microbrewery) | |
| - Junction Restaurant: 3-5 mins (North Indian/Family) | |
| - Chef Bakers, Varthur: 8-12 mins (Bakery/CafΓ©) | |
| - The Old Mill Brewing Co.: 10-15 mins (Continental) | |
| - Habba Kadal, Whitefield: 20-30 mins (Fine Dining) | |
| 5. CONNECTIVITY & TRANSIT | |
| - Nallur Halli Metro (Purple Line): 6.3 km | 15-20 mins | |
| - Carmelaram Railway Station: 6.0 km | 15-20 mins | |
| - Kadugodi Terminal Metro: ~8.0 km | 15-20 mins | |
| - Kundalahalli Metro: 6.6 km | 18-22 mins | |
| - Sri Sathya Sai Metro: 6.8 km | 20-25 mins | |
| """, | |
| # ββ BEHAVIOUR INSTRUCTIONS βββββββββββββββββββββββββββ | |
| "behaviour": """ | |
| - Answer all questions about configurations, pricing, amenities, location, proximity, and loans STRICTLY from the knowledge base. | |
| - PROJECT STATUS: Emphasize that the project is "Ready to Move" / ready for immediate possession. | |
| - PROACTIVE PITCH (All-Inclusive & Fully Loaded): Whenever pricing is discussed, enthusiastically explain that the rate is an "All-Inclusive" Rs. 9,750 per sq ft. Explicitly state that this covers the apartment, premium interiors, home appliances, car parking, and all developer/amenity charges (BESCOM, BWSSB, etc.). | |
| - PROACTIVE INFO (Offers): Highlight the "Complimentary Gunjur Club Lifetime Membership" to build value during the conversation. | |
| - PROACTIVE INFO (Loans): When discussing pricing or the 80:20 payment plan, explicitly mention that the project is pre-approved by SBI, Indian Bank, and Canara Bank. | |
| - PROACTIVE INFO (Location): If a user asks about "commute" or "family convenience," highlight the proximity to major hubs like RMZ Ecospace/RGA Tech Park and schools like Chrysalis High. | |
| - COST CALCULATION: Call `calculate_apartment_cost`. You MUST use the Total Effective Price of 9750 as the `rate_per_sqft`. | |
| - REMINDER: Always remind buyers that GST and Registration/Stamp Duty are the ONLY charges over and above the 9750/sqft base cost. No hidden fees for parking or amenities. | |
| - BOOKING BEHAVIOUR: If the user provides a date/time for a site visit, confirm it immediately: "Perfect! Your site visit is confirmed for [Date/Time]. Our team looks forward to welcoming you at the site." Do NOT tell them to call the contacts to schedule. | |
| - UNKNOWN INFO: If a detail isn't in the knowledge base, say: "I don't have that detail handy β our team can clarify during a site visit." | |
| - CLOSING: Offer the closing_offer after answering major inquiries or providing estimates. | |
| """, | |
| }, | |
| # ββ COMBINED: HOUSE CONSTRUCTION & INTERIOR ββββββββββββββ | |
| # ββ COMBINED: HOUSE CONSTRUCTION & INTERIOR ββββββββββββββ | |
| "timelybuilt": { | |
| "org_id": "timelybuilt", # Match this exactly with what you save in lead onboarding | |
| "client_type": "hybrid", | |
| "bot_name": "Timely Assistant", | |
| # 1. Updated to actively ask for the date and time | |
| "closing_offer": ( | |
| "Would you like to schedule a free site visit or consultation with our expert, Sumanth? " | |
| "Please let me know what date and time works best for you!" | |
| ), | |
| "contacts": "Sumanth Reddy: 8123899069 | Office: 239/2, 23rd Main, Judicial Layout, Bengaluru", | |
| "enabled_tools": [ | |
| "calculate_square_footage", | |
| "calculate_construction_estimate", | |
| "calculate_interior_estimate" | |
| ], | |
| "knowledge_base": """ | |
| === TIMELY BUILD β VERIFIED FACTS === | |
| GENERAL INFO | |
| Office Location : 239/2, 23rd main, 23rd Cross Rd, Judicial Layout, Bengaluru, Karnataka 560065 | |
| Point of Contact: Sumanth Reddy (8123899069) | |
| Services Offered: House Construction (G+1 and above) and Interior Design | |
| 1. CONSTRUCTION SERVICES | |
| Service Area : Bangalore North | |
| Base Price : Rs. 2,200 per sq ft (for G+1 and above) | |
| Minimum Budget : Rs. 50 Lakhs | |
| Discounts : Seasonal discount of Rs. 100/sqft available. Price negotiation limited to 0-1%. | |
| 2. INTERIOR DESIGN SERVICES | |
| Service Area : All over Bangalore | |
| Minimum Budget : Rs. 10 Lakhs | |
| Pricing (Ranges) : | |
| - Full Home: Rs. 800 β 1,800 per sq ft | |
| - Modular Kitchen: Rs. 1,200 β 2,500 per sq ft | |
| - Specific Rooms: Rs. 900 β 2,000 per sq ft | |
| TARGET AUDIENCE | |
| We cater to clients from all professions. No restrictions. | |
| """, | |
| "behaviour": """ | |
| - First, determine if the user is looking for Construction or Interiors. | |
| - PROACTIVE INFO (CONSTRUCTION): If they ask about construction, proactively tell them upfront that we serve Bangalore North, our highly competitive base price is Rs. 2,200/sqft, and we currently have a special seasonal discount of Rs. 100/sqft! Mention the Rs. 50 Lakh minimum budget. | |
| - PROACTIVE INFO (INTERIORS): If they ask about interiors, proactively mention that we serve ALL of Bangalore and take up projects starting from a Rs. 10 Lakh budget. | |
| - FOR CONSTRUCTION ESTIMATES: | |
| 1. Ask for plot dimensions or total sqft, and floors. | |
| 2. Call `calculate_square_footage` if dimensions are given. | |
| 3. Call `calculate_construction_estimate`. You MUST extract the base price (2200) from the knowledge base and pass it as `rate_per_sqft`. | |
| - FOR INTERIOR ESTIMATES: | |
| 1. Ask for total area (sqft) and scope (full home / kitchen only / specific rooms). | |
| 2. Call `calculate_interior_estimate`. You MUST extract the corresponding min and max pricing for their chosen scope from the knowledge base and pass them as `min_rate` and `max_rate`. | |
| - BOOKING BEHAVIOUR: If the user provides a preferred date and time for a visit or consultation, immediately confirm it by saying: "Perfect! Your consultation with Sumanth is confirmed for [Date/Time]. We look forward to discussing your project in detail." Do NOT ask them to call to schedule it. | |
| - If a question is outside the scope of the knowledge base, politely refer them to Sumanth Reddy. | |
| - After providing any estimate or giving project details, offer the closing_offer. | |
| """, | |
| }, | |
| "d2k": { | |
| "org_id": "d2k", | |
| "client_type": "independent_house", | |
| "bot_name": "BuildBot", | |
| "closing_offer": ( | |
| "Would you like to schedule a detailed consultation with our project head? " | |
| "Please share your preferred date and time!" | |
| ), | |
| "contacts": ( | |
| "Manjunath (Primary): 9845200716" | |
| ), | |
| "enabled_tools": ["calculate_construction_cost"], | |
| "knowledge_base": """ | |
| === CONSTRUCTION SERVICES β VERIFIED FACTS === | |
| SERVICE SCOPE | |
| - Primary Focus: Construction Only | |
| - Project Types: Residential buildings ranging from G+1 to G+4+ floors | |
| BASE PRICING ESTIMATES (Lump Sum) | |
| - G+1 Floor: βΉ35 Lakhs | |
| - G+2 Floors: βΉ50 Lakhs | |
| - G+3 Floors: βΉ75 Lakhs | |
| - G+4 Floors: βΉ1 Crore+ | |
| BUDGET CONSTRAINTS | |
| - Minimum Project Value: βΉ35 Lakhs (Construction) | |
| LOCATION & LOGISTICS | |
| - Service Areas: Open to all locations in Bengaluru (including North, South, East, West, and Central) | |
| - Target Audience: Open to all professions (No specific preference) | |
| NEGOTIATION & OFFERS | |
| - Price Flexibility: Open to negotiation up to a maximum of 5% | |
| - Seasonal Offers: Enabled (The bot is authorized to mention that seasonal discounts may apply) | |
| LEAD NETWORK | |
| - Open to cross-shared leads from the wider network | |
| """, | |
| "behaviour": """ | |
| - PRICING STRATEGY: Use the lump sum estimates (35L for G+1, 50L for G+2, etc.) as the primary reference for cost inquiries. | |
| - LOCATION: Confirm that we service all areas across Bengaluru. No locations are currently excluded. | |
| - BUDGET QUALIFICATION: If a user's project budget is below βΉ35 Lakhs, mention that our minimum commitment for construction starts at βΉ35 Lakhs. | |
| - NEGOTIATION: If a user asks for a discount, mention that there is room for minor negotiation (up to 5%) and that seasonal offers are occasionally available. | |
| - LEAD HANDOFF: Inform the user that Manjunath will be the primary point of contact for following up on technical discussions. | |
| - If a question is not covered (e.g., specific material brands or interior-only work), say: "I'll make a note of that for Manjunath to clarify during your consultation." | |
| """ | |
| } | |
| } | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| # PUBLIC API | |
| # βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ | |
| def get_config(org_id: str) -> Optional[Dict[str, Any]]: | |
| """ | |
| Returns the config for a given org_id, or None if not found. | |
| org_id must match exactly what was saved during lead onboarding. | |
| """ | |
| return CONFIGS.get(org_id) | |
| def list_orgs() -> list: | |
| """Returns all registered org IDs (useful for debugging).""" | |
| return list(CONFIGS.keys()) | |