Tasks are defined using the @app.task decorator:
@app.task
from celery import Celery app = Celery('tasks', broker='redis://localhost') @app.task def add(x, y): return x + y
Generating explanation with Claude AI...
This will use 10 credits