sneaker-resell / tasks.py
shashankkandimalla
Add application file
5d23558
from crewai import Task
from textwrap import dedent
from datetime import datetime, timedelta
class SneakerTasks:
def __init__(self):
self.tip_section = "If you do your BEST WORK, I'll give you a $10,000 commission!"
def suggest_and_fetch_upcoming_shoes(self, agent, brand, gender):
current_date = datetime.now().date()
suggestion_date = current_date + timedelta(days=30) # Suggesting shoes to be released within 30 days
release_date = current_date + timedelta(days=30) # Assuming upcoming releases within the next 30 days
return Task(
description=dedent(
f"""
**Task**: Suggest New Shoes and Fetch Upcoming Release Information
**Description**: Identify and suggest eupcoming {brand} {gender} sneaker releases from {current_date} to {suggestion_date},
and gather information about upcoming {brand} sneaker releases expected by {release_date}.
**Parameters**:
- Brand: {brand}
- Gender: {gender}
**Note**: {self.tip_section}
"""
),
agent=agent,
expected_output=f"List of upcoming releases for {brand} {gender} sneakers within the next {suggestion_date} days , with insights on potential hot sellers and the current hype surrounding them.."
)
def estimate_resale_value(self, agent, brand):
return Task(
description=dedent(
f"""
**Task**: Estimate Sneaker Resale Value
**Description**: Analyze and estimate the resale value of {brand} sneakers based on market trends,
historical data, and anticipated demand.
**Parameters**:
- Brand: {brand}
**Note**: {self.tip_section}
"""
),
agent=agent,
expected_output=f"Estimated resale value for {brand} sneakers,along with a breakdown of the factors affecting their value, such as brand popularity, rarity, and current market trends."
)