robosage / monetization /affiliate_engine.py
mgbam's picture
Update monetization/affiliate_engine.py
a7d9947 verified
# affiliate_engine.py - Recommends monetizable robot gear and affiliate links
import random
# Static affiliate product catalog by robot app category
AFFILIATE_CATALOG = {
"educational": [
{"name": "Raspberry Pi 4 Kit", "url": "https://amzn.to/3EduBot"},
{"name": "Qobo Coding Robot", "url": "https://amzn.to/3KidsCode"}
],
"assistive": [
{"name": "Smart Sensor Kit", "url": "https://amzn.to/3AssistX"},
{"name": "OrCam MyEye Pro", "url": "https://amzn.to/OrCamEye"}
],
"retail": [
{"name": "Motion Detection Greeter Bot", "url": "https://amzn.to/RetailWave"},
{"name": "Pepper Robot", "url": "https://amzn.to/3RetailAI"}
],
"home automation": [
{"name": "Google Nest Hub", "url": "https://amzn.to/NestBot"},
{"name": "Arduino Smart Home Kit", "url": "https://amzn.to/ArduHome"}
],
"creative": [
{"name": "AI Art Robot Arm", "url": "https://amzn.to/CreativeArm"},
{"name": "Doodlebot Kit", "url": "https://amzn.to/DoodleAI"}
]
}
def get_affiliate_recommendations(intent_category: str) -> list:
items = AFFILIATE_CATALOG.get(intent_category, AFFILIATE_CATALOG["creative"])
return random.sample(items, k=min(2, len(items)))
# Example usage
if __name__ == "__main__":
print(get_affiliate_recommendations("educational"))